Mario1
February 5, 2024, 8:05pm
1
How to include the android.intent.action.BOOT_COMPLETED action
in
@ReceiverElement (name = "es.mariosoft.Palo.PaloBootReceiver", enabled = "false", intentFilters = { })
thank you
You will need to add an @IntentFilterElement
annotation and within that add the @ActionElement
annotation. You can see an example of how we do this in the Texting component here:
/**
* If this property is true, then SendMessage will attempt to send messages over
* WiFi, using Google voice.
*
* @param enabled Set to 'true' or 'false' depending on whether you want to
* use Google Voice to send/receive messages.
*/
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_BOOLEAN, defaultValue = "False")
@SimpleProperty()
@UsesBroadcastReceivers(receivers = {
@ReceiverElement(name = "com.google.appinventor.components.runtime.util.SmsBroadcastReceiver",
intentFilters = {
@IntentFilterElement(actionElements = {
@ActionElement(name = "com.google.android.apps.googlevoice.SMS_RECEIVED")
})
})
})
public void GoogleVoiceEnabled(boolean enabled) {
if (SdkLevel.getLevel() >= SdkLevel.LEVEL_ECLAIR) {
this.googleVoiceEnabled = enabled;
Mario1
February 7, 2024, 8:24pm
3
Thanks it worked perfectly
1 Like
system
Closed
February 14, 2024, 8:25pm
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.