Android Question ContentChooser general question

LucaMs

Expert
Licensed User
Longtime User
If understand, what you want is to close che "Chooser" immediately after it is shown (so I don't know what can be the purpose).

I think the answer should be: "no", because the ContentChoose is a sort of dialog and only the user can close it.

You could try using a timer; in the timer event try to StartActivity(... [HERE I TRIED]

No, you can not use a timer, because the chooser is a sort of "sync dialog", the timer event will not be raised.
[Google does not know B4X Resumable :p]
 
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
i will try to explain i have a notifcation icon in my app and its info set to a module when its clicked

B4X:
nNotify.SetInfo("Running", "click to go back", MAIN2)

when content chooser showing and i try to drag the notifcationbar to click on the notification icon to return to MAIN2 the app recreate the Main2 module if the content chooser showing
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
when content chooser showing and i try to drag the notifcationbar to click on the notification icon to return to MAIN2 the app recreate the Main2 module if the content chooser showing
I tried, but still don't understand :p sorry :(.

I get the notification, open the notification list, and choose if click on the notification (so open the activity) or remove it (dragging the notification "out").

[the name of the project attached is "Close CC" because initially I thought you were talking about ContentChooser, not about notifications]
 

Attachments

  • Close Notification.zip
    8.5 KB · Views: 157
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
upload_2018-5-6_6-10-49.png


??? helpful?

I leave; someone who knows notifications will understand better and will help you.
 
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
try with this click open module 2

in module2 click to open the chooser

when the chooser showing drag the notifcation bar and click on the notifcation icon and see what happened

The Main module opened with empty contents how ever the clv have an item and the label is filled with text
 

Attachments

  • tests.zip
    10.4 KB · Views: 161
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I saw this notification:
upload_2018-5-6_13-13-53.png


(You can understand what it means, although it is in Italian: "B4A Example is running - touch to get more informations or to stop the app").

I could not understand why this happened! I thought it was a B4X notification, but it does not appear in my projects and this distracted me a lot.
This is due to:
Note that your code misses this line:
nNotify.Icon = "icon"

Now I can try to understand @PassionDEV's problem :)...
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main2) Create, isFirst = true **
** Activity (main2) Resume **
** Activity (main2) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **

** Activity (main) Resume **

I think you're asking why Main is recreated, instead of resumed; correct?
 
Upvote 0
Top