AI2 Component
(Version nb184)
|
Public Member Functions | |
void | onReceive (Context context, Intent intent) |
Static Public Attributes | |
static final String | TAG = "SmsBroadcastReceiver" |
static final int | NOTIFICATION_ID = 8647 |
This broadcast receiver accepts incoming SMS messages from either Messaging, the built in Android SMS program or from Google Voice (which must be installed on the user's phone. The receiver will be invoked by the system even when the app is not running.
The receiver does not need to be instantiated in the app. The receiver is declared statically in the <application> tag but outside the <activity> tag in the Manifest:
<receiver android:name="org.hfoss.SmsBroadcastReceiver" android:enabled="true" android:exported="true" > <intent-filter> <action android:name="android.provider.Telephony.SMS_RECEIVED" /> <action android:name="com.google.android.apps.googlevoice.SMS_RECEIVED" android:permission="com.google.android.apps.googlevoice.permission.RECEIVE_SMS" /> </intent-filter> </receiver>
Definition at line 55 of file SmsBroadcastReceiver.java.
void com.google.appinventor.components.runtime.util.SmsBroadcastReceiver.onReceive | ( | Context | context, |
Intent | intent | ||
) |
Called by the system when an incoming SMS is received either from Google Voice or through the built-in Telephony app.
Definition at line 66 of file SmsBroadcastReceiver.java.
|
static |
Definition at line 58 of file SmsBroadcastReceiver.java.
|
static |
Definition at line 57 of file SmsBroadcastReceiver.java.