Android service working with mySQL data -


so have desktop app working mysql db. need include notification system inside desktop app, allowing desktop users send notifications set of 10 tablets. it's sending sms, not really. tablets users must receive notifications sent desktop users , other way around, tablet users must able send notifications desktop users. since common ground between 2 mysql db, thought of following schema:i need build notification service, run time on tablet after run once. should check remote mysql table see if new records inside, , if so, display notification on tablet. sure many of experts have done @ least once.

so path thought of is:

  1. i have mysql db on server, , have application (desktop) allows users input notification (a new record) inside mysql table.

  2. build php backend serve android service "yes" or "no" answers , second php return data of notification upon request

  3. build service make call php every minute

  4. in case "yes" received service make call second php asking notification data

  5. with response, create notification on device , show user.

now, first of all,: logic ok?

second: how create service "installs itself" , remains installed , running time on tablet? i've been trying tutorial here service not should. perhaps it's because of receive_boot_completed ?

third:should make async calls php, or enough make simple calls, since there no activity/intent freeze until receiving response

fourth: possible imagined have independent service, not android app tablet users must run , keep open?

is there example out there of service this?

i found example of similar want (i think) have few questions it. tutorial here questions are:

1. service start on android startup ? or have extra? be?

2. place call towards php?

please me,

thank you

i suggest make database on tablet contentprovider. can implement syncing using sync mechanism.

http://developer.android.com/training/sync-adapters/index.html

to trigger update on devices @ google cloud messaging.

http://developer.android.com/training/cloudsync/gcm.html

i haven't done this, have been researching :-)


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -