android-notifications

Notifications not received on Android

耗尽温柔 提交于 2019-12-12 07:59:12
问题 I am developing an android-application which main usage is displaying notifications at a set time (some specific calendar app). One of the main complaints is that users do not (always) receive notifications , and I am at wits end. We have internally tested the code below against Android 4.4, 6, 7.0, 7.1, 8.0, 8.1 on emulators and used about 10 real devices (6 to 8.1), and all devices received their notifications on time. Even across reboots, the notifications were all received on time. One of

Why do I get RemoteServiceException for creating/updating a notification?

删除回忆录丶 提交于 2019-12-12 07:54:52
问题 Background I have a spare time app that I've been working on for some years (here), and I try to handle as many crashes as I can (I hate seeing crash reports!). The problem One recent crash that seem quite new, is this one: android.app.RemoteServiceException: at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1768) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6494)

DP5 7.0 - Does adding extras to a pending intent fail?

╄→尐↘猪︶ㄣ 提交于 2019-12-12 07:54:26
问题 Adding the linked issue on tracker: https://code.google.com/p/android/issues/detail?id=216581&thanks=216581&ts=1468962325 So I installed the DP5 Android 7.0 release onto my Nexus 5X today. I've been working on an app that schedules local notifications at specific times using Android's AlarmManager class. Up until this release, the code has been working great on devices running KitKat, Lollipop, and Marshmallow. Below is how I'm scheduling the alarms: Intent intent = new Intent(context,

How to start task periodically using firebase job scheduler

匆匆过客 提交于 2019-12-12 05:37:33
问题 I used Jobschuler for sending notification every x minutes(determined dynamically) like this ComponentName componentName = new ComponentName(context,ClsJobService.class); JobInfo.Builder builder = new JobInfo.Builder(0, componentName) .setPeriodic(duration * 60 * 1000); //setting in millisecond JobScheduler jobScheduler = (JobScheduler) context.getSystemService (Context.JOB_SCHEDULER_SERVICE); jobScheduler.schedule(builder.build()); and its working great it sends notification on time defined

Activity Lifecycle behaves differently JellyBean onwards

浪尽此生 提交于 2019-12-12 04:59:42
问题 I have the following scenario. Activity A starts Activity B. B starts a Notification clicking on which another activity C is started. Now the behaviour is different on Gingerbread and ICS onwards. Incase of Gingerbread when I click on the Notification, the expected behavior is seen, however when I run the same code on ICS or JellyBean when I click on the Notification Activity A is destroyed(OnDestroy is called). Why is the lifecycle behavior different. How can I make it to behave in a

popup notifications for google glass

↘锁芯ラ 提交于 2019-12-12 04:30:47
问题 How do i make custom popup notifications for google glass the way it is shown in the google glass commercial. I want my service to run on the background and send timely popups only when necessary. Link for reference http://www.mobile88.com.sg/news/read.asp?file=/2012/5/11/20120511113022&phone=Google_Glass_augmented_reality__futuristic_concept Is there a possible way to do so or should I just use only Toast notifications or invoke activities through intents. 回答1: The "popup" design from that

Notification not showing up using Android Auto

一世执手 提交于 2019-12-12 04:17:21
问题 I followed the tutorial on Udacity and the developer site for Android auto. I am using a DVU for testing. The notifications don't show up on the DHU but appears on the phone here is my code: Using GcmListenerService: final PendingIntent contentIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT); final PendingIntent contentIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT); Intent

Android Firebase Notification message received but notification prompt is not showing?

无人久伴 提交于 2019-12-12 04:05:37
问题 I have followed this tutorial and when I try to send a message from Firebase console, onMessageReceived were called and createNotification were performed, no notification prompt shows up. It suppose to prompt this but it didn't Below is my MyAndroidFirebaseMsgService code import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.graphics.BitmapFactory; import android.media.RingtoneManager; import

Android: Placing a random item from a String Array in to Notifications

混江龙づ霸主 提交于 2019-12-12 03:58:21
问题 I want my app to be able to pick a random item from this string array: <string-array name="quote_list"> <item>Quote 1 </item> <item>Quote 2 </item> <item>Quote 3</item> </string-array> And send the item off in a notification to the user. (Will be at a time chosen by user, using alarmmanager) I believe I can generate a random item using the following method. How to get a random value from a string array in android? Would I start off with something like this? NotificationCompat.Builder mBuilder

How to send one-to-one upstream messaging using not not using FCM without hosting a server?

孤街醉人 提交于 2019-12-12 03:48:25
问题 Sending messages from one device directly to another device it not supported through Firebase Cloud Messaging. -- Frank van Pufflenen - JUNE 23 2016 That was quite some time ago, and there aren't any updates in the docs. However: Has there been any changes? Is Firebase the only option? Are there any other app servers (Like Firebase and the shut-down Parse )? I don't want to find/buy a server just for this. But is the Firebase Server SDK suitable for this? Can this be implemented using GCM?