I made an app which clicks an image from your phone, and then you can pick the image through an ImagePicker.
I was opening the camera by using an ActivityStarter.
So far everything was working good for me, until today I downloaded the app on a differentphone. It showed "Error 604: No Corresponding activity was found" when I tried to open the camera.
I think that it shows that because of the different activity class/packages of the different phones.
So is there any way in which I can solve that? I know that I can use the Camera component itself, but I don't want to use it, as it would require a lot of changes in the overall code in my app.
Please tell me if there are any ways.
Thanks in Advance.
The app's function is to send pictures of air pollution to authorities to take action. It can be used not to only take a picture and immediately use it. It can also be used for later.
(ie. I take the picture right now and I send the picture to the authorities later)
So if I use the Camera Component, It does not store the image in the normal Camera folder in the phone's gallery.
That is strange isn't it - though the way things are going with Google Security, Apps might not have access to the Gallery in Android 11, which is not so far away from release.
Perhaps using Taifun's file extension would be better. The images would be stored in the App's own folder and Taifun's extension can list them - that is possibly the future for Android 11.
@ChrisWard I would like to know one additional thing: My teacher told me that the Activity Package and Activity Class might be different on different phones.
So will it be on the basis of Android Version (ie. an Android 6 phone will have a different activity cass / package than an Android 9) Or is it on the bassis of the phone's company (ie. will a Samsung phone have a different activity class/package than a OnePlus phone)??
Start the Camera
To launch the Android Camera app, use an activity starter with the IMAGE_CAPTURE Action property. You do not specify an ActivityPackage or an ActivityClass:
Action: android.media.action.IMAGE_CAPTURE
This is basically what the App Inventor Camera component does, although it is more convenient to use the Camera component than to use the ActivityStarter in building your app.
Generally speaking, that is not the case - but it is true to say there are more things to consider on later versions of Android, and some file paths are slightly different between manufactures when they use their own customised version of Android.