Push with my own server

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,

I want my app to do the following:

1. Give an information and the IP address to my server, running on PHP (I know how to do this)
2. Close, or whatever.
3. When the server has an information for the app, the app should start automatically.

Can this be done at all?

Thank you

Peter
 

sorex

Expert
Licensed User
Longtime User
Yes, but you'll need to use a service so that it polls the server every xx minutes when using other apps.
 
Upvote 0

JoanRPM

Active Member
Licensed User
Longtime User
A Push Notification is a free service of google (GCM).
With this service you can receive notifications on any data that interests you. I've used it to receive commands from a server to open a particular application, to vibrate the phone, save messages to a file, etc.
I've done it with a servicemodule whith the property # StartAtBoot: True, so that when you reboot the device, start the service again.
To my knowledge, there is no need to scan. It works by intents.
The advantage is that it is a free service from Google, at least for now.

You can see this tutorial link:
http://http://www.b4x.com/forum/basic4android-getting-started-tutorials/19226-android-push-notification-gcm-framework-tutorial.html

Greetings.
 
Upvote 0
Top