Posts

Showing posts with the label Sms

Restore sms from Google Drive

In previous post I described how to backup sms in Google Drive. In this post I will try to restore sms from a backup saved in Google Drive, and I will also use the new app data folder . As always, it is just an example. It is quite simple, but pay attention , you will write your SMS Content Provider. In order to backup sms, in our app we can do these steps: Choose a Google Account through AccountPicker.newChooseAccountIntent() . Search for a backup file from Google Drive Parse the backup file Update Sms Content Provider In our example we will search our backup file in a Google Drive folder or in appdata folder. . Files.List request = mService .files() .list() .setQ("mimeType = '" + MIME_TEXT_PLAIN + "' and '" + folderId + "' in parents "); If you want to use appdata folder, folder...

Backup sms in Google Drive

Image
In previous post I described how to make simple actions with Google Drive from own apps. In this post I will try to do a simple sms backup in a google drive folder, and I will use the new app data folder . It is a quite simple operation.If you've already understood how to use Google Drive, the only difficulty is to find a way to retrieve sms from your device. There are many implementations on the web, but there are not public API. I choose to use TelephonyProviderConstants that you can find in the awesome DashClock app. First of all we have to do these steps described in previous post: Enable the Drive API from Google API Console Add Drive API v2 to your project Make sure the Google Play Services client library is being included in the Android's project build path Then,in order to backup sms, in our app we can do these steps: Choose a Google Account through AccountPicker.newChooseAccountIntent() . Create a Folder in Google Drive Read sms from device Crea...