how to create android app to take backup of the phone - android

How To create backup of phone data and in case of lost should retrieve data on another phone from server side database,i want to develop android

With the updated information (contacts backup) I would advise the following:
Connect the android phone with a google account, all contacts will be saved with the google account and available on other phones registered with that account. Can have multiple accounts. Available in gmail/google contacts as well. Works with google apps accounts as well as gmail.
and/or
Connect the android phone with an exchange server, can store the contacts there and will be available on other phones connected as well
The power of the cloud (and android). You already have backup of your contacts.
Contacts from one or more of each of these for example are available (and merged into one contact): skype, twitter, gmail, exchange, endomondo, ...(even facebook is possible with workarounds even though facebook ignores the integration on android themselves these days) and many others. Android is very nice regarding this!
Having said that, there is a contacts api and fairly easy to access using standard android content resolvers etc. Please see
http://developer.android.com/resources/articles/contacts.html

Related

Android application like the Mobile Browser Version

I have a question about creating an Android application.
I have a website (dating service) and it has "Desktop Version" and "Mobile Browser Version". These two versions differ in design and few functions (but they are one, one registration for one user). I want to make an Android application like the "Mobile Browser Version", so that it is also connected with my website (one registration for one user).
How to do it?
I installed Android Studio and connected to Firebase.
You can do two things (easy and hard )
1) easy way is if your website is responsive then you can use a webview of android with your website link that don't need any other customization.Just one splash screen and a webview in Mainactivity.
2) (Hard one) you can make API to pull and push data from/to database,this need, you have to make app from scratch and need some times.For this you must have deep knowledge about Retrofit,Recycleview etc
If you have already have a database connected with your website then you need to make an API service to connect android application with your website. You can restrict users having multiple accounts by making their email or mobile number primary key if you have a relational database. or you can use firebase but you also need to connect the website with the firebase account otherwise it will act like a separate service.

How to have other apps know what CONTENT_URI to look for?

I have been researching everything I can on Content Providers, but I cannot grasp the concept of how other apps installed on the phone can have access to the Content I am Providing.
How can other apps possibly know what my CONTENT_URIs are???
I am making a Contacts app. How can other apps get the contact data I have stored, it seems impossible another app would know what I have set for the CONTENT_URI.
Doesn't this defeat the whole purpose of Content Providing if other apps need to know basically what the secret key is that only I would know?
I want other apps to see my Contact app data instead of ignoring mine and only looking to the stock Contacts app for data.
Why would Android create the ContactsContract provider if that is going to lead to developers using that to obtain contact data, therefore by default making all other 3rd party contacts apps obsolete because other developers would be writing code essentially to only grab Contact data from the stock Android Contact app?
Android doesn't seem to provide anyway for me to provide by data to other apps using the ContactsContracts provider. Yet of coarse Android has made it very clear, easy, and encourages developers needing contact data to use ContactsContract.
Is this a blatant power grab? The whole intention of my contacts app is to make my Contact data more secure so that Google isn't able to collect it if they so choose, or anyone else for that matter.
Please can someone advise? This cannot possibly be correct, I am hoping I have misunderstood here. Again just FYI, I have found nothing anywhere on the Android Developer page that refers to the issue I am having.
This is definitely not a power grab. The contacts are embedded into the operating system because users require their phone to store phone numbers along with a name and other information to associate with that phone number. Google is not doing anything different than the flip phones did back in the day, except for giving users the option to sync their contacts to the cloud. However, that is not required. A user can add a contact to their phone and simply have it pertain to the phone.
The ContactsContract allows apps to access the contacts stored on the device, which is only possible after the user gives permission to the app to access their contacts. There are apps that use this functionality to act as contacts managers (apps that display the user's contacts in a different layout). Some apps provide the user with the service of backing up their contacts online in case the user did not want to use Google (e.g. FullContact). However, the majority of apps typically read contacts for other reasons, such as helping the user find friends/acquaintances/coworkers/etc who have an account in their app.
To address the issue of how other developers realize an app's CONTENT_URI, they do so by reading the developers' documentation. If you are the developer providing content, then it is your responsibility to publish the necessary documentation in order to let other developers understand how to work with your app.

Message exchange between different instances of my android application

I would like to create an Android application that neeeds to communicate with same application at a different device from different users. The user will be logged into the application using his Google+ account and he will be able to exchange messages with his friends. Imagine it like a chat application without a server in the middle.
The problem is that I don't own a server so the communication must be based to any Google framework or it must be implemented from device to device.
Do you have any suggestions?
I don't believe its possible to connect two devices over the internet without a server somewhere in the middle, basically there is no practical way for the devices to find each other without some known location they can both contact.
Your server wouldn't need to be too complex/expensive for testing usage. The free tier of Google Apps Engine, or a $5 PHP hosting account should do it.

How to secure my application contacts like Facebook

When you try to retrieve contacts from device , you generally get contacts created by all applications except Facebook. This question describes it.
So , what would I need to do when I'm storing contacts through my applications(using ContactsContract?), so that other applications won't be able to retrive it through ContactsContract ..but they are still available to device contacts application... or to the applications that I choose ?
Facebook contacts are synced using a different implementation of the Contacts API. Google used to provide a special case for this, but no longer does. The different hardware manufacturers that do support it customize their Contacts application for this specific use. This is why Facebook contact sync works on most phones besides the Nexus series. These are private implementations, but I'm sure can be reverse engineered if you're willing to sort through lots of obfuscated code.

Android facebook passing information between users

I'm developing an Android game, and now I'm in the stage where I want to create a multiplayer option.
My task it to pass between two users on different phones an integer.
My thought is to do it via facebook, to enjoy all the social benefits of it.
Do you know what API's\technologies I need to use?
I installed the facebook SDK, but cant find the specific API's to do it.
Thanks Allot, Vlady.
If the two users play against each other (or with each other) then the best approach would be a P2P connection, that it the two devices should have a socket between them for passing messages.
If that's not possible for some reason, then the fallback would be to have a central server to which all clients are connected, this server will then route the message from user A to user B.
As for the facebook option, what's the point?
It's not what their api is for.
You can use the Achievements to publish user scores and such, gain more engagement and virality, but that's not for the communication between the clients.

Categories

Resources