ArminKH Well-Known Member Jul 8, 2015 #1 Hi I want a service 4 gcm which is always running my searches over this forum came up 2 solution 1-Use sticky service + StartServiceAt 2-Use service.startforground As i understand service.Startforground is better but i dont want any notification I want just use a service to listen to google receive intent for new messages but some times after hours or when i use some apps such as cleanmaster to clear ram my service killed and then the device cant listen for incoming push messages Please suggest the best way to have an always online gcm service Tnx
Hi I want a service 4 gcm which is always running my searches over this forum came up 2 solution 1-Use sticky service + StartServiceAt 2-Use service.startforground As i understand service.Startforground is better but i dont want any notification I want just use a service to listen to google receive intent for new messages but some times after hours or when i use some apps such as cleanmaster to clear ram my service killed and then the device cant listen for incoming push messages Please suggest the best way to have an always online gcm service Tnx
Erel B4X founder Staff member Licensed User Longtime User Jul 9, 2015 #2 You do not need a sticky service to handle GCM messages. The service will start automatically when a message arrives. Upvote 0
You do not need a sticky service to handle GCM messages. The service will start automatically when a message arrives.
ArminKH Well-Known Member Jul 9, 2015 #3 Erel said: You do not need a sticky service to handle GCM messages. The service will start automatically when a message arrives. Click to expand... Are u sure?if yes please reproduce following steps 1.Make a gcm service 2.Start app and register device to gcm service now you can send message to device 3.now close your app completly and install clean master app and configure properly for handle background tasks 4.clear ram by using clean master 5.Send push message to device Now you can see not any message arrived to your device 6.Try to register again your device then you can see your message which you sent on previous step arrived to your device .......... If you cant reproduce then i will attach a video shot Thank u Upvote 0
Erel said: You do not need a sticky service to handle GCM messages. The service will start automatically when a message arrives. Click to expand... Are u sure?if yes please reproduce following steps 1.Make a gcm service 2.Start app and register device to gcm service now you can send message to device 3.now close your app completly and install clean master app and configure properly for handle background tasks 4.clear ram by using clean master 5.Send push message to device Now you can see not any message arrived to your device 6.Try to register again your device then you can see your message which you sent on previous step arrived to your device .......... If you cant reproduce then i will attach a video shot Thank u
Erel B4X founder Staff member Licensed User Longtime User Jul 9, 2015 #4 Yes, I'm sure. If the user explicitly kills the app then Android will not start the process until the user explicitly starts it again. Search the site for static intent filters. Upvote 0
Yes, I'm sure. If the user explicitly kills the app then Android will not start the process until the user explicitly starts it again. Search the site for static intent filters.
ArminKH Well-Known Member Jul 9, 2015 #5 Erel said: Yes, I'm sure. If the user explicitly kills the app then Android will not start the process until the user explicitly starts it again. Search the site for static intent filters. Click to expand... thanx erel but why u are impatient today? Ok Damet Garm Pesaaaaaaaaar Last edited: Sep 3, 2015 Upvote 0
Erel said: Yes, I'm sure. If the user explicitly kills the app then Android will not start the process until the user explicitly starts it again. Search the site for static intent filters. Click to expand... thanx erel but why u are impatient today? Ok Damet Garm Pesaaaaaaaaar
Erel B4X founder Staff member Licensed User Longtime User Jul 9, 2015 #6 Sorry but I didn't mean to sound harsh. Just answered the question Upvote 0