android-notifications

How to push firebase notification only when CheckBoxPreference is checked?

不羁岁月 提交于 2020-01-06 03:04:50
问题 I am using Firebase notifications in order to notify users about new data posted to the app. I'm following the example given here: https://github.com/firebase/quickstart-android/tree/master/messaging Although, I am also providing preference to the user. They should get notified only when they chose to get notified by checking the CheckBoxPreference . I have set the CheckBoxPreference and also the onPreferenceChangeListener successfully. The problem is that user is getting the notification

Android app update mechanism

你说的曾经没有我的故事 提交于 2020-01-05 10:10:11
问题 I just want to understand how android apps update notification works. What are requirements for update notification to work (Google play store ,google services ??). Any useful link will be helpful. I feel android has information of what are apps purchased by user, so when user connect to internet some service should look for updates available. If this assumption is correct then I want to know information about user owned apps is passed from device or kept server side ?? I wanted to know

Android Notification TextView Marquee Do Not Work?

放肆的年华 提交于 2020-01-05 08:53:13
问题 I am trying to create custom notification status bar like Samsung Galaxy S3 stock Music Player . I am using RemoteViews for custom layout. But my textview components does not working at marquee mode. My codes is below. And Where I make mistake? I spent a lot of time to solve this problem, but I am not luck. Samsung Galaxy S3 stock music player notification bar: This is my xml layout code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res

Android: How to create a custom notification and edit its layout adding views programmatically?

假装没事ソ 提交于 2020-01-04 06:46:22
问题 I'd like to know how to create a custom notification and edit is layout adding views programmatically to allow user to customize is notification. What I can't do is this: If I create a custom LinearLayout like this: LinearLayout ll = new LinearLayout(c); ImageView iv = new ImageView(c); iv.setImageResource(R.drawable.bt_close); ll.addView(iv); How I can create a notification using this layout and add an action to do when I click on ImageView? The code to make a custom notification is only

Android: How to create a custom notification and edit its layout adding views programmatically?

房东的猫 提交于 2020-01-04 06:46:07
问题 I'd like to know how to create a custom notification and edit is layout adding views programmatically to allow user to customize is notification. What I can't do is this: If I create a custom LinearLayout like this: LinearLayout ll = new LinearLayout(c); ImageView iv = new ImageView(c); iv.setImageResource(R.drawable.bt_close); ll.addView(iv); How I can create a notification using this layout and add an action to do when I click on ImageView? The code to make a custom notification is only

Group fcm notifications like whatsapp but allowing multiple group notifications

微笑、不失礼 提交于 2020-01-04 01:59:10
问题 I am not sure whether this is entirely possible but I'll state my requirement. If it is possible then kindly help me figure out how to do it. Let's say I have a gallery kind of an android app. When the user likes or comments on a photo in the gallery, We'd trigger an fcm notification using the code given below value++; NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.notification) .setLargeIcon(rawBitmap) .setContentTitle("MyApp")

OnListenerCOnnected in NotificationListenerService not being called

↘锁芯ラ 提交于 2020-01-03 18:01:42
问题 My app only does not work on Huawei and on other phones it does. Why??? I have that code in my MainActivity: package pl.ct8.wieprzco.wieprzwatch; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Intent intent=new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"); startActivity(intent); startService(new Intent(this,NotificationGetService

Open particular activity/fragment after clicking on Firebase notification when app is closed

房东的猫 提交于 2020-01-03 16:50:12
问题 I know this question seems duplicate, but for my requirement, I have searched many posts online, but nothing worked for me. My requirement I'm using the Firebase to get the push notifications. When app was opened means everything working fine but my problem is, app is in background/closed if any push notification came means i want to open the particular activity or fragment when clicking on that notification, but it always opening the launcher/main activity. For this, I have tried the

Stacking Notifications does not work

≡放荡痞女 提交于 2020-01-03 08:14:10
问题 I need to form a group of notifications. I made the example enter link description here but my notice are not grouped. what did I do wrong? my code: private static int id =0; final static String GROUP_KEY_GUEST = "group_key_guest"; private static void generateNotification(Context context, String message) { NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); Intent intent = new Intent(context,MyActivity.class); PendingIntent pendingIntent = PendingIntent

android notification only sound plays notification is not shown in notification drawer

本小妞迷上赌 提交于 2020-01-03 05:48:11
问题 i am trying to fire notification in at a particular time using AlarmManager and Notification manager. i am facing a strange problem. when notification is fired only sound plays but notification is not shown in the notification drawer. i got an error in the log 04-26 11:32:09.217 1222-1222/? E/NotificationService﹕ WARNING: In a future release this will crash the app: com.example.shiv.selftweak my code is . The class which calls the AlarmManager Intent intent1 = new Intent(this,