I'm trying to figure out how to request another Android device for permission to access its location. Maybe through some link on a SMS to launch Google latitude?
The point is it should be instantaneous, like a Notification or an SMS.
What would be the closest strategy you can think of?
UPDATE:
Thanks guys for all your answers. After considering them all I am still a bit confused about what strategy to adopt.
Probably is better to tell you what I'm trying to implement:
Someone is going to pick you up. You send him a request, he accepts and the app shows you how far away he is and how long it will take him to get to you.
I didn't want the receiver to be forced to have the app cause it would lower its use. I guess that requisite could be dismissed.
Sorry for the confussion.
If you don't want the receiving user to have to install an app, you could send an SMS with a link to a website you control that uses web geolocation APIs to report position: http://dev.w3.org/geo/api/spec-source.html
The user will need to click the link in the SMS, then they will be prompted to allow the page to access their location. This will work not only on Android devices, but on any device with a browser that supports these APIs
It depends on how heavy duty your apps are.
If I were you I would write a system where the Apps would maintain a connection to a central server. That way your Apps can be notified the moment that anything happens. It could also be seamlessly integrated allowing your App (make sure you ask permission to allow it initially obviously) to send location data when requested without any interaction.
This is obviously more battery intensive for such a simple operation, but that is the best way to get instantaneous notifications.
Another way you could do it is to simply send an email to the recipient with a custom URL scheme.
Such as:
yourlocationapp://get.location/respond.to
You could parse that kind of URL in your App by setting:
<data android:scheme="yourlocationapp" />
In your intent-filter.
This requires more in the way of user interaction though.
Related
Hey does anyone know if it's possible to intercept incoming calls via an app for both IOS and Android (no jailbreak) then based on certain criteria the phone takes action?
Have already read a few posts saying it's not possible however they are quite old, anyone know of anything new?
Thanks!
The short answer:
On Android: You can do this, but this may require special treatment for different vendors and/or OS versions. It won't be simple to support all (or at least most) devices, but with a lot of manual trial and error, it can be done.
On iOS: It's not possible locally, as Apple sees it as an invasion to the user's privacy.
The (slightly) longer explanation:
What is possible, for both iOS and Android, but will probably require a lot more work and external support than you originally planned, is to divert the calls via a server. This way, when someone calls you, the call is "stolen" by the server (which the user has to manually allow when installing the app) and the call is received on your device as a VOIP call, allowing the app (on the server side) full control over the call (which ones are actually received on the device, what's played, how long, recording, etc). You can see this app for an example of how it works: https://yallo.com/.
I hope this helps. Good Luck.
I've seen some "app locking" solutions in the Google Play store and I was wondering how those apps work. I'd like to build something similar.
I realize that this might require some special permission or maybe request the app to be added as device administrator.
Is there some broadcast that is triggered just before an app is launched that I can intercept and do some action (e.g. launch an activity that will request the user to fill a password)? I've read some lengthy discussions how this is not a good idea and the only idea is to have a background service that will continuously poll the running processes and check for changes, but I think retrieving this list every second and checking it for chances is not good for the battery and I think other app locking apps out there must be using a different approch.
If possible, without the need for a rooted phone.
I want to be able to have the user press a button in the app that disables sending texts. In my googling attempts, I've seen that it might be impossible. Does anyone know how to accomplish this? My thoughts are either to disable opening the texting app or just disable the send button in the texting app.
This is not truly disabling it, as other comments have pointed out. However... you could set up a service or some sort of polling period with an alarm. You can check if a SMS app (you'll have to gather SMS packages) is open in the foreground by its package name, and then launch some activity from your application, essentially blocking the SMS app.
Granted, this is horrible UX and is very hacky, but it could work for preventing the sending of SMS by preventing the user from actually using any SMS apps.
It's not possible, because "texting app" is a system application, which have no open API's for it's UI customization. All you can do - just create custom texting application and replace with a system one.
Even if one somehow found a way to disable the texting app, it does not account for the ContentProvider's that expose the SMS and MMS data to any app that asks for it nor the API's that allow any app that asks to do so to send SMS and MMS for you. This is why you can download alternative texting apps (and why hangouts recently turned into a combination sms/chatting app).
Sorry, but you're asking to do something that requires ripping out the guts of the OS, from what I understand.
I am wondering if there is a way to send a message to users that have entered your wifi's reach? I am not sure if this is possible or how it's called.
A hint of what to look for or some sample code (if this is possible at all) would be much appreciated!
The only thing that is possible as far as I know is to add software to your accesspoint to do a splash screen (or possibly a login page).
This would not completely solve your use-case, but like the various "free" wifi in bars you do need to log in to first, you need to open a browser first and perform an action, before you have a real connection.
You could just skip the authentication-part, and put your message on the splash screen.
A random example of what you can find on the internet is this: http://www.dd-wrt.com/wiki/index.php/NoCatSplash
I have no experience with it, but it seems to serve above mentioned purpose, and you can easily go from there.
I am aware that this is NOT an android specifi answer, but as far as I know it is not an android specific question: you want to send a message to people connection to your wireless.
I am developing one GPS based application. in that i given few default values to user those are phone number which will used to make a phone call. and server address which is used to sent the location data to server.. In this I got 2 major and critical problems..
1) I have hide that default values in regular menu and that should display when user presses some key or combination of keys then only it should display.
2)When ever the Default phone number and server address is changed at provider side that should be updated at user side that should happen through SMS from a specific number in a encrypted format by accepting that SMS those values has to change
Please Any body knows about these things help which are very very very useful to me
Thanks for reading
Lots of good info here.
Having used SMSes to communicate with apps in the past, I highly recommend finding another way if possible. The messages coming in are often gibberish to the user, and practically never contain any information that the user needs to know about. They're confusing and they clutter up the user's phone experience.
I'd recommend using WAP pushes or periodic device-side checks instead. If you have to use SMSes, you may want to consider using the SMS content provider to delete the messages after your application responds to them. It'll still be annoying to the user, but at least you won't be leaving behind garbage in their messaging app. Be aware though that the SMS/MMS content providers aren't published, which means that they're not guaranteed to work, manufacturers can modify them however they want, and they could be phased out in a future SDK release.