Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I send user details to mysql database using DatabaseHelper class
    primarykey
    data
    text
    <p>Trying to send user details who is log in to my app with facebook details to mysql database using databasehelper.java here i am getting error in DatabaseHelper helper1 = new DatabaseHelper(this); is there any syntax mistake or any wrong code i am using for sending the data to my server ??</p> <pre><code>public void getProfileInformation() { Bundle params = new Bundle(); params.putString("fields", "id,name,email"); mAsyncRunner.request("me", new RequestListener() { @Override public void onComplete(String response, Object state) { Log.d("Profile", response); String json = response; try { JSONObject profile = new JSONObject(json); // getting name of the user final String name = profile.getString("name"); // getting email of the user final String email = profile.getString("email"); final String id = profile.getString("id"); /*runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(getApplicationContext(), "Name: " + name + "\nEmail: " + email + "\nid" + id, Toast.LENGTH_LONG).show(); } });*/ if(id != null &amp;&amp; id.length() &gt; 0){ String accessToken = null; DatabaseHelper helper1 = new DatabaseHelper(this); DatabaseUtility dao = new DatabaseUtility(helper); try { accessToken = dao.getAccessToken(); } catch (Exception e1) { } Map&lt;String , String&gt; params = new HashMap&lt;String,String&gt;(); params.put(Constants.FACEBOOK_ID, id); params.put(Constants.ACCESS_TOKEN_PARAM, accessToken); Status status = null; try { status = Utils.addFacebookAccount(params, LoginActivity.this); } catch (NullPointerException e) { } catch (JSONException e) { } Utils.showErrorMessage(getApplicationContext(), Constants.CONNECTED_TO_FACEBOOK_ERROR, Constants.TOAST_VISIBLE_LONG); Intent i=new Intent(getApplicationContext(),ProfileActivity.class); startActivity(i); }} catch (JSONException e) { e.printStackTrace(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload