mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Update network state on push notification received
This commit is contained in:
parent
a2c7419f52
commit
0eaf3369ff
2 changed files with 3 additions and 1 deletions
|
|
@ -46,6 +46,8 @@ public class GCMIntentService extends GCMBaseIntentService {
|
|||
@Override
|
||||
protected void onMessage(Context context, Intent intent) {
|
||||
Log.d("Push notification received");
|
||||
LinphoneManager.getLc().setNetworkReachable(false);
|
||||
LinphoneManager.getLc().setNetworkReachable(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class LinphoneLauncherActivity extends Activity {
|
|||
if (regId.equals("")) {
|
||||
GCMRegistrar.register(this, getString(R.string.push_sender_id));
|
||||
} else {
|
||||
Log.e("Already registered = " + regId);
|
||||
Log.e("Push Notification : already registered with id = " + regId);
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putString(this.getString(R.string.push_reg_id_key), regId);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue