I am making modifications in a previous project, which is basically 
developed for kids and teenagers. It blocks text messaging, emails, calls 
and internet when a user drives at speed greater than 16 MPH. The service 
is activated through SMS. Modification is required as the app doesn't works 
on Android v4.1<http://developer.android.com/about/versions/jelly-bean.html>and 
above. I have seen an app on 
PlayStore named Safely 
Go<https://play.google.com/store/apps/details?id=com.safely.go.driver.safety.stop.texting.driving&feature=nav_result#?t=W251bGwsMSwxLDMsImNvbS5zYWZlbHkuZ28uZHJpdmVyLnNhZmV0eS5zdG9wLnRleHRpbmcuZHJpdmluZyJd>.
 
This app has a button on click of which, status changes to driving. In this 
mode, if a user clicks on dialer, messaging, settings or browser, their own 
activity opens up, instead of default behavior. In short, in this mode a 
user cannot access anything except those applications, which the user has 
chosen to use during driving. 

As per my requirement, the service will be activated through SMS. Once 
service gets activated, and user's speed reaches more than 16 MPH, I want 
that when user clicks on Dialer, my activity should open which will show a 
warning message, instead of opening dial pad. I am not getting how can I 
accomplish this feature. As a service has no direct interaction with user, 
so the android system cannot catch key event in service. I was thinking of 
using 
BroadcastReceiver<http://developer.android.com/reference/android/content/BroadcastReceiver.html>,
 
but it is not clear to me how a keyevent will be broadcast when user 
touches dialer icon. May be I am wrong, but AFAIK, an activity cannot catch 
KEYCODE_CALL<http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_CALL>.
 
Or, am I moving in wrong direction? 

I simply want to know how can I override default behavior dialer. If 
someone has any information please share, as it would be of great help for 
me. 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to