How to backup App's data on Android over the cloud? - android

Background
I wish to store and restore some settings and other values for an app i'm working on.
The problem
As it turns out, Android already has a nice feature called "BackupAgent".
However, it also seems it's not supported on all devices:
Data backup is not guaranteed to be available on all Android-powered
devices
it's not an API issue (though it is supported only from 2.2), but a manufacturer/carrier issue:
The backup transport is the client-side component of Android's backup
framework, which is customizable by the device manufacturer and
service provider. The backup transport may differ from device to
device and which backup transport is available on any given device is
transparent to your application. The Backup Manager APIs isolate your
application from the actual backup transport available on a given
device—your application communicates with the Backup Manager through a
fixed set of APIs, regardless of the underlying transport.
The question
Is there another free alternative to store & restore data on Android into the cloud?

Related

Using data in data saver mode on Android-N

I have a question about data saver mode on Android N version.
If users use network data on a specific application about carrier service, it won't be charged costs of data even though connected on cellular data network.
Because carrier have not charged on their applications that provide information about using one's services.
But devices using data saver mode will be restricted for using applications or widgets though network is free.
Is there any way to avoid on data restriction except setting in a white list? or to let system know that it is free network on specific app, so don't restrict network communicate on this app?
Do applications have to be compiled with android N version?
Is there any way to avoid on data restriction except setting in a white list?
For pre-installed apps, it is possible that a device manufacturer might add apps to the whitelist based upon particular carrier agreements. However, since the carrier can change the billing rules whenever the carrier wants, this would not be a good idea.
or to let system know that it is free network on specific app, so don't restrict network communicate on this app?
No, because then every developer would do that.
Do applications have to be compiled with android N version?
The behavior of Data Saver has nothing to do with your compileSdkVersion or (AFAIK) your targetSdkVersion. If you want to work with the APIs to find out the Data Saver status, that would require a compileSdkVersion compatible with Android N.

How to check if Android Backup Service is supported?

In accordance with the documentation
Data backup is not guaranteed to be available on all Android-powered
devices.
How could I check in my code if it is supported or no?
I've tried to check what happens on my own device, but calling dataChanged says nothing except log message Backup pass but e=true p=false (explanation of the message is here). The same happens with adb shell bmgr backup my.package.name. I would like to inform my application user if it is not supported.
The backup APIs are available on any device starting with Froyo, but unfortunately some products historically have accidentally broken various aspects of the system's behavior. This should be much better as of Android M; there is considerably more focus on ensuring that backup/restore across the entire device population works well.

How to only allow an Android app granted Device Administration API access to control a given feature

I have recently been reviewing Android's Device Administration API in order to find a way to protect a device from having certain apps forcefully stopped or uninstalled. I came across wipeData() as follows:
http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#wipeData(int)
What is the point of this if a user can simply wipe the data from the device's "Settings" menu? When I originally posted this question, I didn't realize that one effective use could be to remotely wipe a device. I get that, but what I'm specifically after is protecting certain features so that a user cannot access them outside of an app that has been granted policies that manager those features.
For example, on my particular device, I can choose System Settings->Backup & reset->Factory data reset and clear everything. A similar case can be made for many of the other options exposed by DevicePolicyManager.
When using the Device Administration API, is there a way to disable these built-in features so that only the app registered for the Device Administration API can perform them?
what I'm specifically after is protecting certain features so that a user cannot access them outside of an app that has been granted policies that manager those features
There is no meta device administration (i.e., the administration of device admins).
A similar case can be made for many of the other options exposed by DevicePolicyManager
The user has the ability to do nearly nothing offered by DevicePolicyManager.
For example, the user cannot block the camera from the lockscreen, nor can the user block app widgets from the lockscreen, which is why I had to write a utility to do that (as I didn't want to install a closed-source device admin from the Play Store).
Most of the methods on DevicePolicyManager revolve around password quality, and the user cannot set policies for his/her own passwords and have them be enforced.
And so on.
When using the Device Administration API, is there a way to disable these built-in features so that only the app registered for the Device Administration API can perform them?
By definition, only device admins can do device admin things. However, there is no way for one device admin to block another device admin. The only sort-of exception to this is in terms of the various password quality settings, where the strongest setting is applied.

Android data usage control / tracking?

Our company giving out Android devices to drivers. Our application should never use more then 1Gb by nature of communications we do.
However, some drivers managed to use about 10Gb of data :)
So, I wonder:
Is there any way to track data usage of our app vs other apps so we can notify users and office workers?
Is there any way to DISABLE data access from any app other then ours?
Take a look at TrafficStats, with help of that you can get the amount of data sent/received. And you can get the data by UIDs to see where it was used.
Is there any way to DISABLE data access from any app other then ours?
If rooting the devices is an option then you can use the free Application DroidWall This application makes use of the iptables rules of linux to let you allow / disallow applications from using network data.
Is there any way to track data usage of our app vs other apps so we can notify users and office workers?
As H9kDroid indicates, use TrafficStats. Here is a sample application that takes an initial snapshot of the consumed bandwidth, then takes another one when you tap a button, displaying the overall difference on-screen and the per-UID difference in LogCat. Note that not all devices support the per-UID stuff (e.g., not the Ice Cream Sandwich emulator).
Is there any way to DISABLE data access from any app other then ours?
No, sorry. Eventually, the combination of device admin rules and the new traffic management stuff in Ice Cream Sandwich's Settings app might allow for this, but not presently. Or, you could create custom firmware.

Mobile Devices Architecture - iOS, Android, WP7 and Disconnected Instances

I am seeking some architecture advice within the mobile space. I am wondering what people are today within their applications, say for the iOS, Android, WP7 devices, in terms of web services and instances for caching data when disconnected?
Many of our applications need to work offline due to having limited connectivity, so data storage/caching, synchronization, etc. is critical.
Any and all advice will be greatly appreciated.
If your apps need to work in a limited connectivity enviornment just store everything you need in a database, and have a synchronize option so the user can decide when he has connectivity to update everything or send data back to the server.
Another option would be to have the app monitor for connectivity, and when it is being used and a network is available have it automatically work in online mode and when no network is available in offline mode.
Depending on the level of "limited connectivity" I would just go for the full offline option and let the user synchronize. I develop apps that are used in many remote areas of south america and the full offline option is just better. I used to have issues with intermitent connectivity in border areas where the network would jump between available and unavailable and it made a mess in data transmition.
I can't speak for iOS and Android, but for my WP7 app I store data offline in isolated storage. My app essentially works in disconnected mode so everything is stored offline and at certain events e.g. saving a task the app checks to see if it has a mobile connection and if so synchronizes with the back-end.

Categories

Resources