Using Website Information Without WebView - android

I am very new to this, and I more looking for what information I need to study to be able to accomplish this.
What I want to do is use my GUI I have built for my app, but pull the information from a website.
If I have a website that looks like this:
(full website can be seen at http://www.atmequipment.com/Error-Codes)
What would I need from the website so that if a user entered an error code here:
It would use the search from the website, and populate the error description in my app?
I know this is a huge question, I'm just looking for what is actually needed to accomplish this, and then I can start researching from there. -- Or is it even possible?

What you're going to need is some kind of a web services api on the server you want to search. Then you can post http requests to send and receive information from the server.

you need to add the permision to access internet in your manifest file. Then use the android httpclient to read the website info. You can use the link below as a start.
http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/

Related

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.

sending information and getting response in android

In my app i need something like that.In my app a user can easily be a member by signing up.Now when a user become a member then he can communicate with other members.Suppose a want to send a message(same message) to all users, same location as he is.Or it may be something like that a user want to send a message(same message) to another 5 users whom he knows.
How can i do that.
I googled may times.I thought web-service can do that job.But i didn't right way to do that.
Can anyone how can i do that with references ???
You can refer following:
Simple PHP With MySQl(To get basics, No Interaction with Android)
http://davidwalsh.name/web-service-php-mysql-xml-json
One Demo:(Interaction with Android)
http://www.codeproject.com/Articles/267023/Send-and-receive-json-between-android-and-php
Good Tutorial:(Interaction with Android)
part1-http://guruparang.blogspot.in/2012/11/connect-android-and-mysql-via-php.html
part2-http://guruparang.blogspot.in/2012/12/connect-android-and-mysql-via-php.html
Best Tutorial (Here u can get All the idea):
http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/
Use parse.com
Download the sample app. The sample app works both locally in Android and on the server-side. It does the hardest part for you.
Just modify it to make it fit your needs.

How to search wikipedia with search string and fetch data, parse and disply in my app...?

all
I have searched this in google, but I confused with lot of sites which are no clear step by step procedure I found.
If any have Idea what are all the things need to be done. Please guide me...!
Thanks in advance.
This looks similar the demo app in "Beginning Android" book. There they will create the http request and will send data to the server. They will get a HTML response, in which they will parse the data and displays to the user.
The main problem is, if u hard code the tag names, in future if it gets changes, then your app may not work. So better check whether there is any library (jar file) available for the wikipedia app. and try to make use of that.
Regards,
SSuman185

TTS read from twitter android

Have an app that can use tts to read text messages. It can also allow login to twitter and post to the news field. Interested in possibly fetching data from the news feed and reading this out aswell, similar to the sms functionality I already have in place.
Have not seen any source or tutorials for this, other than an appinventor project that seems to do what I would like!
Anyone offer ideas how I might go about getting something like this working in my app?
You can create a client to read Tweets as explained here:
http://www.vogella.de/blog/2010/02/15/twitter-android/
And to read the news just use this class android.speech.tts.TextToSpeech

Categories

Resources