I need to know how I can import a Map that will allow me to receive a users location, this should be simple since there are lot of sites that ask a user "allow site to track" location but I new to java.
I need the output to say something like
User: 122312(Ip address)
location: 232 wood street (physical address on the imported map or google maps)
IP usually included in the request header but with that, you can only find out the country of the user (that might be wrong if the user is using the proxy).
If you want to capture the user location then you have to use client-side language such as javascript etc because you need to take user permission before capturing it if you are doing with the help of the browser. then the client side language will push you the latitude and longitude which will fulfill your purpose.
Best Resource to explain you the everything in detail.
Related
so let's say that i want to ban the country X from using my app, i banned it from the google play store but it can still be downloaded via VPN is there a way to ban this country using code (maybe trying to detect the user's location or something?)
my government has a very big problem with a neighboring country and i'll go to jail for like forever if i had users in it.
my government has a very big problem with a neighboring country and i'll go to jail for like forever if i had users in it.
There is no technological way that you can guarantee that your mobile application can't / won't be used by someone in another country. Anything that you do in your application can be defeated by a user with sufficient ingenuity / time.
You need to talk to a good local lawyer to find out precisely what your country's law means, and what you need to do to comply with it1. But if the law requires you to do things that are technically impossible, your safest bet may be to not write / publish any mobile apps. Seriously.
1 - It is unlikely that anyone here really knows. I certainly don't!
Locale.getDefault()
Gives you the locale information about the phone, this information come from settings and can be changed by user
but if you want ensure the user from specific country doesn't use you app just get the GPS position and in case of be that country close it
You can perform multiple checks like does a user's IP match banned country IPs, you can check mobile carrier, you can eventually make location check which of course will require user's permission.
I'm currently working on a native Android app for my company and ran into some problems with Salesforce lately.
I hope I can find some help here.
What I want to achieve:
The company has a lot of Accounts in Salesforce with 3 important fields for the app: Name, Business (Workshop or Parts Dealer) and location(latitude, longitude)
I would like to show those Accounts(Workshops/Parts Dealers) as markers on a google map in my Android app based on a radius around the user's current location. So it would be more than sufficient to get the data as JSON or XML(i read about sObjects, which would be nice too)
The app will be freely available on Google Play Store and every user should be able to see all the Workshops/Parts dealers around the world.
The problem I'm facing is that I can't find a way to fetch the data inside my app without authenticating every user with a Salesforce-Login.
Which API is the best to use in this case?
It would be so awesome if anybody could help me with this problem.
What I tried so far:
- SalesforceMobileSDK: If i extend SalesForceApplication() i always end up with the Salesforce-Login Screen.
It seems that every client has to be authenticated for API-calls to work. I tried using the method peekUnauthenticatedRestClient(), but this method only works on full path URL's(e.g. "https://api.spotify.com/v1/search?q=James%20Brown&type=artist"), which isn't really practical for my Use-case.
I feel like I read nearly all docs about salesforce API, but can't quite get my head around how to solve this problem, although it seems like to be a pretty common use-case.
would a salesforce-apex method which would select all records inside a set radius around the user's location to be accessible without authentication?
Thanks for your help in advance!
Roman
Try asking on salesforce.stackexchange.com. Your question is more about licensing model than a particular programming problem. It might even be the case that you don't really need Salesforce for your project, you'd be better off on Heroku (even free tier) if the login piece is an issue...
All Salesforce APIs require some form of authentication. If you're positive you don't want to hardcode "Integration user" credentials in the app and you don't want to pay for (self-)registered user licenses in your org...
Try to read about these:
Site - piece of Visualforce running under specific "guest user", letting you view & interact with SF data without having to log in. You expose SF data to the world but that means it's your job to handle security (if any) and craft the API. You want to really display the data to human? Or just return JSON content or what...
Sites are meant to be displayin some incentive to contact you. Your product catalog / basic order form. Some map of nearby locations. Maybe a "contact us" form. There's limit on the traffic so eventually they'll explode as your app gets popular:
Customer Community - typically you need named licenses (even if they're fairly cheap) to let your customers log in to your SF. You create a Contact, click magic button - boom, this Contact now has a real matching User record with its own license. Think of it as some kind of step up from Sites - it'll still have some limits but will offer more than just raw API access and you'll have better control on what's going on.
I am working on a project where I should develop an application to validate post addresses in Germany, Switzerland and Austria. For that I need to set up a address database with all information. But I don't know where i can get the data. I googled for a long time but I didn't find an answer for my problem.
I have 2 questions:
can I work with the rest service of nominatim in a productive environment? the application will process approximately over then 300000 request a day.
can I import an openstreetmap file (*.osm) in a DB (MySql) and work with that? ist there all the informations i need to validate addresses. such as streetname exists? housenumber exists? fit street to housenumber and town?
thans in advance
Achraf
Yes, you can use Nominatim in a productive environment. However not
OSM's public instance (take a look at the usage policy for the
reasons). Just install your own Nominatim instance or use one of the other alternatives.
That depends on the exact information you need. Some adress information are implicitly contained (usually address, house number), some others need to be calculated first (often the city, municipality, state, post codes etc.) because they are often not attached to the address elements directly but to administrative boundary relations instead. Nominatim does all of these processing for you.
Also take a look at other OSM search engines. And remember that OSM doesn't contain every possible address.
I have an URL (of a restaurant or a place), and I want to get the location (latitude and longitude) of that place using any JAVA API.
With Google Place API, this is possible only after querying the system and giving a description of places we are searching for. But all what we have as input here is the URL.
This is why solutions given here and here are not responding to what I'm seeking for.
One solution could be to find the address by looking into
Bottom Of home page (some sites put their address at footer)
Find address from following pages linked to the main page Contact Us, About Us
None of the above approach is guaranteed to retrieve an address ...but is one step closer.
Next option could be to lookup the whois to find the registered address. If you are a paid user of lookup service you may be able to lookup address for a particular registrar. But then, there are registries that keeps the address hidden (my own website has the address hidden, it shows the address of service provider).... so not always a success.
You can also lookup other services like Crunchbase, and any other directory service as a fallback.
So , let's say we assume you are able to get address of 60-70% websites with all techniques mentioned above. There are situation, where you will end up getting multiple address. You should have a logic to resolve to a particular address. Just think of getting address of Pizza Hut from pizzahut.com :-)
You can add more intelligence...but hope this is good enough to get you started on right direction.
I am trying to create an app to find the exact location of IP address. I did some research on IP addresses and many more. But whenever I try to locate an IP address it provides the location of Internet Service Provider. I want to track the exact geolocation or long & lat of that place. So can anyone help me out to let me know how to find the geolocation of Dynamic IP address
The information upon which such a service might (hypothetically) be based is not available. Ergo, the ISP level information is about as good as you are likely to get for wired IP addresses.
#salocinix wrote:
"The exact position of an end-user's IP is only store at the ISP database and is normally not given away."
The second part is definitely true. They don't and shouldn't give away details about their customers' physical locations. There are obvious privacy concerns with doing that.
But it is quite possible that the ISP doesn't store the customer's physical location at all. Certainly, there is no need for them to store it in the form of longitude and latitude. Whether they need to store it depends on who owns the wires. In Australia for instance, many customers' ISPs don't own the wires that carry the traffic to the customers' dwelling. In that case, the ISP (in theory) only needs to know the billing address for the customer. And then there is the case of ISPs who sell internet connectivity for mobile devices ... where the physical location of a given IP address can change on a minute-by-minute basis.
... just asking because google maps shows the exact location of my PC on map how does it work
The PC is most likely geolocating itself via a combination of GPS and triangulation of local wireless base stations.
The exact position of an end-user's IP is only store at the ISP database and is normally not given away by the IS-provider. Try out the following link, you'll not achieve much more precision.
http://www.iplocation.net/index.php
I urge you to read the following thread on NANOG which was written by Fred Baker of Cisco, author of 50 network related RFC's.
Well, let me ask you you think 171.70.120.60 is. I'll give you a hint;
at this instant, there are 72 of us.
Here's another question. Whom would you suspect 171.71.241.89 is? At
this point in time, I am in Barcelona; if I were home, that would be my
address as you would see it, but my address as I would see it would be
in 10.32.244.216/29. There might be several hundred people you would
see using 171.71.241.89;
Geolocating is gimmicky at best.