I have to create an app which shows a list of categories with products attached to each category.
The owner of the app uses this to inform customers about his products so there will be updates to the products every week.
Now I'm struggling how to create this app because there are a lot of options to do this, but I want to do it right of course.
So I was thinking about doing the following.
1. Creating a simple webapplication where the owner can manage his products and add/edit/delete them the way he wishes.
When changes have been made he can push a button "publish" which creates an xml file.
2. When the app is started and there is an internet connection, the latest xml will be downloaded into the device and the app will list the categories, products from the xml.
THe xml will be stored so that there are data to read when no internet connection is available.
Is this a good workaround? Or would maybe creating a webservice be a better idea?
But then the user should always be connected to the internet.
Some good advise would be welcome :)
A internet connection should be available at any time, and if not it should not be the problem for you to cover.
But if you want to catch that case, you'll need (or could use) XML to persist the latest data to the device, in case your app has to start up without internet connection.
I would think about a RESTful WebService, since you can add features with ease once you have it runnuing (that could get tricky of course). Here is a tutorial you could use: http://www.vogella.com/articles/REST/article.html
Related
I am creating an android app that can be used by common users and also admin.
Suppose, if admin adds a new place name, that name should be added to database and when common user uses the app, he should be able to see the place name that is added.
I used MySqlLite database. But the problem is that if the app is uninstalled all data is lost. So I want some persistent data storage in which all the places that are added by admin are saved permanently.
Regards,
Sindhu
With the data being needed across multiple devices, your only option is to create/use a backend API.
Parse would have been a good choice but since that is getting shut down soon then it wouldn't be wise to use that.
Take a look at these alternatives here
You could also write one yourself, but unless you have some experience in that sort of thing then it will take some time to learn.
I am new to this development process please help me out. I am developing an application in which i have a list of words under a user profile.
Let us suppose i have two devices A and B, both want to share their words-list with each other.
If A is sender then B act as receiver and vice versa.
So how can they communicate (Share Data) with one another using wifi direct without internet connectivity.
I have reached upto level that array of words created now i donot know how to proceed further client and server in same app. stuck in problem
Any Example will be appreciated.
You may want to use solutions such as Parse ( it is closing now, but you can still setup you own server). You make queries as with ordinary database, but can save/fetch data on any device (android/iOs). It also has good sample project and comprehensive documentation (https://www.parse.com/docs/android/guide).
I want to build an android app, that when you put your phone on nfc tag, the app connect to server (I suppose database will be in web server) and get the data from database, and when you put a phone on second nfc tag it connect again to server, but this time gets diffrent data from database(must be there new database).
So basically I' am new to servers and databases and if this is posible what I mention above or at least a similar. Can you provide me with some tutorials that I can learn from and will help me build this.
Please go through the following link,
http://developer.android.com/guide/topics/connectivity/nfc/index.html
It has all the tutorials on how to utilize NFC on Android. It has certain API's available as well which you can use. The part where first it does a different operation and the next time a different one all depends on you on how you deal with it. You can write a condition based on a boolean value to see if its a first time or second.
Hope this helps.
I am creating one Google Fit compatible App. My objective is to store Google Fit data using HistoryApi, and provide kind of Back Up- Restore functionality to user. If user buys new Android devices then he/she should be able to BackUp(sync) old data using his/her account.
I need to use Custom Data Type, as Public Data Types doesn't meet my requirements.
Everything works perfect, I am able to insert data and read data using History Api.
But When I try to read data from Another Android device using same Google Account then data is not available to read there.
My problem seems similar to this Custom DataTypes not synching between devices
This statement from Google Fit Document is not clear to me.
Custom data types are not available to use in other apps. Only the app
that creates a custom fitness data type can use it
source : CustomDataType
Q-1) What does it really means ? If I have an app GoogleFitDemo installed on multiple Android devices, then is it possible to sync data between this same app between multiple Android devices ?
Q-2)Is it improper way to store and backup data using Google fit ?
Update:
Finally, I found that Custom Data Type can also be synced normally, same as other Public Data Types. I had the sync issue as mentioned by #Ifor. Sync functionality is still buggy. In some scenarios sync stops working, and sometimes synced data is inconsistent across multiple devices.
1). My understanding is that same app same account but different devices it should work. Having said that sync is notoriously slow (hours days...) and has been buggy so it may be hard to tell if you have it right or not.
2) There are better backup methods... But if the data fits in with the rest of the stuff Google Fit is about and is not too big then it's probably ok.
In my app a user can (only) see the values uploaded by admin.
For example. A salesman is using the app will be able to see the latest rate provided by the manger to trade.
Now the question is "where to put these values?"
I have .net webservice experience with android but I guess it wont work in this scenario,will it?
Any suggestion that the returned result be in (preferably) XML format.
It sounds like you already know how to do this. You can download and parse xml within your app. If you alreayd know how to set up the websever, the rest is easy. Limiting who can see what is just a matter of associating specific transactions with an individuals account. Then just have the phone check for updates on that transaction when the app loads (using someting like AsyncTask) or if you want to get more complicated you could push notificatinos using the android cloud service, or even use a REST model. More details are needed for a more specific answer but you can do what you want.
You can do it on your own, and build a webserver with a MySQL/PHP JSON API or you can use parse.com for a smaller project.