Android Question MediaChooser I can load images but not take picture

tsteward

Well-Known Member
Licensed User
Longtime User
I am trying to implementing MediaChooser into my app.
I have added SetServiceAttribute(KeepRunningService, android:foregroundServiceType, shortService) to manifest.
Which enabled loading images.
Is there something I need to add to take picture?

I can load images with
B4X:
Wait For (Chooser.ChooseImage(btnLoadImage)) Complete (Result As MediaChooserResult)
    ShowMedia(Result)
But I can not open the camera with, I just get success failed
B4X:
Wait For (Chooser.CaptureImage) Complete (Result As MediaChooserResult)
    ShowMedia(Result)

I do get this in the logs
(RemoteException) android.os.RemoteException: Remote stack trace:
at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission(ActivityTaskSupervisor.java:1177)
at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1144)
at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:791)
at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1311)
at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1256)
** Activity (main) Pause event (activity is not paused). **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (main) Resume **
 

tsteward

Well-Known Member
Licensed User
Longtime User
When I try to run the example it complains exoplayer is missing

B4A Version: 13.00
Parsing code. Error
Error parsing program.
Error description: Unknown type: simpleexoplayerview
Are you missing a library reference?
Error occurred on line: 18 (SMMViews)
Private SimpleExoPlayerView1 As SimpleExoPlayerView
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
I have installed exoplayer and associated files so now the MC Example works but after examining the code I can't see where it called exoplayer so it's still doesn't work in my app.

Could you please point out what I might be missing. I have included the exoplayer library in my app but I'm missing something
 
Upvote 0
Top