android-notifications

How to know if Show Notification is disabled for my app? [duplicate]

老子叫甜甜 提交于 2019-12-01 15:38:51
问题 This question already has answers here : Android 4.1: How to check notifications are disabled for the application? (5 answers) Closed 2 years ago . Is there any way to track whether the user has "Show notifications" disabled/unchecked in the Settings/App Info page of my app? 回答1: Simple: You cant. In Google I/O 2012 answered: https://www.youtube.com/watch?v=Yc8YrVc47TI&feature=player_detailpage#t=1682s update: you can check if the user can see the notification in the status bar i.e. able TO

Android Multiple Notification sending same data on clicking

半腔热情 提交于 2019-12-01 15:31:39
问题 Notification in android taking same intent on clicking. I am sending notifications after installing the theme. Consider I install 4 themes and 4 notifications appear in Notification window, but when I click on each notification it will launch perticular activity but the intent is having the same data for each intent. my code goes like this @SuppressWarnings("deprecation") void sendInstalledNotification(String fileName, String packageName) { NotificationManager notificationManager =

Notification from IntentService - NullPointerException while obtaining Context

青春壹個敷衍的年華 提交于 2019-12-01 15:27:58
问题 I am unable to generate the notification (in the notification area) from an IntentService . I get a NullPointerException while obtaining NotificationManager . The problem is with Context. 06-01 16:46:05.910: ERROR/AndroidRuntime(14745): Caused by: java.lang.NullPointerException 06-01 16:46:05.910: ERROR/AndroidRuntime(14745): at android.content.ContextWrapper.getSystemService(ContextWrapper.java:363) 06-01 16:46:05.910: ERROR/AndroidRuntime(14745): at com.Android.Main1.FileUploaderService.

How to show a notification without a sound java

淺唱寂寞╮ 提交于 2019-12-01 14:35:57
问题 How can I make a notification that doesn't make a sound when I build it? I am building a notification, and my users don't like the fact that it makes a sound. How can I change it to a silent one / no sound at all? How I show notification: android.support.v7.app.NotificationCompat.Builder builder = new android.support.v7.app.NotificationCompat.Builder(main); builder.setStyle(new android.support.v7.app.NotificationCompat.BigTextStyle().bigText(text)); builder.setSmallIcon(R.drawable.app);

Android notification app not working properly

一个人想着一个人 提交于 2019-12-01 14:14:27
I'm developing an android app, and part of it involves a notification that reminds the user to do something. This notification at a specified time and repeats every 12 hours. I'm using AlarmManager to schedule the alarm and I've also included the code to start my Alarm Service when the device boots. Here are my java classes: MainActivity.java public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SharedPreferences preferences =

Automatic reply for whatsapp messages approach

心不动则不痛 提交于 2019-12-01 12:55:22
I have seen few applications on play store that supports automatic reply for WhatsApp, I searched the internet to find out the approach, but all I found was this piece of code Uri uri = Uri.parse("smsto:" + "99********"); Intent i = new Intent(Intent.ACTION_SENDTO, uri); i.putExtra("sms_body", "Hey!"); i.setPackage("com.whatsapp"); startActivity(i); It will open the WhatsApp and take you to that particular contact if you have saved and it will paste the given text but it will not send the message. links https://play.google.com/store/apps/details?id=horizontstack.autoreplyforwhatsapp.whatsreply

How to send notification to registered users of same application in android

北慕城南 提交于 2019-12-01 12:26:29
I want to notify the users who have downloaded application, whenever something added by me as a administrator. Each user downloaded the application will register. I have all the info about the users. I want to notify when something added to my application ( Usually data i added will be stored in database). Please give me idea how to make this happen. You should use GCM for push notification. You can follow this tutorial for GCM push notification. Sujith If you wanted to send messages to the users who installed your application, you must have a server. You have the following options, 1. Google

How to send notification to registered users of same application in android

这一生的挚爱 提交于 2019-12-01 11:30:28
问题 I want to notify the users who have downloaded application, whenever something added by me as a administrator. Each user downloaded the application will register. I have all the info about the users. I want to notify when something added to my application ( Usually data i added will be stored in database). Please give me idea how to make this happen. 回答1: You should use GCM for push notification. You can follow this tutorial for GCM push notification. 回答2: If you wanted to send messages to

Processing notifications in Xamarin Forms Android

廉价感情. 提交于 2019-12-01 11:23:16
I'm using the library https://github.com/aritchie/notifications and I can create and schedule notifications properly. I wish to process them in Android so that depending on the notification - it will navigate to a particular page when the user taps on it. I've found that the below event is fired when I tap on a notification (in my Android Project) protected override void OnNewIntent(Intent intent) { } However, I can't find any info in the intent from my notification in order to build up navigation to a particular page. Any advice would be appreciated. Cheers! Edit #1 (Adding additional code

Group notifications on a wearable from the micro app

拟墨画扇 提交于 2019-12-01 11:15:15
I build a micro app for a wearable now I'm working with notifications on the device. Here is my example code: NotificationCompat.Builder builder = new NotificationCompat.Builder(context) .setContentTitle(title) .setContentText(message) .setSmallIcon(icon) .setGroup(groupKey); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); notificationManager.notify(id, builder.build()); This notification is never shown and it does not matter if I have one or multiple notifications with the same group key. Do you know what I'm doing wrong? Just for clarification I