I am new to the mobile development. I am taking online classes and researching, but normally is it a requirement to have a backend database to store information for a mobile phone app or where is data normally handled with phone apps? I'm thinking of even simple examples of storing phone call logs or task items for user retrieval. Also authentication, when setting up logins, would this happen normally from a backend database or authentication server that the app creater needs to maintain?
THank in advance
Typically back end data is stored in a database in a server as done in web apps. Then you will expose the data using an HTTP based service (e.g. ASP.NET Web API) so that its easy for JavaScript to communicate with the service. data is commonly encoded as JSON transferring data between the service and your app. Now your mobile app will take data from the service and display in the UI and for updates data is send to the service and the service updates it to the database.
Related
So I have a project that I'm making which is An Android Application, which takes provides information taken from API Server (Laravel 5.x) and also provides live-chat feature
What I'm not sure of doing is how to handle the live-chat feature. Currently here's how the chat system works (keep in mind, there is also a Web App which provides the same feature, that I'm willing to change) :
User type chat and sends it. The client (Android app or Web App) sends it to the API Server. which then saves it to the database.
Then the API Server (which is connected to mysql database server) sends in email / notification which based on the other user's configuration.
When the other User opens the chat, it will call the API Server (which is connected to mysql database server) asking if there's an update every 3 seconds.
if there is, then (Android App or Web App) will show the new chat.
Now first of all I know that this is not efficient, bad on performance, etc.
Now I want to try and use firebase database for realtime chat.
Now, I really want to use the API Server for logging and storing Chat info inside my own database because of some legacy Android App which takes a long time to work on.
which is the better scenario :
The Android App directly sends new chat information to Firebase Database
The Android App sends new chat information to API Server. Then the API Server sends it to Firebase Database
Is there a better way to do this
so which is the better way to do this?
I would highly recommend using the firebase firestore. It sounds like it would solve the best of both worlds. Nosql json storage format is great for a chat app. Also the data is "live" so it will loosen for a change and update the user sides data. Saving you the 3 sec call resources. Last I checked it was still in beta but I used it top make an app that lets you create plus and live pools and it wad pretty smooth. It does take a bit to wrap your head around though.
Currently, I have an App that sends data to web server.
But, if website sends data to the server, my App does not receive any data from the server.
I want to create an app like Evernote where I don't have to refresh the app to receive data from the server.
So when I sends data from mobile, it has to sync with all other devices.
How do I implement it?? Which method is best for android?
Is GCM the only way to do it?
We need more information regarding what you have tried implementing for us to provide a better solution since your issue is about code implementation.
You may check Firebase Realtime Database as this seems perfect for your situation because with Firebase, "data are synced across all clients in realtime, and remains available when your app goes offline". Since you are using Android, you can check this document: Set up Firebase Realtime Database for Android.
I am developing an android calendar app which will enable users to view, create, update and delete their events. To improve user experience and performance i have adopted a Content-provider centric design pattern which was recommended during Google IO 2010 conference on Android client application. I have successfully implemented the client rest service that create, update and delete events parsed from the content provider to a Restful web service written in PHP but i need some ideas on how to implement the get request in order to prevent data conflict and maintain accurate persistence on the client side. The restful web service returns a JSON payload of all the event based on a user's id, so i want to store these record in my content-provider with not conflict (is more like a sync). For instance, if a user re-installs his app, how do i ensure that the data already stored on the server is persistent which the application's content provider (which has a local SQLite database). A more basic explanation is populating the content-provider with non-duplicate events after the application is re-installed or an event is added directly to the server. Thanks in advances.
I've a game application, which shows the final score of a user on finishing the game. At a time any number of users on different device can participate in the game. Now I want a mechanism by which a user will be able to see the score of other players on submit in the order of their scores.
For this I've figured out that the data of each player need to be sent to server(asp web service in my case) and the server will push the data of all player to each device. Which method out of http post, ksoap2 will be applicable for this and how can I do this? I searched on the web, I got the way on how to send data to the server using post method but I don't have idea on how to get the data on server and send the data to the app.
Approach is simple
From game app submit scores to a Serverside component (Restlet if it REST)
Expose this as Service (with various option get/post/update/delete)
Serve the scores based on the request
Have a module to comunicate with the Service, RESTClient in Android App
To push messages to other android clients from your server, have a look at Google Cloud Messaging for Android. This way you can have an event on your server that pushes out messages to the clients when changes have been made by other players.
I am developing social networking app on android.Rough idea of my app is that when user launches an app it will get all users of this app in near by location.So for storage purpose of users data I want to use web server. I don't have an idea what is best way to start with.Should i use Amazon web services ? (S3,Ec2) I was surfing internet got these buzz words.
Please guide me what is best approach for database storage ? Should i write my own server api ? or What ?
These are some general things you will have to do:
Buy some server space where you can host your server (this is the amazon ec2, etc). If you need a fancy domain name, buy that too, and map it to IP address of the server that you brought (optional).
Setup a db of some kind on this server to store your data (msql)
Write wrapper web services (php, jsp, etc) which will expose apis to access your data remotely. For security reasons, you should also have some authentication using some token passing mechanism.
Access the data on your server remotely using the APIs you created in the web service.
I personally favor using a MySQL database with PHP to interface between the app and the backend! Your app can send requests to PHP and then your PHP webservice would write/read to the database and then return JSON to your app.
I would say this is a very subjective question though as there as so many ways that you can write a web service.