Post from android to web then get result - android

I need your help
please i'm trying to build and apps that i can from it to post the number of a car in the web, then get the result to know if i have a speed ticket or no.
But i have a problem in posting the number from the apps into the text box that are included in this website.
please can you tell me how can i do it
this is the web
http://apps.isf.gov.lb/speedticket/speedticket_ar.php/
Thanks for your time

I think your goal should not be to post it in the text box, but rather post to the form's target URL the value for the variable named in the text box using an HTTP_POST call.

Related

In android studio with java How to load web text as string from an activity for Android 6+ devices

From an Activity, How can I retrieve code or text from a website and display to the user ? I'm having difficulties programming back to Android, now developing as for Android 6.0 and newer. Getting deprecated about http client etc.. so I need a little of help.
Can you paste me some code example including "imports" in order to when the app load, from an Activity class, and also when a user click a "button1", to retrieve the text displayed from a web say "yahoo.es", and show a message to the user with the text from the web (loaded and parsed to a string) using Toast.
Help much appreciated in advance
Firstly you are way too ambiguous about your question. Correct me if i am wrong, what you basically want is to get data from internet and display them to user. Right.
If Yes, then the best way to do this is to get JSON response and parse it to display the relevant information onto the screen.
Take for example, you want an App displaying current Weather status of a city.Then to get the Weather data from Internet you need to connect to those websites which provide you that data.
Now one such website is OpenWeatherMap.org. You can use its APIs to retrieve data in JSON format and then display. You need to go through its API documentation.
This is link which will explain you the full process of connecting to an website's API, its retrieval of Data in Json format and ways to render and display them on screen effectively.
https://www.udacity.com/course/android-basics-networking--ud843
Hope it helps.

Sending user comments on Email in android studio

I am trying to make a "Contact us" page where I am taking user comments/ Suggestions along with their name and email and want to send them to my gmail account. I don't want intents. I have read the documentation on Java API but they are sending a hard coded message "Hello World"
I don't want that. And I have no idea how to achieve the task I am trying to do. Any guidance and help would be appreciated.
Update: I have tried the tutorial http://www.edumobile.org/android/send-email-on-button-click-without-email-chooser/ which sends the automated email on button click. I dont want the hard coded message. I have made the layout and want to send the message entered by the user along with the email, name and phone number to my gmail account. I am new to android so I don't know how this will be achieved. I will appreciate any kind of suggestions and help
Contact us layout
Please refer this link http://www.edumobile.org/android/send-email-on-button-click-without-email-chooser/ again.
They are not sending only hard coded message but as an example they have taken TextView with 'Hello World' , you can use any controls that you want like EditText and when user will enter those details then get the values from EditText and do the concatenation of those values and make one string,store in a variable and use that string to send in a email as body.
You just have to change the value in below line in SendMail AsyncTask class' doInBackground method
m.setBody($body_variable);
I hope this will help you , Feel free to comment.

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.

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

Getting the url of the android default browser

I am trying to create an application in which will be notifying the user about the phishy websites.So for this i need to get the url which the user has opened in the default browser.
After a lot of google search and stackoverflow search i am not getting any idea how to develop the app.Can you guys help me ...how i could get the url entered by the user (just want the url accessed).
Or any other way round to develop this type of app in android.
Any help would be highly appreciated.
Maybe you can proceed the following way.You can read browser bookmarks.Then see the arrange pattern of the bookmarks.Maybe it is sorted according to the accessed time.So you can get what you need

Categories

Resources