marcoseinco
Member
I want to receive broadcast intents in my app. I've tested broadcastreceiver library, and worked fine in the demo example, but when I add to my app with api 33, it doesn't work.
So I'm testing with new module of receiver type, adding the manifest, but I don't get the receive envent.
I've seen that the app receive broadcast with targetSdkVersion = "25" but with targetSdkVersion > 25, event Receiver_Receive don't fire up.
What is the problem?
this is my manifest.xml:
and this is myReceiver.bas module:
So I'm testing with new module of receiver type, adding the manifest, but I don't get the receive envent.
I've seen that the app receive broadcast with targetSdkVersion = "25" but with targetSdkVersion > 25, event Receiver_Receive don't fire up.
What is the problem?
this is my manifest.xml:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="33"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddPermission(android.permission.RECEIVE_ULTRASONIC_API)
AddReceiverText(myReceiver,
<intent-filter>
<action android:name="com.my.app.CUSTOM_INTENT" />
</intent-filter>)
and this is myReceiver.bas module:
B4X:
Sub Process_Globals
End Sub
'Called when an intent is received.
'Do not assume that anything else, including the starter service, has run before this method.
Private Sub Receiver_Receive (FirstTime As Boolean, StartingIntent As Intent)
Log(StartingIntent)
End Sub