SMOOTSARA Active Member Licensed User Longtime User Mar 26, 2018 #1 Hey guys I've used the FirebaseNotifications in my application I will send data from Google And everything is fine. Android versions 4 will receive notifications if the program is open or closed And everything is fine but On Android 7, only notification is received when the application is open Push Notifications will not be received when the program is closed Code: Copy #Region Service Attributes #StartAtBoot: true #StartCommandReturnValue: android.app.Service.START_STICKY #End Region What's the problem؟
Hey guys I've used the FirebaseNotifications in my application I will send data from Google And everything is fine. Android versions 4 will receive notifications if the program is open or closed And everything is fine but On Android 7, only notification is received when the application is open Push Notifications will not be received when the program is closed Code: Copy #Region Service Attributes #StartAtBoot: true #StartCommandReturnValue: android.app.Service.START_STICKY #End Region What's the problem؟
Erel B4X founder Staff member Licensed User Longtime User Mar 27, 2018 #2 I really recommend you to see the video tutorial as there are 3 mistakes in your post... Upvote 0
KMatle Expert Licensed User Longtime User Mar 27, 2018 #3 You need to understand that the service is started automatically without doing anything (take the example as it is. Just a simple service. Nothing more. Really.). Ask yourself: Who or what starts the service if a message arrives? a) magic b) Android OS via Firebase Messaging c) let's start it sticky and at boot. The video and the example told me to do so. This is ok and will not interfere anything. Next question: How do we send messages? a) In the example they told me to use the console b) via api using OkHttpUtils Last one: Are there different types of messages and do they cause different behaviours of my app? a) no. There is just one type. I'm good. b) if he asks there might be different types. Maybe I take a search. Probably Google has examples and explains the different types c) data messages d) notifications e) mixed (data and notifications) f) I use the console and I've seen some options but I don't care Upvote 0
You need to understand that the service is started automatically without doing anything (take the example as it is. Just a simple service. Nothing more. Really.). Ask yourself: Who or what starts the service if a message arrives? a) magic b) Android OS via Firebase Messaging c) let's start it sticky and at boot. The video and the example told me to do so. This is ok and will not interfere anything. Next question: How do we send messages? a) In the example they told me to use the console b) via api using OkHttpUtils Last one: Are there different types of messages and do they cause different behaviours of my app? a) no. There is just one type. I'm good. b) if he asks there might be different types. Maybe I take a search. Probably Google has examples and explains the different types c) data messages d) notifications e) mixed (data and notifications) f) I use the console and I've seen some options but I don't care
SMOOTSARA Active Member Licensed User Longtime User Apr 18, 2018 #4 Erel said: I really recommend you to see the video tutorial as there are 3 mistakes in your post... Click to expand... hi Erel I looked at the video carefully My problem has not yet been resolved I will explain my problem again. I send a data from Google Firebase to all devices When the app is open, "Google receives" get data correctly (Photo number one) and show push notification and ... But when the app is not open,"Google receives" does not respond and logs are free and data will not be received until the application open After the program is open the "Google receives"is activated and receives the data and show push It's interesting to me that on devices with Android version 4 this is not the problem and the information is received but on devices with Android 7 version and above this problem exists. b4a ver 8.0 Attachments 2.PNG 10.8 KB · Views: 471 1.PNG 57.7 KB · Views: 526 Upvote 0
Erel said: I really recommend you to see the video tutorial as there are 3 mistakes in your post... Click to expand... hi Erel I looked at the video carefully My problem has not yet been resolved I will explain my problem again. I send a data from Google Firebase to all devices When the app is open, "Google receives" get data correctly (Photo number one) and show push notification and ... But when the app is not open,"Google receives" does not respond and logs are free and data will not be received until the application open After the program is open the "Google receives"is activated and receives the data and show push It's interesting to me that on devices with Android version 4 this is not the problem and the information is received but on devices with Android 7 version and above this problem exists. b4a ver 8.0
Semen Matusovskiy Well-Known Member Licensed User Apr 18, 2018 #5 Did you check phone settings for push notifications ? Many manufacturers use own firmware with strange default settings. For instance, Xiaomi. Upvote 0
Did you check phone settings for push notifications ? Many manufacturers use own firmware with strange default settings. For instance, Xiaomi.
Erel B4X founder Staff member Licensed User Longtime User Apr 18, 2018 #6 arastoo said: I send a data from Google Firebase to all devices Click to expand... The video explains that you should never use Firebase console to send messages. You need to use the B4J code. Upvote 0
arastoo said: I send a data from Google Firebase to all devices Click to expand... The video explains that you should never use Firebase console to send messages. You need to use the B4J code.
SMOOTSARA Active Member Licensed User Longtime User Apr 18, 2018 #7 Erel said: The video explains that you should never use Firebase console to send messages. You need to use the B4J code. Click to expand... hi Erel I use b4j for sending data but my problem is not in the sending data. It's interesting to me that on devices with Android version 4.. this is not the problem and the information is received but on devices with Android 7.. version and above this problem exists. Upvote 0
Erel said: The video explains that you should never use Firebase console to send messages. You need to use the B4J code. Click to expand... hi Erel I use b4j for sending data but my problem is not in the sending data. It's interesting to me that on devices with Android version 4.. this is not the problem and the information is received but on devices with Android 7.. version and above this problem exists.
Erel B4X founder Staff member Licensed User Longtime User Apr 18, 2018 #8 Please create a small project with only the push notification feature and upload it. Also upload the code you use to send the messages. Upvote 0
Please create a small project with only the push notification feature and upload it. Also upload the code you use to send the messages.
KMatle Expert Licensed User Longtime User Apr 18, 2018 #9 If you use the api via OkHttpUtils to send messages you see the response from Google like "successful=" or an error message. There you see what the problem is. Upvote 0
If you use the api via OkHttpUtils to send messages you see the response from Google like "successful=" or an error message. There you see what the problem is.