Bastien Bast Weber
Bastien Bast Weber

Reputation: 481

Create a basic network app

I have a little question about an android app with a function "remote" use via internet.

So I have these ideas:

I just want make a remote connected via user/password to the server and the other app connect to the server and refresh his status.

Do you know the best way for do that?

Thanks

Upvotes: 0

Views: 95

Answers (1)

ohaleck
ohaleck

Reputation: 671

The question is not very precise, but as far as I understand it, both your ideas implement the 'pull' concept, that is the client app checking the status of the server every now and then.

If you want the app to be instantly notified of the server status change, I would suggest push notifications with GCM (Google Clound Messaging). You can find some basic descriptions and examples at: http://developer.android.com/google/gcm/index.html

Sending a server-to-client notification is simple regardless of the platform you use server side. E.g. for PHP integration with GCM, check out this thread: GCM with PHP (Google Cloud Messaging)

Upvotes: 2

Related Questions