Android Question Widget created with B4A6.5 Locked, with Android 7 [SOLVED]

Star-Dust

Expert
Licensed User
Longtime User
I realized a year ago an App with a Widget.
Clicking on the App opens the Main activity, but by clicking on the Widget another activity is opened.

I usually try my apps on different physical devices, with Adroid 4, 4.2, 4.4, 5.0, 6.0, 7.0. Both Smartphone and tablet.

This App I had not yet tried on Android 7. Today trying it on dispositiv with adroid 7 (2 devices) I found that the widget does not open the activity. Clicki but nothing happens.

Can you tell me why? Should I request some permission?

B4X:
#Region  Service Attributes
    #StartAtBoot: False
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Dim Widg As RemoteViews
End Sub
Sub Service_Create
    Widg = ConfigureHomeWidget("widget", "Widg", 0 , "Insert",True)
End Sub

Sub Service_Start (StartingIntent As Intent)
    If Widg.HandleWidgetEvents(StartingIntent) Then Return
    'Widg.SetImage("ButtonOk",LoadBitmap(File.DirAssets,"add.png"))
End Sub

Sub Service_Destroy

End Sub

Sub Widg_RequestUpdate
    Widg.UpdateWidget
End Sub

Sub Widg_Disabled
    StopService("")
End Sub

Sub ButtonOk_Click
    StartActivity("insert")
End Sub
 

Star-Dust

Expert
Licensed User
Longtime User
I wait for B4A 8 to be published to buy the new version, for now I have to settle.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…