How android sqlite databse will update in android market? - android

Currently I am working on android e-commerce project, I am using sqlite database to store data.
I need to update my database each and every time. My question is if i upload my app in android market, how can i update my database every day.I know about android versioning concept if i update version of the my apk , how people who are using my app will know that my app is updated.
Please give me a clear idea on this . Thanks in advance.

I have a better solution for this problem. It will be better if you host a web service that will serve the update information. You can do it for free. GoogleAppEngine provides this feature. Serve JSON file from web, parse it in you application. Each time your app launches, write code to check for update information. OR check once in week or some other strategy. This might be tougher way of doing but you can provide more efficient and flexibility through this.

if i upload my app in android market, how can i update my database
every day
You can do this stuff using Web services call to your data server .
now you might have a question in your mind about users devices battery ,
if you continually call those web services your device battery gonna loose lot.
or
if you call this web service in some specific interval then app user might miss the actuate time when data has loaded already .
so i suggest to use GCM for could push notification .
How its works in your project :
When you data will update on server , then there should be one script on server side which send message to GCM server with some required field of identification of that application package
when you device receive that message using your GCM receiver you may need to update your database as you did so far .

Related

How to send update to a mobile app (Android & IOS)

I've a made a really basic chat application(no need to see the code)(from the course of Angela Yu, flutter)it is integrated with google firebase which uses firebase_core, firebase_auth & cloud_firestore packages for authentication and uploading chat data in cloud Firestore.
I've installed the app through debug.APK( 1. would it matter if it was release.APK?) in my & my friend's phone both android ( let's take a neutral approach i.e the phone could be either IOS or Android).
What I aim is if I change my code( or we say update my app) I would want my app on both the phones to get updated( either automatically if possible or send a alert when user opens the app to update it), all this should be done with free of cost. 2. How can I achieve this in simplest manner?. I know there is a standard way for this if the app was in Google play store or App store but I don't want to upload it on stores.
My guess for this is that we integrate our app with a server so that every time the app starts it checks for a update with the server and ask the user to update and gets updated. If this is achievable can someone please guide me with these two methods mentioned below:
3(A). through free online server( can we use github or firebase?)
3(B). and can I make my own laptop as the server and code the app such that it doesn't need the server to be always online.( as in if my server is online it checks for update else it continues)
3(C). through paid servers ( just for information)
(4) Also please tell me why we chose cloud firestore over real time database for a chatting application?
(I don't want to create a web app)
I've no idea how would any of this be achievable like nothing like what server would be used or is this even possible. So please help me with a detailed explanation on all( 1,2,3(A),3(B),3(c) ). Any help would be really appreciated!
Since you already use Cloud Firestore, consider creating a document in there with a field that contains the version number of the latest app release.
In your application code you then read this document upon startup, and check it against the app's own version. If the version from the database is newer, tell the user to upgrade.
You could even include instructions on where/how to get the latest version in the database too. That can come in really handy of you suddenly have to change your release mechanism in between versions.

android send data to device?

we have an application under xamarin where a user connected and on a login the user DOWNLOAD the work he make it.
Device call our web service and device downloaded the datas in json format.
The data downloaded are saved into the database sql lite on client.
All work fine.
Now imagine this sample :
user has connected on the device, downloaded work.
But afer some hours, the work has changed for some reason.
We need to send new data (new work) again the particular device.
I've read some article about the google push notification but i wonder if i search on the right place.
How i can send data to a particular device under android ?
Could you share your experience, article , sample..
Thanks for your knowledge
I've read some article about the google push notification but i wonder if i search on the right place.
There is a realtime database on Firebase that will fit your requirement. But it is a cloud based service, using it probably means you have to move all your data from your server to Firebase server. So it is not a good fit, if you want to use your own webservice.
Other option is to use an AlarmManager to set a repeating task to sync your data periodically.

Updating an internal SQLite Database after the app has been published

I am very fairly novice to AndroidStudio and want to create a project of my own.
My question is:
Can you update a Database outside of republishing your app?
Say I have published the app and the Database is currently empty. Then later I want to add some data How would I add this data to the DB without having to change fundamental source code, or redevelop the app? I am using SQLite.
I would like to publish this application as a Network app. That is I want all users to view the same information from "empty" Database and whatever is populated. Could you guys give me a direction or a minimally functional example of Network apps / their requirements. I have never used or developed them before.
END_RESULT:
Users should download an app (this app) and be able to be able to collect news added to its feed.
The maintenance crew, should be able to add/populate the app via a database reasonably without having to redeploy the app every time new material is added.
You would have to implement some kind of server backend that your app communicates to in order to download new data. The app must already have logic for how to process that data and store it locally in SQLite, but that can be fairly straightforward. As for how to sync or download new data, there are several possibilities.
Perform a sync when the app starts. You may or may not want to do this if you are using some other (periodic) mechanism.
Schedule periodic syncs with JobScheduler. This is a good practice in that JobScheduler doesn't have to run your task at a specific time, it can run it within a certain time window so that your task coincides with other apps that need to run tasks. Since your task would spin up the radio and make network requests, the system can let other apps that need the radio also run at the same time to reduce the number of radio wakeups (and thus be more battery efficient).
Implement Google Cloud Messaging so that your backend can send a push notification to your app, and your app can receive this as a signal to perform a sync.
Note you aren't limited to only one of these.
Yes you can, if you add Realtime Database.
This is a database hosted on a server instead of directly on the phone, which can push informations to clients to synchronize new data on them.
Otherwise, you need to update the app to get new content.
One wonderful tool to achieve this is Firebase.
https://firebase.google.com/docs/database/
This is a very broad ended question and as such difficult to provide specific answer to. What do you mean by 'updating a database outside of republishing your app' ?
Do you mean update the database schema - YES, it can be done.
Put data into database - Yes, the app owning the database can do it anytime based on it's business logic.Which means the source code to insert the data should already be embedded into your published app. Only thing that should be decided on the fly, is when to execute this code.
Normally for a networked app, it's a norm to refresh the data when the app is launched. This means you can put a network call in your app's main screen launch and download whatever you wanted to download and put it into database. Your maintenance crew can put the data on a server and let the app download it.
Android has a plethora of network libraries and the choice depends on what kind of content you are downloading. Will suggest to try out Volley (Official from Google) and Retrofit (If you want something slicker)

can i setup a wamp server with a db on my pc, to continuously update my android app's database?

Hey guys i have a basic question,
I want to know if i can setup a wamp server on my pc with a database, for that when i update something on the database on my pc, it automatically updates the database on my android app via internet, and if it is possible
im planning to put the app on the googlePlayStore, and i want to know if the users who download the app will be able to update the database of the app also thru my server.
im making an app with a db of contacts, mostly taxi services and i want to be able to update the contacts of the db thru an online server, in wich if i change a contact the user will click on the UPDATE_CONTACTS button, and i want the app to automattically check if the server is online, and if it is, UPDATE the db's on the app.
but i want the server to be on my pc, can i do it thru a Wamp_Server app, or do i need to install Windows_Server?
Thanks in Advance for all Answers!
Regards.
Yes you could use a WAMP server, along with Google Cloud Messaging to accomplish this. Create an account and add the API to your server side logic. Once that is complete, implement GCM in your app.
Check out how to implement a GCM client in Android for information on how to do this.
You'll be able to use push notifications from the cloud to send data (retrieved from your server application) to your app via GCM.
Hope this helps.
I think that there's a better solution:
Create a JSON file;
Store this JSON on the cloud;
Read this JSON every time your app starts.
So, your app's users always will get those contacts up to date, without any efforts.

android app gets updated via internet

I want to make an android application.i.e.It's a quiz application.
Like after publishing my app I added some new question.
I want when user get connected to internet application should be updated.
So how can I update application from internet?
Do you have the data held in sqlite within the app? If so, you could look for updates to data on the internet (presumably on a website you already host) everytime the app starts. Do this in an async task so that it doesn't affect the user experience.
If newer data is found, you could fetch it and update the sqlite tables in the background.
Data bundled with app : If you compile and upload a new apk file to play store, update will show in users play store. This is good for occasional updates, like a new version of app or so.
Data not bundled with app : you can make your app fetch its question data from a remote server. This is easier for very frequent updates, like you add questions daily on a web site. But you will need a server.

Categories

Resources