[android-developers] How to start an activity in a try/catch bloc
Hi,
I just want to add an alertdialog when receiving a call, however i
don't know how doing it.
I have made this:
Intent i = new Intent(this,Preferences.class);
startActivity(i);
But it ends with an error in each line!
public class IncomingCallReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
SipAudioCall incomingCall = null;
try {
Intent i = new Intent(this,Preferences.class);
startActivity(i);
SipAudioCall.Listener listener = new
SipAudioCall.Listener() {
@Override
public void onRinging(SipAudioCall call, SipProfile
caller) {
How can i solve this problem?
Thank you for your help.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home