• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How can i get details a location in android?

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
fahimeh hashemian
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


reply
    Bookmark Topic Watch Topic
  • New Topic