How to edit Android Apps Content through Website ? - android

Is it possible to edit contents of an android app through web site? For example, contents in a page (videos, texts) & layouts (location, size, colours).

Yes it is possible using like Client and Server approach where your Android app works like Client and your Website is like Server.
You can first download a data and store that data into SQlite and whenever you open a application every time app request to Server asking for New data.
You an achieve this using Sync Date & Time. Like whenever a website update there data then change Date & Time and when your request New data will check Date & Time. If Date & Time change then your app show update data message or New data available message. In this way you can achieved.

I think its not possible directly but sounds like you are about to use wrong pattern. The right pattern is a client-server one, where android app is a client and website with REST or any other custom API is a server. Application should request data from server and display it in a way you set up. So you will edit any data on a server and your app will receive changes on request.

I am not sure what you are trying to do but with any UI field, you can code it programmatically. So for instance, you have a button and want to be able to change the text on it, you can technically do this via a website:
You will need some sort of database management system that will control the content of the app. The app will just have to call the database to get all the data/fields it needs. You will pretty much be making a content management system for your app.

Related

How can I change content of my app after it is published without updating version?

I want to make an android app that will display mess menu of hostel. The menu will be changing every week so how can I change content of TextView once it is installed in user's phone .I considered WebView but I want better alternative . I think I need some cloud based service here . What are some good resources to achieve this.
Just do a Simple REST API and then every time you start your app call your api to retrieve the information, for example
yourdomaing.com/api/menu/getmenus should retrieve a Json with every item on menu.
You have plenty languages for making a simple rest api
check this related link
Examples of REST APIS
You can store your data (Text/Media) on firebase,It is very easy to start and then enable firebase offline functionality so that it is not required to download data on each launch of application.
Update data on firebase and add valueEventListener in your activity to get that data.
An alternative could be Firebase (by Google).
It's a free and real-time service. It allows you to change the content while the app is running. See "real-time database" and "A/B testing" in Firebase.

What is most simple way to send notification of unexpected events to users of Android application?

For example I expect this kind of situation: data in my application lost relevance and so it usless until update. And until update it have to show users some predefined message.
Is here any simple and free solution to this task?
Guess I can use some server to somehow send simple messages... but it sounds way too complicated.
If this is important I use Xamarin.
Update: main difficulty here is fact - my application can't in any way define if it's outdated or not. This may happen in random moment.
Although the requirement is not very clear I assume Update here means app update.
each time user launches app make call to an api on ur server to check if user needs to update app
If that returns true take user to a static view that says app needs update and redirects user to google play to install updates
If you want to avoid using a server, you should try Firebase (https://firebase.google.com/). More specifically, you should use Firebase Remote Config (https://firebase.google.com/features/remote-config/).
Define in a key-value pair of something like minimum_app_version_required in Firebase Remote Config. Every time user opens the your app, compare the values of app version and minimum_app_version_required that you are getting from Firebase console and show a dialog box accordingly. You can also change the value of minimum_app_version_required anytime you want.
Just set some internal flag. That when that situation occurs, you can set the flag to true and just edit whatever layout element you are using such as listView or any other element with your predefined messages saved in strings.xml. You can also build any custom pop up screen, depends how you want to show them. Let me know if you didn't understand or exactly how you want?
Need to implement versioning for this problem. To achieve this, you have to maintain a version number in server, this is the version number you app will have to save and use it to validate with server. If both are not same, then app will get the latest data from the server.

Android changeable database content via internet? (like news apps)

Hello I am beginner to Android development so I want to ask how to create dynamically changeable database (content) in Android?
I'm aware of sqlite shared preferences but how can I interact with them via internet and add new information like news apps? Could Parse help?
This is not a answer, but a comment rather, I don't have the 50 rep required to comment.
It all depends on the sort of functionality you want to achieve. I.e. do you want to be able to push new content to the device using the internet such as push notifications.
OR
Do you want the app to make a http connection to a api or your own news service on startup or on button press for example?
UPDATE
Ok you have decided you want something similar to option 2. I am not going to write code for you but I will point you in the right direction and if you get stuck, post a question.
Please take a look at:-
https://play.google.com/store/apps/details?id=com.rsoftware.news
If you have decided this is what you want or similar, this application uses an API calling infrastructure.
The API they use is called FAROO.
http://www.faroo.com/hp/api/api.html
I suggest reading the documentation, deciding if this is indeed what you want, then sign up and get a API key. Afterall it is free! enjoy coding, enjoy the errors that you will receive and persevere =).
How to make a API call
I suggest when using a API, test the queries through the browser first of all or use something like Runscope for testing their services. So first get their URL which is:-
http://www.faroo.com/api
If we were to go to this url we will get a 401 response code, which means unauthorised. This is because we haven't added our unique API key to the html query. So this url can take parameters. We simply append a ? to the end of the url and supply the parameters that FAROO offers such as:-
q which stands for query (what do you want FAROO to search for?)
start which is the number it should start from
length which is the number of results you want FAROO to return
key which is your unique to make the requests
etc etc...
So an example of a complete url would be:-
http://www.faroo.com/api?q=iphone&start=1&length=10&l=en&src=news&f=json
This url is for demonstration purposes... your own url will have a key=YourAPIKey
Also notice how the parameters are separated by & symbols i.e. q=iphone&start=1 so this part q we know stands for query which is iphone & start=1 & so on.
Hope this helps.

Put some values on internet to access from android

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.

Android JSON user registration

I'm in the process of building an Android application that interacts via a JSON API with my website. I've basically got everything together except for user registration on the app. I have an idea on how I want to implement it, but I want to see if there might be an easier way.
My approach is:
When the RegisterActivity is started, display a loading indicator, and make an asynchronous JSON request (via google-gson) to the server get all the fields needed for registration.
When the listener receives a response, populate the spinners, checkboxes, etc. with the possible registration field values.
Allow the user to complete the form and submit via JSON.
You're probably thinking, "Why don't you just store the possible registration spinner/checkbox values in the app itself?" The possible values for each field will be changing over time as I continue to test/push the product, and I don't want to break a build simply because I added/removed some possible options on the server. This is why I'm dynamically building the form based upon a JSON request.
Given that, I'm wondering:
Am I thinking about this the wrong way?
If this is a good approach, is there a JAR or sample implementation someone has out there that already accomplishes this?
You could always just use a WebView and have your registration page written in HTML and hosted on your server. That simplifies things dramatically.
http://developer.android.com/guide/webapps/webview.html

Categories

Resources