android-notifications

Android Wear - Notification - setContentAction() not working

筅森魡賤 提交于 2019-12-01 05:45:34
I'm creating a notification that fires from the wearable device and only on the wearable device, not on phone at all. I want it to have two action buttons (no functionality yet) and a third action when the notification itself is clicked. I'm trying to use setContentAction() to make the last action be the action when the notification is clicked, but it's still displaying as a separate action button (according to the documentation here it shouldn't display a separate button). That unwanted button fires the desired intent, though. The notification itself isn't responding to clicks. Here is the

Send push notifications to Android

走远了吗. 提交于 2019-12-01 05:43:27
I am currently developing Java web services that run on WebLogic on a server. These web services are called by a mobile application, which is developed by another team. There is a requirement that I need to send push notifications to the mobile application. My current development does not require me to do any mobile development since I am only doing server side development. I don't have experience in mobile development either. How do go about developing push notifications to both Android devices? Thanks. Prerequisite for GCM Application Google API Server Key GCM RegId of the Android Device to

android notification launches same activity twice

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 05:19:13
When I click the notification on the status bar it launches an activity but the behavior is strange. If my app is in foreground and I click the notification the notification intent is fired once. If my app is in background then the notification intent is fired twice. If I exit the app (ie all activities have been popped by hitting the back button) then notification intent is fired once. Can anyone explain this behaviour. The code snippet is as follows: _notification = new Notification(icon_id, "Ticker Text", System.currentTimeMillis()); _showActivityIntent = new Intent(); _showActivityIntent

NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID) not working on Oreo Firebase notification

懵懂的女人 提交于 2019-12-01 05:17:29
I am trying to show notification using Firebase in Oreo version so it's not showing when I get Solution NotificationCompat.Builder(this, CHANNEL_ID) but it's showing me like this and my build.gradle file is apply plugin: 'com.android.application' dependencies { compile project(':library') compile project(':camerafragment') compile 'com.google.android.gms:play-services:11.0.0' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.mcxiaoke.volley:library:1.0.17' compile 'com.android.support:appcompat-v7:26.0.0-alpha1' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile

Android - show animated status bar icon

穿精又带淫゛_ 提交于 2019-12-01 04:52:58
I'm trying to set my notification status bar icon as animated android.R.drawable.stat_sys_upload, it works fine, but the icon do not animate: private void showStatusNotification() { NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Builder notificationBuilder = new NotificationCompat.Builder(this); notificationBuilder.setAutoCancel(false); notificationBuilder.setOngoing(true); notificationBuilder.setContentIntent(PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT));

android lollipop notification background colour

我只是一个虾纸丫 提交于 2019-12-01 04:20:22
问题 Is it possible to change the background colour of notifications in android lollipop. I noticed that some notifications are white, some light grey and some are dark grey. (source: gottabemobile.com) (source: sftcdn.net) You can see the music player notification has a dark grey background. and in the second screenshot some are light grey. How do I set this colour? And is it possible to completely change the colour e.g. any hex code. Or can you select them from a template such as material dark

How to correctly handle startForegrounds two notifications

大城市里の小女人 提交于 2019-12-01 03:48:28
I have an IntentService that uploads a file. Everything works fine, but I'm a little confused about how to handle the notifications. When I start the notification I use startForeground() because the files can be rather large and I don't want the upload to get killed unless absolutely necessary. When I use startForeground() it displays two notifications in the notification area (one under Ongoing and one under Notifications): I've read through a number of different Stack Overflow posts and web articles, but none of them answer the question I have...hopefully I haven't missed one that talks

Send push notifications to Android

删除回忆录丶 提交于 2019-12-01 03:36:50
问题 I am currently developing Java web services that run on WebLogic on a server. These web services are called by a mobile application, which is developed by another team. There is a requirement that I need to send push notifications to the mobile application. My current development does not require me to do any mobile development since I am only doing server side development. I don't have experience in mobile development either. How do go about developing push notifications to both Android

Android Wear - Notification - setContentAction() not working

試著忘記壹切 提交于 2019-12-01 03:34:02
问题 I'm creating a notification that fires from the wearable device and only on the wearable device, not on phone at all. I want it to have two action buttons (no functionality yet) and a third action when the notification itself is clicked. I'm trying to use setContentAction() to make the last action be the action when the notification is clicked, but it's still displaying as a separate action button (according to the documentation here it shouldn't display a separate button). That unwanted

android notification launches same activity twice

余生颓废 提交于 2019-12-01 03:06:50
问题 When I click the notification on the status bar it launches an activity but the behavior is strange. If my app is in foreground and I click the notification the notification intent is fired once. If my app is in background then the notification intent is fired twice. If I exit the app (ie all activities have been popped by hitting the back button) then notification intent is fired once. Can anyone explain this behaviour. The code snippet is as follows: _notification = new Notification(icon_id