I am writing some application for Android. Here my app receives sms and as soon as it receives, it launches another activity,say a browser with some url supplied.
So here, I need two classes, broadcastReceiv er( to receive sms) and Activity. But in java i can inherit only 2 classes. Since they are imported from android library, I am not getting how I can implement this. I think I cant use interfaces also.
here, i have no means to extend or use Activity class,
can anyone suggest me a way...?
So here, I need two classes, broadcastReceiv er( to receive sms) and Activity. But in java i can inherit only 2 classes. Since they are imported from android library, I am not getting how I can implement this. I think I cant use interfaces also.
Code:
import android.app.Activity; import android.content.BroadcastReceiver; public class SmsReceiver extends BroadcastReceiver { receive sms; if it satisfies some criteria, launch a new acivity.... }
can anyone suggest me a way...?
Comment