Android notification on device only when debugging -


I'm having a strange notification behavior on Android device (running v4.2.2). When connecting to a debugger, I get the information right properly, although gcm.register (SENDER_ID) fails with the exception of SERVICE_NOT_AVAILABLE. But when the device is unlocked with USB / debugger, it has not received any information. any idea? Given my limited experience in Android, I am very confused as to what is happening. In addition, the device is running Google Play Services v4.3.25

here appears to me -

    

  & lt; Use-SDK Android: minSdkVersion = "17" Android: targetSdkVersion = "18" /> & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "com.google.android.c2dm.permission.RECEIVE" /> & Lt; Usage-permission Android: name = "android.permission.GET_ACCOUNTS" /> & Lt; Use-permission Android: name = "android.permission.WAKE_LOCK" /> & Lt; Permission Android: name = "com.example.cloudsample.app.permission.C2D_MESSAGE" Android: protectionLevel = "signature" /> & Lt; Usage-permission Android: name = "com.example.cloudsample.app.permission.C2D_MESSAGE" /> & Lt; Android Android: allowBackup = "true" android: icon = "@drawable / iclinker1" Android: label = "@ string / app_name" Android: theme = "@ style / aptitude" & gt; & Lt; Receiver Android: name = "com.microsoft.windowsazure.notifications.NotificationsBroadcastReceiver" Android: permission = "com.google.android.c2dm.permission.SEND" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "com.google.android.c2dm.intent.RECEIVE" /> & Lt; Action Android: name = "com.google.android.c2dm.intent.REGISTRATION" /> & Lt; Category android: name = "com.example.cloudsample.app" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; & Lt; Activity Android: name = "com.example.cloudsample.app.MainActivity" android: label = "@ string / app_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com.example.cloudsample.app.MapsActivity" android: label = "@ string / title_activity_maps" & gt; & Lt; Meta-Data Android: name = "android.support.PARENT_ACTIVITY" Android: value = "MainActivity" /> & Lt; / Activity & gt; & Lt; Meta-Data Android: name = "com.google.android.gms.version" android: value = "@ integer / google_play_services_version" /> & Lt; Meta-data Android: name = "com.google.android.maps.v2.API_KEY" Android: value = "< & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Usage-permission Android: name = "android.permission.WRITE_EXTERNAL_STORAGE" /> & Lt; Use-permission Android: name = "com.google.android.providers.gsf.permission.READ_GSERVICES" /> & Lt ;! - ACCESS_COARSE / FINE_LOCATION permissions are not required in order to use Google Maps Android API v2, but it is recommended - & gt; & Lt; Usage-permission Android: name = "android.permission.ACCESS_COARSE_LOCATION" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_FINE_LOCATION" /> & Lt; Usage-permission Android: name = "android.permission.VIBRATE" />   

>

just below Give a delay to show a notification like:

  Notification Manager AccountManager = (Notification Manager) context.getSystemService (context.NOTIFICATION_SERVICE); Content notification = tap; Notification = each intent (context, splash screens, class); Intended anticipation = Pending. Gentle Activity (Reference, 0, Notification Notification, 0); RemoteView Notewview = new remote power (getPackageName (), R. timer out.Notification_layout); Last notification affiliate. Builder mbuilder = new notification. Builder (reference) .setSmallIcon (icon) .setAutoCancel (true) .set default (notification. DEFAULT_SOUND | notification. DEFAULT_VIBRATE) .setContent (notiview); mBuilder.setContentIntent; New timer () Schedule (New TimerTask) {@Override Public Zero Run () {Information Manager    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -