Storing FCM token to remote MySQL database
up vote
0
down vote
favorite
My app is able to store registration token in localhost but fails to store the registration token in a online remote MySQL database.
The token is first saved in SharedPreferences then stored to the database server, but it only works in local machine, how can I store it in remote database server, everytime the user installs the application.
public class MainActivity extends AppCompatActivity
private WebView webView;
private ProgressDialog dialog;
private BroadcastReceiver mRegistrationBroadcastReciever;
private final String CHANNEL_ID="notificcation";
String app_server_url="xxxxxxxxxxxxxxxxxxxxxxxx";
@Override
public void onBackPressed()
AlertDialog.Builder builder=new AlertDialog.Builder(this);
if(webView.canGoBack())
webView.goBack();
else
builder.setTitle("Do you want to leave the TuneMe App?");
builder.setMessage("Are you sure?");
builder.setPositiveButton("Exit", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
finish();
);
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
);
AlertDialog dialog=builder.show();
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
SharedPreferences sharedPreferences=getApplicationContext().getSharedPreferences(getString(R.string.FCM_PREF), Context.MODE_PRIVATE);
final String token=sharedPreferences.getString(getString(R.string.FCM_TOKEN),"");
StringRequest stringRequest=new StringRequest(Request.Method.POST, app_server_url, new Response.Listener<String>()
@Override
public void onResponse(String response)
, new Response.ErrorListener()
@Override
public void onErrorResponse(VolleyError error)
)
@Override
protected Map<String, String> getParams() throws AuthFailureError
Map<String,String>params=new HashMap<String,String>();
params.put("fcm_token",token);
return params;
;
MySingleton.getmInstance(MainActivity.this).addToRequestque(stringRequest);
webView=(WebView)findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl("default_website");
webView.setWebViewClient(new WebViewClient()
@Override
public void onPageFinished(WebView view, String url)
if(dialog.isShowing())
dialog.dismiss();
);
mRegistrationBroadcastReciever=new BroadcastReceiver()
@Override
public void onReceive(Context context, Intent intent)
if(intent.getAction().equals(Config.STR_PUSH))
String message=intent.getStringExtra(Config.STR_MESSAGE);
showNotification("TuneMe Article",message);
;
onNewIntent(getIntent());
@Override
protected void onNewIntent(Intent intent)
dialog=new ProgressDialog(this);
if(intent.getStringExtra(Config.STR_KEY)!=null)
dialog.show();
dialog.setMessage("Please Wait");
webView.loadUrl(intent.getStringExtra(Config.STR_KEY));
private void showNotification(String title, String message)
notificationChannel();
Bitmap picture =
BitmapFactory.decodeResource(getResources(),R.mipmap.app_launcher);
Intent intent =new Intent(getBaseContext(),MainActivity.class);
intent.putExtra(Config.STR_KEY,message);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent contentIntent=PendingIntent.getActivity(getBaseContext(),0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder builder=new NotificationCompat.Builder(getBaseContext(),CHANNEL_ID);
builder.setAutoCancel(true)
.setWhen(System.currentTimeMillis())
.setDefaults(Notification.DEFAULT_ALL)
.setSmallIcon(R.drawable.ic_sms_black_24dp)
.setContentTitle(title)
.setContentText(message)
.setLargeIcon(picture)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setContentIntent(contentIntent);
NotificationManager notificationManager = (NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(1,builder.build());
private void notificationChannel ()
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O)
CharSequence name="Personal Notificaiton";
String description="include";
int importance=NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel notificationChannel=new NotificationChannel(CHANNEL_ID,name,importance);
notificationChannel.setDescription(description);
NotificationManager notificationManager=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
notificationManager.createNotificationChannel(notificationChannel);
@Override
protected void onPause()
LocalBroadcastManager.getInstance(this).unregisterReceiver(mRegistrationBroadcastReciever);
super.onPause();
@Override
protected void onResume()
super.onResume();
LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReciever,new IntentFilter("registration Complete"));
LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReciever,new IntentFilter(Config.STR_PUSH));
android mysql firebase-cloud-messaging android-volley
add a comment |
up vote
0
down vote
favorite
My app is able to store registration token in localhost but fails to store the registration token in a online remote MySQL database.
The token is first saved in SharedPreferences then stored to the database server, but it only works in local machine, how can I store it in remote database server, everytime the user installs the application.
public class MainActivity extends AppCompatActivity
private WebView webView;
private ProgressDialog dialog;
private BroadcastReceiver mRegistrationBroadcastReciever;
private final String CHANNEL_ID="notificcation";
String app_server_url="xxxxxxxxxxxxxxxxxxxxxxxx";
@Override
public void onBackPressed()
AlertDialog.Builder builder=new AlertDialog.Builder(this);
if(webView.canGoBack())
webView.goBack();
else
builder.setTitle("Do you want to leave the TuneMe App?");
builder.setMessage("Are you sure?");
builder.setPositiveButton("Exit", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
finish();
);
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
);
AlertDialog dialog=builder.show();
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
SharedPreferences sharedPreferences=getApplicationContext().getSharedPreferences(getString(R.string.FCM_PREF), Context.MODE_PRIVATE);
final String token=sharedPreferences.getString(getString(R.string.FCM_TOKEN),"");
StringRequest stringRequest=new StringRequest(Request.Method.POST, app_server_url, new Response.Listener<String>()
@Override
public void onResponse(String response)
, new Response.ErrorListener()
@Override
public void onErrorResponse(VolleyError error)
)
@Override
protected Map<String, String> getParams() throws AuthFailureError
Map<String,String>params=new HashMap<String,String>();
params.put("fcm_token",token);
return params;
;
MySingleton.getmInstance(MainActivity.this).addToRequestque(stringRequest);
webView=(WebView)findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl("default_website");
webView.setWebViewClient(new WebViewClient()
@Override
public void onPageFinished(WebView view, String url)
if(dialog.isShowing())
dialog.dismiss();
);
mRegistrationBroadcastReciever=new BroadcastReceiver()
@Override
public void onReceive(Context context, Intent intent)
if(intent.getAction().equals(Config.STR_PUSH))
String message=intent.getStringExtra(Config.STR_MESSAGE);
showNotification("TuneMe Article",message);
;
onNewIntent(getIntent());
@Override
protected void onNewIntent(Intent intent)
dialog=new ProgressDialog(this);
if(intent.getStringExtra(Config.STR_KEY)!=null)
dialog.show();
dialog.setMessage("Please Wait");
webView.loadUrl(intent.getStringExtra(Config.STR_KEY));
private void showNotification(String title, String message)
notificationChannel();
Bitmap picture =
BitmapFactory.decodeResource(getResources(),R.mipmap.app_launcher);
Intent intent =new Intent(getBaseContext(),MainActivity.class);
intent.putExtra(Config.STR_KEY,message);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent contentIntent=PendingIntent.getActivity(getBaseContext(),0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder builder=new NotificationCompat.Builder(getBaseContext(),CHANNEL_ID);
builder.setAutoCancel(true)
.setWhen(System.currentTimeMillis())
.setDefaults(Notification.DEFAULT_ALL)
.setSmallIcon(R.drawable.ic_sms_black_24dp)
.setContentTitle(title)
.setContentText(message)
.setLargeIcon(picture)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setContentIntent(contentIntent);
NotificationManager notificationManager = (NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(1,builder.build());
private void notificationChannel ()
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O)
CharSequence name="Personal Notificaiton";
String description="include";
int importance=NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel notificationChannel=new NotificationChannel(CHANNEL_ID,name,importance);
notificationChannel.setDescription(description);
NotificationManager notificationManager=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
notificationManager.createNotificationChannel(notificationChannel);
@Override
protected void onPause()
LocalBroadcastManager.getInstance(this).unregisterReceiver(mRegistrationBroadcastReciever);
super.onPause();
@Override
protected void onResume()
super.onResume();
LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReciever,new IntentFilter("registration Complete"));
LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReciever,new IntentFilter(Config.STR_PUSH));
android mysql firebase-cloud-messaging android-volley
What is the response you are returned?
– Barns
Nov 9 at 21:06
in the database, nothing is stored. But when I am testing in a local hosting environment, the token is saved
– Neliswa Astute
Nov 9 at 21:23
You have two callback methodsonResponse
andonErrorResponse
. Your webservice script should be setup to return some type of response...at the very least return "Success" which you would receive in theonResponse
method. But if your call is unsuccessful you should get some type of error in theonErrorResponse
. UseLog
to display whatever response you get from either method.
– Barns
Nov 9 at 21:27
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
My app is able to store registration token in localhost but fails to store the registration token in a online remote MySQL database.
The token is first saved in SharedPreferences then stored to the database server, but it only works in local machine, how can I store it in remote database server, everytime the user installs the application.
public class MainActivity extends AppCompatActivity
private WebView webView;
private ProgressDialog dialog;
private BroadcastReceiver mRegistrationBroadcastReciever;
private final String CHANNEL_ID="notificcation";
String app_server_url="xxxxxxxxxxxxxxxxxxxxxxxx";
@Override
public void onBackPressed()
AlertDialog.Builder builder=new AlertDialog.Builder(this);
if(webView.canGoBack())
webView.goBack();
else
builder.setTitle("Do you want to leave the TuneMe App?");
builder.setMessage("Are you sure?");
builder.setPositiveButton("Exit", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
finish();
);
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
);
AlertDialog dialog=builder.show();
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
SharedPreferences sharedPreferences=getApplicationContext().getSharedPreferences(getString(R.string.FCM_PREF), Context.MODE_PRIVATE);
final String token=sharedPreferences.getString(getString(R.string.FCM_TOKEN),"");
StringRequest stringRequest=new StringRequest(Request.Method.POST, app_server_url, new Response.Listener<String>()
@Override
public void onResponse(String response)
, new Response.ErrorListener()
@Override
public void onErrorResponse(VolleyError error)
)
@Override
protected Map<String, String> getParams() throws AuthFailureError
Map<String,String>params=new HashMap<String,String>();
params.put("fcm_token",token);
return params;
;
MySingleton.getmInstance(MainActivity.this).addToRequestque(stringRequest);
webView=(WebView)findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl("default_website");
webView.setWebViewClient(new WebViewClient()
@Override
public void onPageFinished(WebView view, String url)
if(dialog.isShowing())
dialog.dismiss();
);
mRegistrationBroadcastReciever=new BroadcastReceiver()
@Override
public void onReceive(Context context, Intent intent)
if(intent.getAction().equals(Config.STR_PUSH))
String message=intent.getStringExtra(Config.STR_MESSAGE);
showNotification("TuneMe Article",message);
;
onNewIntent(getIntent());
@Override
protected void onNewIntent(Intent intent)
dialog=new ProgressDialog(this);
if(intent.getStringExtra(Config.STR_KEY)!=null)
dialog.show();
dialog.setMessage("Please Wait");
webView.loadUrl(intent.getStringExtra(Config.STR_KEY));
private void showNotification(String title, String message)
notificationChannel();
Bitmap picture =
BitmapFactory.decodeResource(getResources(),R.mipmap.app_launcher);
Intent intent =new Intent(getBaseContext(),MainActivity.class);
intent.putExtra(Config.STR_KEY,message);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent contentIntent=PendingIntent.getActivity(getBaseContext(),0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder builder=new NotificationCompat.Builder(getBaseContext(),CHANNEL_ID);
builder.setAutoCancel(true)
.setWhen(System.currentTimeMillis())
.setDefaults(Notification.DEFAULT_ALL)
.setSmallIcon(R.drawable.ic_sms_black_24dp)
.setContentTitle(title)
.setContentText(message)
.setLargeIcon(picture)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setContentIntent(contentIntent);
NotificationManager notificationManager = (NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(1,builder.build());
private void notificationChannel ()
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O)
CharSequence name="Personal Notificaiton";
String description="include";
int importance=NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel notificationChannel=new NotificationChannel(CHANNEL_ID,name,importance);
notificationChannel.setDescription(description);
NotificationManager notificationManager=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
notificationManager.createNotificationChannel(notificationChannel);
@Override
protected void onPause()
LocalBroadcastManager.getInstance(this).unregisterReceiver(mRegistrationBroadcastReciever);
super.onPause();
@Override
protected void onResume()
super.onResume();
LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReciever,new IntentFilter("registration Complete"));
LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReciever,new IntentFilter(Config.STR_PUSH));
android mysql firebase-cloud-messaging android-volley
My app is able to store registration token in localhost but fails to store the registration token in a online remote MySQL database.
The token is first saved in SharedPreferences then stored to the database server, but it only works in local machine, how can I store it in remote database server, everytime the user installs the application.
public class MainActivity extends AppCompatActivity
private WebView webView;
private ProgressDialog dialog;
private BroadcastReceiver mRegistrationBroadcastReciever;
private final String CHANNEL_ID="notificcation";
String app_server_url="xxxxxxxxxxxxxxxxxxxxxxxx";
@Override
public void onBackPressed()
AlertDialog.Builder builder=new AlertDialog.Builder(this);
if(webView.canGoBack())
webView.goBack();
else
builder.setTitle("Do you want to leave the TuneMe App?");
builder.setMessage("Are you sure?");
builder.setPositiveButton("Exit", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
finish();
);
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener()
@Override
public void onClick(DialogInterface dialog, int which)
);
AlertDialog dialog=builder.show();
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
SharedPreferences sharedPreferences=getApplicationContext().getSharedPreferences(getString(R.string.FCM_PREF), Context.MODE_PRIVATE);
final String token=sharedPreferences.getString(getString(R.string.FCM_TOKEN),"");
StringRequest stringRequest=new StringRequest(Request.Method.POST, app_server_url, new Response.Listener<String>()
@Override
public void onResponse(String response)
, new Response.ErrorListener()
@Override
public void onErrorResponse(VolleyError error)
)
@Override
protected Map<String, String> getParams() throws AuthFailureError
Map<String,String>params=new HashMap<String,String>();
params.put("fcm_token",token);
return params;
;
MySingleton.getmInstance(MainActivity.this).addToRequestque(stringRequest);
webView=(WebView)findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl("default_website");
webView.setWebViewClient(new WebViewClient()
@Override
public void onPageFinished(WebView view, String url)
if(dialog.isShowing())
dialog.dismiss();
);
mRegistrationBroadcastReciever=new BroadcastReceiver()
@Override
public void onReceive(Context context, Intent intent)
if(intent.getAction().equals(Config.STR_PUSH))
String message=intent.getStringExtra(Config.STR_MESSAGE);
showNotification("TuneMe Article",message);
;
onNewIntent(getIntent());
@Override
protected void onNewIntent(Intent intent)
dialog=new ProgressDialog(this);
if(intent.getStringExtra(Config.STR_KEY)!=null)
dialog.show();
dialog.setMessage("Please Wait");
webView.loadUrl(intent.getStringExtra(Config.STR_KEY));
private void showNotification(String title, String message)
notificationChannel();
Bitmap picture =
BitmapFactory.decodeResource(getResources(),R.mipmap.app_launcher);
Intent intent =new Intent(getBaseContext(),MainActivity.class);
intent.putExtra(Config.STR_KEY,message);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent contentIntent=PendingIntent.getActivity(getBaseContext(),0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder builder=new NotificationCompat.Builder(getBaseContext(),CHANNEL_ID);
builder.setAutoCancel(true)
.setWhen(System.currentTimeMillis())
.setDefaults(Notification.DEFAULT_ALL)
.setSmallIcon(R.drawable.ic_sms_black_24dp)
.setContentTitle(title)
.setContentText(message)
.setLargeIcon(picture)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setContentIntent(contentIntent);
NotificationManager notificationManager = (NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(1,builder.build());
private void notificationChannel ()
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O)
CharSequence name="Personal Notificaiton";
String description="include";
int importance=NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel notificationChannel=new NotificationChannel(CHANNEL_ID,name,importance);
notificationChannel.setDescription(description);
NotificationManager notificationManager=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
notificationManager.createNotificationChannel(notificationChannel);
@Override
protected void onPause()
LocalBroadcastManager.getInstance(this).unregisterReceiver(mRegistrationBroadcastReciever);
super.onPause();
@Override
protected void onResume()
super.onResume();
LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReciever,new IntentFilter("registration Complete"));
LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReciever,new IntentFilter(Config.STR_PUSH));
android mysql firebase-cloud-messaging android-volley
android mysql firebase-cloud-messaging android-volley
edited Nov 9 at 21:34
Frank van Puffelen
220k25361387
220k25361387
asked Nov 9 at 20:46
Neliswa Astute
365
365
What is the response you are returned?
– Barns
Nov 9 at 21:06
in the database, nothing is stored. But when I am testing in a local hosting environment, the token is saved
– Neliswa Astute
Nov 9 at 21:23
You have two callback methodsonResponse
andonErrorResponse
. Your webservice script should be setup to return some type of response...at the very least return "Success" which you would receive in theonResponse
method. But if your call is unsuccessful you should get some type of error in theonErrorResponse
. UseLog
to display whatever response you get from either method.
– Barns
Nov 9 at 21:27
add a comment |
What is the response you are returned?
– Barns
Nov 9 at 21:06
in the database, nothing is stored. But when I am testing in a local hosting environment, the token is saved
– Neliswa Astute
Nov 9 at 21:23
You have two callback methodsonResponse
andonErrorResponse
. Your webservice script should be setup to return some type of response...at the very least return "Success" which you would receive in theonResponse
method. But if your call is unsuccessful you should get some type of error in theonErrorResponse
. UseLog
to display whatever response you get from either method.
– Barns
Nov 9 at 21:27
What is the response you are returned?
– Barns
Nov 9 at 21:06
What is the response you are returned?
– Barns
Nov 9 at 21:06
in the database, nothing is stored. But when I am testing in a local hosting environment, the token is saved
– Neliswa Astute
Nov 9 at 21:23
in the database, nothing is stored. But when I am testing in a local hosting environment, the token is saved
– Neliswa Astute
Nov 9 at 21:23
You have two callback methods
onResponse
and onErrorResponse
. Your webservice script should be setup to return some type of response...at the very least return "Success" which you would receive in the onResponse
method. But if your call is unsuccessful you should get some type of error in the onErrorResponse
. Use Log
to display whatever response you get from either method.– Barns
Nov 9 at 21:27
You have two callback methods
onResponse
and onErrorResponse
. Your webservice script should be setup to return some type of response...at the very least return "Success" which you would receive in the onResponse
method. But if your call is unsuccessful you should get some type of error in the onErrorResponse
. Use Log
to display whatever response you get from either method.– Barns
Nov 9 at 21:27
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233043%2fstoring-fcm-token-to-remote-mysql-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What is the response you are returned?
– Barns
Nov 9 at 21:06
in the database, nothing is stored. But when I am testing in a local hosting environment, the token is saved
– Neliswa Astute
Nov 9 at 21:23
You have two callback methods
onResponse
andonErrorResponse
. Your webservice script should be setup to return some type of response...at the very least return "Success" which you would receive in theonResponse
method. But if your call is unsuccessful you should get some type of error in theonErrorResponse
. UseLog
to display whatever response you get from either method.– Barns
Nov 9 at 21:27