How can I give a button id the id from the parsed JSON data into the listview?
Currently I have this method:
    @Override
    protected void onPostExecute(Void result) {
        super.onPostExecute(result);
        // Dismiss the progress dialog
        if (pDialog.isShowing())
            pDialog.dismiss();
        /**
         * Updating parsed JSON data into ListView
         * */
        ListAdapter adapter = new SimpleAdapter(
                MainActivity.this, contactList,
                R.layout.list_item, new String[]{"name", "description",
                "release_at", "details" }, new int[]{R.id.name,
                R.id.description, R.id.release_at});
        lv.setAdapter(adapter);
    }
I want to add the id to the created buttons, like so:
    <Button
        android:id="@+id/gameDetails"      // <- here I want to add my id
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
Later on I want to create an intent and post the button id to the new Activity something like this:
public void openDetails(View view) {
    String getContactId = new GetContacts().getButtonId();
    Intent paralaxActivityItent = new Intent(MainActivity.this, ParalaxToolbarActivity.class);
    paralaxActivityItent.putExtra("id", id); // the button id
    MainActivity.this.startActivity(paralaxActivityItent);
}
In the other Activity I want to show data realated to the id which I post.
Since im new to android developing I am not sure if that is the correct.
Edit:
This is my Adapter:
public class RecyclerAdapter extends RecyclerView.Adapter<RecyclerAdapter.ViewHolder> {
    private List<String> friends;
    private Activity activity;
    private ArrayList<HashMap<String, String>> contactList;
    public RecyclerAdapter(Activity activity, List<String> friends) {
        this.friends = friends;
        this.activity = activity;
    }
    @Override
    public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
        //inflate your layout and pass it to view holder
        LayoutInflater inflater = activity.getLayoutInflater();
        View view = inflater.inflate(android.R.layout.simple_list_item_1, viewGroup, false);
        ViewHolder viewHolder = new ViewHolder(view);
        return viewHolder;
    }
    @Override
    public void onBindViewHolder(RecyclerAdapter.ViewHolder viewHolder, int position) {
        viewHolder.item.setText(friends.get(position));
    }
    @Override
    public int getItemCount() {
        return (null != friends ? friends.size() : 0);
    }
    /**
     * View holder to display each RecylerView item
     */
    protected class ViewHolder extends RecyclerView.ViewHolder {
        private TextView item;
        public ViewHolder(View view) {
            super(view);
            item = (TextView) view.findViewById(android.R.id.text1);
        }
    }
}
MyGetContact class:
/**
 * Async task class to get json by making HTTP call
 */
private class GetContacts extends AsyncTask<Void, Void, Void> {
    @Override
    protected void onPreExecute() {
        super.onPreExecute();
        // Showing progress dialog
        pDialog = new ProgressDialog(MainActivity.this);
        pDialog.setMessage("Please wait");
        pDialog.setCancelable(false);
        pDialog.show();
    }
    @Override
    protected Void doInBackground(Void... arg0) {
        HttpHandler sh = new HttpHandler();
        // Making a request to url and getting response
        String jsonStr = sh.makeServiceCall(url);
        Log.e(TAG, "Response from url: " + jsonStr);
        if (jsonStr != null) {
            try {
                // Getting JSON Array node
                JSONArray jsonArray = new JSONArray(jsonStr);
                // looping through All Contacts
                for (int i = 0; i < jsonArray.length(); i++) {
                    JSONObject c = jsonArray.getJSONObject(i);
                    String id = c.getString("id");
                    String name = c.getString("name");
                    String description = c.getString("description");
                    String video_url = c.getString("video_url");
                    String platform = c.getString("platform");
                    String avaible = c.getString("avaible");
                    String release_at = c.getString("release_at");
                    // tmp hash map for single contact
                    HashMap<String, String> data = new HashMap<>();
                    // adding each child node to HashMap key => value
                    data.put("id", id);
                    data.put("name", name);
                    data.put("description", description);
                    data.put("video_url", video_url);
                    data.put("platform", platform);
                    data.put("release_at", release_at);
                    // adding contact to contact list
                    contactList.add(data);
                }
            } catch (final JSONException e) {
                Log.e(TAG, "Json parsing error: " + e.getMessage());
                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        Toast.makeText(getApplicationContext(),
                                "Json parsing error: " + e.getMessage(),
                                Toast.LENGTH_LONG)
                                .show();
                    }
                });
            }
        } else {
            Log.e(TAG, "Couldn't get json from server.");
            runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    Toast.makeText(getApplicationContext(),
                            "Couldn't get json from server. Check LogCat for possible errors!",
                            Toast.LENGTH_LONG)
                            .show();
                }
            });
        }
        return null;
    }
@Override
protected void onPostExecute(Void result) {
    super.onPostExecute(result);
    // Dismiss the progress dialog
    if (pDialog.isShowing())
        pDialog.dismiss();
    /**
     * Updating parsed JSON data into ListView
     * */
    ListAdapter adapter = new SimpleAdapter(
            MainActivity.this, contactList,
            R.layout.list_item, new String[]{"name", "description",
            "release_at", "details" }, new int[]{R.id.name,
            R.id.description, R.id.release_at});
    lv.setAdapter(adapter);
}
 
     
     
    