Notification not received in Android 2.3 -


I am implementing an information service and I have a problem obtaining messages in Android 2.3. I get the message in version 4.0 and new, but not in 2.3. The following errors are displayed in the logack:

The class 'com.google.android.gms.ads.internal.b.c' could not be found, the method referred to as com.google.android.gms.ads.internal. Nina . Cloud 'android.app Notificication $ Builder', can not be referenced in com.google.android.gms.common.l.a

What could be the problem? This is my method of sending notifications:

  sending private zones (string msg) {mainActivity.notificationClicked = true; Int icon = R.drawable.ic_launcher; Long time = System.currentTimeMillis (); Notification Manager Information Manager = (Notification Manager) .getSystemService (Reference.NETIFICATION_SERVICE); String strmessage = loadPreferences (); String Newmessage = ""; If (! StrMessage.isEmpty ()) newMessage = strmessage + "& lt; br & gt; + Msg; Else newMessage = msg; Remote power contentview = new remote power (getPackageName (), R. layout, custom_notification_layout); ContentView.setImageViewResource (R.id.image, R.drawable.ic_launcher); ContentView.setTextViewText (R.id.text, Html.fromHtml (new message)); Notification Notification = new notification (icon, html, fr hhtml, when); Notification.contentView = contentView; String title = this.getString (R.string.app_name); ActivityManager am = (ActivityManager) getSystemService (ACTIVITY_SERVICE); List & lt; ActivityManager.RunningTaskInfo & gt; TaskInfo = am.getRunningTasks (1); Log D. ("Current Job:", "Current Activity ::" + Workgroup. (0) .topActivity.getClass (). GetSimpleName ()); Component name componentinfo = committee of operations (0). Prevention; Intent notification if (! ComponentInfo.getPackageName (.com) ignore equals ("com.example.myapp")) {noticeintent = new intent (getApplicationContext (), firstactivity.class); } Else {notificationIntent = new intent (getApplicationContext (), MainActivity.class); Notificationentent InputXA ("login", true); } Notificationantant InputXA ("message", html.frame html); Old messages = new message; Obtain Provisions (getApplicationContext (), older messages); NotificationIntent.setflag (int. FLAG_ACTIVITY_CLEAR_TOP | intial.FLAG_ACTIVITY_SINGLE_TOP | intent. FLAG_ACTIVITY_NEW_TASK); Int notifyID = 1; Intention of pending anticipation = Receive pending notice (this, notification notice, notification, pending notice. FLAG_UPDATE_CURRENT); Notification.setLatestEventInfo (this, title, message, intent); Notification.flags | = Notice FLAG_AUTO_CANCEL; Notification - ContentIntent = Intent; Information Manager Information (notification, notification); }  

When I send messages, I get this device in Android 4.2, for example, but not in devices with Android 2.3. I'm debugging the app with Android 2.3 and I've put a breakpoint on the Intent Service handelist but it never comes. I think this may be due to flawed errors that appear in the lockback.

How can I solve the problem with Android 2.3?

Thanks in advance.


I change the notification for notifications:

Notification Comet. Builder emulator = new notification. Builder (this); MBuilder.setContentIntent; Notification Notification = mbuilder.build (); Notification.contentView = contentView;
Notification Manager. Notifiers (Notification, Notification);

But the problem persists, the same error appears in the lockout

Try this code I have used it in my project and it performs well, the receiver is activity activity which will open onclick, as I can remember, but I'm not 100% sure. >

  Public Static Zero Show Notification (Reference Reference, Class Receiver Activity Class, St {Intent Ring title, string text, impression icon) intended = new Intent (context, receiver activity class); Pending pending vertical positioning = pending.activity (reference, 0, intent, 0); // Notification Notification Notification = New Notification. Builder (reference) .setContentTitle (title) .setContentText (text) .setSmallIcon (icon) .setContentIntent (pending) .setAutoCancel (true) .getNotification (); Information Manager Information Manager = (Notification Manager) context.getSystemService (context.NOTIFICATION_SERVICE); Information Manager Notice (0, Notification); }  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -