-1

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.

Vandana
  • 25
  • 8

1 Answers1

0

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

Community
  • 1
  • 1
Guntis
  • 496
  • 1
  • 5
  • 19
  • can I have an example if any..?I have searched in google but I could'nt find any – Vandana Dec 22 '14 at 08:36
  • Example for what? Booth links is with examples ... Or You mean api example ? – Guntis Dec 22 '14 at 08:55
  • You simply can send log data to server with POST method. And then in receiving server store data into MySQL. – Guntis Dec 22 '14 at 11:43
  • I need to send the data automatically whithout any event or action – Vandana Dec 23 '14 at 06:02
  • Here http://stackoverflow.com/questions/2938502/sending-post-data-in-android is simple post example. Without event You cannot know that internet is available. Without event You can run app every X minutes and check if internet is available (answer to question 1) and if is, then send data to server. – Guntis Dec 23 '14 at 08:31