Search code examples
androidmysqlcalllog

Sending Local Sqlite data to mysql server automatically in android


Hi I have developed an android application where in that I'm retrieving call log from the mobile and storing them in the local sqlite database.Till here its working fine

Now what I need is

1.I want that data to send to mysql server automatically when internet connection is detected.

2.My App should also check for every 30 minutes of call log and if new entries came it should update to local sqlite table.


Solution

  • Answer to question 1 is here: Detect whether there is an Internet connection available on Android and for inserting data into mysql You need to open mysql port for everyone, but much better is to create some kind of api and then send logs to mysql via api.

    Second question - https://developer.android.com/training/scheduling/alarms.html