File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes How can i get details a location in android? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "How can i get details a location in android?" Watch "How can i get details a location in android?" New topic
Author

How can i get details a location in android?

fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
I want to get the branch details (such as phone number, address etc.) as a JSON encryption and send a HTTP request to a link. But, I don't know how I can get details of a location? How can I send JSON to the link for encryption? And everything about a location!

Please give me a link or document and help me.
Cheers.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
I'm afraid it's not clear hat you're trying to do. What is "the branch"? What is "a link"? What does JSOn have to do with obtaining a location (of what?)? And so on. Can you rephrase the question and provide a higher-level decription of what you're trying to do?


Ping & DNS - my free Android networking tools app
fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
Ulf Dittmer wrote:I'm afraid it's not clear hat you're trying to do. What is "the branch"? What is "a link"? What does JSOn have to do with obtaining a location (of what?)? And so on. Can you rephrase the question and provide a higher-level decription of what you're trying to do?


I have a text box and user writes name of location in text box. I should give name of location and details of location(such as address, phone number and ...) show in the screen.
my question:
How can i give details of location? I think details a location is JSON and i should encrypt this but i don't know how should i do!!?

Thanks. If you need more explanation and if i explained not clear, please tell me.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
So you should implement a REST call to a server that takes as input the name of the location, and which will return the details of the location in a JSON format?

Do you really need to encrypt it? Or would making the connection over HTTPS suffice?

If you search for "android RESt connection" or some such phrase you 'll get many results.
fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
Ulf Dittmer wrote:So you should implement a REST call to a server that takes as input the name of the location, and which will return the details of the location in a JSON format?

Do you really need to encrypt it? Or would making the connection over HTTPS suffice?

If you search for "android RESt connection" or some such phrase you 'll get many results.


Have been told to i, i get name of location of user and show details of location. Have told to i, for getting the branch details as a JSON encryption, send a HTTP request to Link "http://xxxx.com". What should i do for this purpose ? Do i search android REst connection for this purpose? Do i read http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/ this link for JSON encrypt is good link?

Thanks. Cheers
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
The first thing you should do is to stop using the phrase "JSON encryption" - it does not make sense. JSON is format for exchanging data that is frequently used for REST WS; it has nothing to do with encryption. So you need to go back to whoever gave you this task to find out what you need to do for encryption. If the WS already exists on the server-side, then you need to talk to whoever implemented it to learn the details of how to access it, or read the relevant documentation (assuming it exists).
fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
Ulf Dittmer wrote:The first thing you should do is to stop using the phrase "JSON encryption" - it does not make sense. JSON is format for exchanging data that is frequently used for REST WS; it has nothing to do with encryption. So you need to go back to whoever gave you this task to find out what you need to do for encryption. If the WS already exists on the server-side, then you need to talk to whoever implemented it to learn the details of how to access it, or read the relevant documentation (assuming it exists).


Thanks for answer. I will ask this. What is REST WS?
If i want give JSON and show details a location in screen by myself not by a URL, should i read Rest connection or something else? Is it useful and relevant(http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/)?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
That link doesn't look particularly useful; it deals with Google Maps and Places, which introduces a lot of complexity that you won't have to deal with.
fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
I got it how can i write this program for show details of a location through JSON. I write this program by help http://developer.android.com/reference/android/util/JsonReader.html but when i run the program, the program not shows log.i that i add in readMessage function . I guess, the program not read readJsonStream function and ... but why? I googled and i wanted use GSON(http://stackoverflow.com/questions/7939632/gson-jackson-in-android) but i did'nt understand what is "input.json"? I want read JSON of a URL.


 
Don't get me started about those stupid light bulbs.
 
subject: How can i get details a location in android?