Enable Safety assistance emergency mode
Asked Answered
E

2

12

Its a very interesting and new thing for me to implement and learn. There are some requirement of my application. For that I have searched a lot but couldn't find proper and valuable thing or links. So i am posting my question here. The functionality are :

1) In Samsung device there is Safety Assistance menu in which you can find Emergency Mode option.

2) Now while Emergency mode at that time I want to create a one or more primary contacts to Emergency Mode. So now while holds the home and volume buttons the emergency will be activated and notify by notification.

3) Now while the emergency will be activated at the same moment GPS would be enabled automatically and the two photos of current location would be captured automatically and finally locations and that two photos will send to that contacts which are added in Emergency mode as a primary contact as a MMS.

Note : If sound recorder option will be enabled then recorded file will also send in MMS.

So if anyone knows or anyone implemented then I am very thankful to him/her. Help would be appreciated.

Electret answered 17/2, 2015 at 7:16 Comment(0)
C
1

I guess this is not a simple task, since the trigger is a keypress of vol+ and vol- for three seconds (if I remember correctly). I'm not sure if it is possible to hook those keys from a service (since this would a keylogger also do). However if you got this managed you just need to enable GPS by code. When done you just need to get the users position.

The next step is to let the user select some contacts where the data should been send. That should been the easest part. The next step is to make some photos and record some audio and send those data per mms to the desired persons.

Compendium answered 17/2, 2015 at 7:29 Comment(2)
Ok.. Thanks for fast reply. But how can i programmatically go to Safety Assistance menu? and also i have found it in only samsung deviceElectret
Okay. Let me check and find. I will let you know then.Electret
R
1

It's not possible to capture home button event from service. You can capture volume up/down event using BroadcastReceiver when phone is unlocked.

This looks like nice idea but also not doable in this way.

Raymund answered 17/2, 2015 at 7:32 Comment(2)
Yeah. You'r right but my problem is to get a path of safety assistance programmatically. Which type of intent i have to use don't knowElectret
@Devill There is no way for such things because it can be malicious app as well.Raymund

© 2022 - 2024 — McMap. All rights reserved.