File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to start application after pressing a particular number?

 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to start application after pressing a particular key sequence.
suppose i pressed '000' then how to start my application?
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i would like to give you idea on this, you need to listen to Broadcast Intent (type here would be 'Call ') . when you find this intent is broadcasted ( write down code which opens your app) .
 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Piyush,

how to monitor which number is pressed on dialer?
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Pramod . in #onReceive() method of brodcast you can get Number by following line (using intent).

 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i would like to give you idea on this, you need to listen to Broadcast Intent (type here would be 'Call ') . when you find this intent is broadcasted ( write down code which opens your app) .


I had write in manifest.xml to register broad cast receiver as




in MyReceiver class I write as



and in my MicroERS I have



but when I call on any number then it will not send message. What is wrong in my code.
 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I change in manifest.xml as




Then message is sent when I pressed the camera key, then why



this is not run when I pressed call button, Please help me

Thanks in advance
 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have also tried "ACTION_NEW_OUTGOING_CALL" instead of "ACTION_CALL_BUTTON" but still it is not working. What do you think where is the problem?


Thanks in advance
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,Pramod have you entered permission for call in AndroidManifest.xml . if not then, find appropriate permission related to CALL from http://developer.android.com/reference/android/Manifest.permission.html
 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have write following permission in manifest.xml

 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello anybody is there?
 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still problem is not solved
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please add one more permission <uses-permission android:name="android.permission. CALL_PRIVILEGED" />
 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you PIYUSH
Now it is working
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic