For this you can use the AlarmManager that could start your service for every 12 Hours. In the service you can check the internet connection, if connection is available then connect to the server. For Example : AlarmManager mgr = (AlarmManager) context .getSystemService(Context.ALARM_SERVICE); Intent notificationIntent = new Intent(context, UpdateService.class); PendingIntent...

READ_CALL_LOG -- Allows an application to read the user's call log. READ_LOGS -- Allows an application to read the low-level system log files The first one is mostly specific to phone calls, while the second one is for any and all usage of the device....

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...