airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
206 stars 11 forks source link

CameraRoll SELECT function doesn't work some android devices #1543

Open mehmury opened 2 years ago

mehmury commented 2 years ago

Problem Description

Describe your problem in detail. Include the following information:

I have an app for teachers on google play store. With this application, teachers create new exam documents or online exams with the photos they take from the documents.

The SELECT function of the CameraRoll feature, which I have been using in the application on the android side since the transition to the aab format, does not fully work on some android devices.

I can access the gallery on the device with CameraRoll, but when I select the photo, I cannot import it into the application. There is no such problem with the CameraUI feature.

I haven't made any changes to the actionscript codes. The features that have been working for years are not working this year.

I tried Adobe air sdk 33.1.1.533 and all later versions. I couldn't solve the problem. Android 10 was installed on the devices I saw this error on. But all Android 10 devices do not have the same problem. I am using myflashlabs ANE for permissions to access Phone's photos for apps.

EDİT: I noticed something new during my experiments on this subject. I tried again with air sdk 33.1.1.533. CameraRoll worked when I installed apk directly on Android device with Animate. However, when I packaged it as aab and then uploaded it to google play internal test section and downloaded it from there, the feature does not work again. I think it is important.(İ USE ANDROİD BUİLD TOOL AS 30.0.0 with packaging. In versions higher than 30.0.0, this bug continues in local tests too...) It seems that the temporary locations where the selected photo is saved for some reason during AAB packaging cannot be retrieved. Or a similar problem... Please review this for new aab packaging.

Steps to Reproduce

Tell us how this issue can be reproduced. Seriously: if you want this issue to be fixed, this is the part you really need to get nailed.

import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.media.CameraRoll;
import flash.events.MediaEvent;
import flash.events.Event;
import flash.events.ErrorEvent;
import flash.media.Camera;
import flash.media.CameraUI;
import flash.media.MediaPromise;
import flash.utils.IDataInput;
import flash.events.IEventDispatcher;
import flash.utils.ByteArray;
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
import flash.errors.EOFError;
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import flash.display.Sprite;
import flash.ui.Mouse;
import flash.ui.MouseCursor;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.geom.Rectangle;
import flash.geom.Point;
import fl.transitions.Tween;
import fl.transitions.easing.Strong;
import flash.net.FileReference;
import flash.events.*;
import flash.net.FileFilter;
import com.adobe.images.JPGEncoder;
var cameraRoll: CameraRoll = new CameraRoll();
var dataSource: IDataInput;
var tempDir;
var jpg: JPGEncoder = new JPGEncoder();

startCameraRoll.addEventListener(MouseEvent.CLICK, initCameraRoll);

function initCameraRoll(evt: MouseEvent): void {
    trace("Opening Camera Roll");

    if (CameraRoll.supportsBrowseForImage) {

        // Add event listeners for camera roll events
        cameraRoll.addEventListener(MediaEvent.SELECT, imageSelected2);
        cameraRoll.addEventListener(Event.CANCEL, browseCancelled);
        cameraRoll.addEventListener(ErrorEvent.ERROR, mediaError);

        // Open up the camera roll
        cameraRoll.browseForImage();
    } else {
        trace("This device does not support CameraRoll functions.");
    }

}

function browseCancelled(event: Event): void {

    trace("cancelled");
}

function imageSelected2(evt: MediaEvent): void {

    // Create a new imagePromise
    var imagePromise: MediaPromise = evt.data;

    // Open our data source
    dataSource = imagePromise.open();
    tempDir = imagePromise.file.url;

    addChildAt(image, 0);
    image.uni.visible = true;
    image.uni.source = tempDir;

    if (imagePromise.isAsync) {

        trace("async");
        var eventSource: IEventDispatcher = dataSource as IEventDispatcher;

        eventSource.addEventListener(Event.COMPLETE, onMediaLoaded);

    } else {

        MovieClip(root).image.visible = true;

    }
}

function onMediaLoaded(event: Event): void {

    trace("onmedialoaded");

    MovieClip(root).image.visible = true;

}

function mediaError(event: Event): void {
    //feedbackText.text = "There was an error.";
}

I am using the as3corelib.swc plugin inside the application. I am using the UILoader ready component with Animate together with the as 3.0 codes I have sent. It is necessary to add this component to the application and add as "image" named MovieClip .(UILoader name "uni")

ek1

The attached zip file contains the necessary zip file to reproduce this problem.

I am using permisioncheck.ane plugin for app to access photos on android devices. For this, it is necessary to add the dependencies anes. denemecameraroll.zip

Known Workarounds

I am experiencing the problem on some devices. As a workaround for this, I would suggest that you can deactivate the CameraRoll feature from the photo add section in the application and enable the photo to be added only with the CameraIU feature.

I tried the app on many devices. It worked fine on most of them. But the fact that the application does not work on some devices means loss of income for me. What advice can you give about this? How can I bring the application back to life?

mehmury commented 2 years ago

last sdk 33.1.1.743 this bug still continue... I think there may be a problem in aab packaging where temporary files are saved for some android devices. Some android devices have no problem. some still have the problem. I think this should be investigated.

ajwfrost commented 2 years ago

Hi @mehmury - do you know of specific devices where this is a problem? And on those devices, are you able to check whether it works fine with an APK if you build that with the legacy mechanism, vs an AAB file? (The new APK build mechanism should be the same as the AAB one in terms of setting up a project for the Android Gradle plug-in to build). Just trying to gauge how reproducible it is (and crucially of course, to check that we can reproduce it!)

The only other thing I would wonder is if this was related to Android API level 30 or 31 with the file location changes..

thanks

mehmury commented 2 years ago

Thank you for return.@ajwfrost Problem continue Especially on a SAMSUNG Galaxy S9 with Android version 10 and a SAMSUNG A series phone with the same android version. No problem on SAMSUNG galaxy S6 with older android version 7 or SAMSUNG galaxy S20 plus with newer android 11. Yes, when I tested it with the old apk method (sdk 33.1.1.743), the apk that was formed gave an incorrect output just like in the aab package. In other words, I saw that the apks I tested with the new sdk did not run the Cameroll select feature as I tested the apks in aab with the bundletool.

Also, I deleted android-30 and android-31 from android platform sdk and tested it again with 33.1.1.743 sdk as apk. But in Cameroll select property I was not able to display the image within the app.

Edit: I tested the android api level as apk repeatedly until 28. (with 33.1.1.743), the bug continue that I mentioned in the camreraRoll feature continued in all tests.

I did not try again with older air sdk versions. However, in my previous tests with 33.1.1.533, it was working in the old style apk creation method, but the error persisted as aab package.

If this problem can be resolved, I will be able to promote my application again in a valid state for more users. Is there any other reason?

mehmury commented 2 years ago

Today I tried again with 33.1.1.575 air sdk. By creating classic apk, CameraRoll feature is supported in my tests on Samsung S9. But when I test it with bundletools by packing aab with the same air sdk, the Cameroll feature is not working. The android sdk level I use is 28 While packing as aab, something changes and this renders the CamereRoll feature inoperable.

ajwfrost commented 2 years ago

@mehmury thanks for those tests, that's pretty conclusive! I'm wondering whether you could send us the APK and AAB files that you had created there, as we can then start looking at the differences which should help us find the issue a bit quicker..

You can upload via: https://transfer.harman.com/requests/AUOk7FDTR1vIcd6EgX4OSp

thanks

mehmury commented 2 years ago

@ajwfrost Thanks for the support. Yes, I sent the files as apk and aab separately via the link you provided. I'm waiting for the result.

mehmury commented 2 years ago

@ajwfrost Any new information on this topic? Were you able to test the files I sent?

ajwfrost commented 2 years ago

Apologies for the delay here... we've been looking at the differences between the APK and the AAB, I'm actually wondering whether the problem may be related to the ANEs that you've got there. The differences between the APK and the AAB are: 1) APK activity is called "AppEntry", whereas the bundle activity is called "AIRAppEntry" - although we couldn't see any reference to this from the ANE java code so that shouldn't make a difference 2) APK is built with API level 30 (platformBuildVersionCode and compileSdkVersion) whereas the bundle is built with API level 28 (? - I'd have expected it to be the other way round...) 3) APK was only for ARMv8 i.e. arm-64, which is fine 4) There are different classes compiled in for the "permissionCheck" ANE.... see below.

If we extract the classes.dex files from each package, we can see a difference here (in com.myflashlab.permissionCheck): image

The reason for the difference is because of the way in which embedded resources are extracted and then brought into the build system. We don't actually want to have custom resources packaged up the way that they are here..

I think it should be possible to split apart the ANE and put the resources into the build separately: we'll do some tests here and see if we can get that working. In the meantime it would be interesting if you're able to use a recent SDK and generate two APK files, one if you build with the default (Gradle-based) mechanism, and one which should use the legacy mechanism (by editing your application descriptor and adding <BuildLegacyAPK>true</BuildLegacyAPK> into the <android> section). If you have the -platformsdk defined the same for both builds, then everything else should stay the same apart from the build mechanism...

thanks

mehmury commented 2 years ago

@ajwfrost Thank you very much for the detailed information. Myflashlabs has stopped ane updates. The permisioncheck.ane I used was provided by Myflashlabs. After this message, enter <BuildLegacyAPK>true</BuildLegacyAPK> into the main XML. I added the code. I tried repackaging apk and aab with the latest air sdk. It worked in the apk file. Unfortunately, when I tested the aab file, it didn't work again. If this issue is definitely caused by this ane I may need to provide an up-to-date permisioncheck.ane from another ane provider. Thank you for the support.

ajwfrost commented 2 years ago

Hi @mehmury

So can I check: if you use the latest SDK per the above, and build an APK, then it's working: what if you switch the "BuildLegacyAPK" setting so that it's false? If you were able to do that then it would be good to check..

The thing I can't quite understand is that in the AAB file, it's using a reference to com.myflashlab.permissionCheck.R$layout::activity_main, and we can see that in the bytecode for nativeTestPermissionCheck.MainActivity::onCreate. But, I can't actually see where this activity_main is meant to be defined, and I can't find it in the APK file. So for the APK to work, I would have expected this value to be defined somewhere and also referenced: I can see it in the bytecode still, but the classes don't seem to define it under com.myflashlab.permissionCheck or under air.cameraroll

Looking back at the threads that discussed all this sort of problem before: a) we had an issue with some resources going wrong if the wrong version of Java was being used, or worse still if a JDK wasn't available and we tried using AIR-internal classes to compile the R.java classes. But that was a bug in APK files and shouldn't apply here as you're seeing the APK files work... b) custom resources were failing when we switched to the bundle format. But I can't see any specific custom resources in use in your bundle; it's got the resources under the given namespaces/projects per the platform-specific XML in the ANE files, but nothing quite third party that needs you to define a resource in your own application package.

My only suggestion at this point is:

thanks

mehmury commented 2 years ago

I continue to follow the topic. Using last Air sdk (33.1.1.743) with android api 31.0.0 and the latest android studio version, I applied the processes you specified. After setting KeepAndroidStudioOutput=true, I tested the apk in the package that I created with the apk debug process with Android Studio. Again, the cameraroll process did not work in the apk test process. As you said, I copied the values ​​from AndroidStudioProject\com\myflashlab\permissionCheck\src\main\resunder AndroidStudioProject\app\src\main\res and edited their names. After all, I took aab output and tested it on the device with bundletool. In the end, the transaction was negative again. So this solution didn't work. I am attaching the log files that were created during my testing with Android Studio. It is strange that there is no solution for this issue. It seems that there are some troublesome situations in Myflashlabs. A more up-to-date and comprehensive tool for Permisioncheck is not currently available in companies that produce a machine. If this issue cannot be resolved, I think my application will expire. For Adobe air sdk, ane generating systems need to proliferate for this sdk to continue in the future. I'm wondering if Adobe Air Harman is considering making free anes. Or is it considering providing documentation and tool support for developers on ane preparation? If these issues are not resolved, the future does not look very bright for an sdk system that provides such convenience... I don't know if a conclusion can be reached from the logs. If the issue is resolved, I will have saved my application... log_cameraroll.txt

mehmury commented 2 years ago

In order to solve this problem, I purchased ane that manages android permissions on the disqrict native extension, used it in my application and tested it to see if the problem was caused by the permissioncheck ane. The fact that Cameroll doesn't work has nothing to do with the permision plugin. I can't figure out why this is happening on some devices. Cameraroll does not work with the SAMSUNG S9 in my current tests, even on APKs created in normal ways. I'm using sd memory on my Samsung device. I tried to remove the sd card to see if it's related to this, but the result did not change. Why it works on some devices and not on others is really pointless. I tried different code edits with Actionscript, but the result did not change. This problem has been going on since the AAB system arrived. Could the phone have a unique security setting? I'm thinking a lot of things but I can't figure it out. Is there any way to find out exactly what it is? thanks...

EDİT: In the tests I made again, I added the buildlegacy true to the main xml. I tried it directly on the mobile device as an APK, using the discrict permission ane, using adobe air sdk 33.1.1.743 and android API 31.0.0.

While testing directly as APK, I encounter an interesting situation. The CAMERAROLL SELECT operation works in the session I opened the application by giving permissions at the first opening. However, when I close and reopen the application, CAMERAROLL select becomes inoperable again. When I close the permissions in the application from the settings section of the phone, run the application again and renew the permissions, the cameraroll works again in the application created with the classic apk.

When I package it as AAB with disqrict permission ane and install it on the device with bundletool, the CAMERAROLL SELECT feature does not work.

I used <BuildLegacyAPK>true</BuildLegacyAPK> in all these processes.

I hope you will continue to support this issue. thanks again..

mehmury commented 2 years ago

Will you still be able to continue to support this issue?

ajwfrost commented 2 years ago

Hi - yes, we are still hoping to get to the bottom of this. Some interesting findings above, which should be some good clues. Can you please confirm for the below behaviour, what version of Android was running on the phone, and what was the target Android SDK level in your app descriptor file?

The CAMERAROLL SELECT operation works in the session I opened the application by giving permissions at the first opening. However, when I close and reopen the application, CAMERAROLL select becomes inoperable again.

thanks

mehmury commented 2 years ago

THANKS !!

The CAMERAROLL SELECT operation works in the session I opened the application by giving permissions at the first opening.
However, when I close and reopen the application, CAMERAROLL select becomes inoperable again.

versions where the above situation is observed:

SAMSUNG GALAXY S9 ANDROID 10 AIR SDK 33.1.1.743 ANDROID API 31.0.0 android build tools 31.0.0 platforms android-31 I used <BuildLegacyAPK>true</BuildLegacyAPK> ANDROID TARGET SDK LEVEL -31

mehmury commented 2 years ago

I tested the Cameraroll feature again with Air sdk 33.1.1.795. The problem still continues. In the application I installed as a normal apk with Adobe Animate on the android device, after giving the camera and photo access permissions, the cameroll select feature works at the first launch. However, when the application is closed and reopened, the camereroll feature does not work. When I close the permissions on the Android device, open the application again, and give permissions again, the cameraroll works again. When I turn it off and open again cameraroll still doesn't work. When I test the application with bundletool after packaging the application as aab, cameraroll does not work at all. I'm using it as<BuildLegacyAPK>true</BuildLegacyAPK>. If I don't use it at all, camereroll doesn't work when I run it as apk or aab. EDİT:I use disqrict permission ane and myflashlabs permissioncheck ane...this bug still persist both...

I use ADOBE AIR SDK 33.1.1.795 SAMSUNG GALAXY S9 ANDROID VERSİON 10 in application destriptor: <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="31"/> android studio version is below Android Studio Bumblebee | 2021.1.1 Patch 1 Build #AI-211.7628.21.2111.8139111, built on February 1, 2022 Runtime version: 11.0.11+9-b60-7590822 amd64 VM: OpenJDK 64-Bit Server VM by Oracle Corporation Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 8 Registry: external.system.auto.import.disabled=true

THİS TOPIC may also about #1730

ajwfrost commented 2 years ago

Thanks yes, one of the team has managed to reproduce this on their test device and so we're starting to debug it...

I'm not 100% sure that it should be necessary to use an ANE for the permissions though, since this is one that already has an AS3 permission function?

thanks

mehmury commented 2 years ago

thanks ...I 'm waiting test results..and i will try and search Cameroll AS 3 permissions...

ajwfrost commented 2 years ago

Quick update (also re #1730) is that there may be two separate issues combining here which was making it a little tricky to work out! One of them is a permissions issue, the other is the use of a deprecated API, and it seems to be OEM-dependent whether/how these are implemented and therefore whether we're able to pick up the chosen image or not.

So we should be able to change how this works to a more future-proof solution, hoping to get this resolved soon and pushed out into a forthcoming release as soon as possible.

thanks

mehmury commented 2 years ago

@ajwfrost Thank you. I hope it will be resolved soon. At least until the beginning of 2023.

mehmury commented 2 years ago

When I look at the release notes of the latest version of Air sdk, the issue with the tag #1543 has been fixed. I'm glad about it. With the AIR SDK 33.1.1.821, I recompiled my application that gave this error and packaged it as aab and tested it on my SAMSUNG GALAXY S9 with bundletool. I saw that the problem still persists. But I think there might be something else I need to do in this version? Cameraroll feature cannot take the selected photo into the application and display it. I tried both myflaslabs permissionchek ane and disqrict permissions regarding permissions. The problem persists in both...

ALSO: When I compile and test with firebase analytics ane and google services with anes, the application crashes without running.

Thanks...

ajwfrost commented 2 years ago

@mehmury what permissions are you setting up in your app descriptor file? Worth trying to include:

<uses-permission android:name=”android.permission.CAMERA”/>
<uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE”/>
<uses-permission android:name=”android.permission.READ_EXTERNAL_STORAGE”/>

And then at runtime you need to check for the permissions (should probably add an event listener for the response..)

if ( CameraRoll.permissionStatus != "granted" ) (new CameraRoll()).requestPermission();

Finally, please ensure you're not trying to use the MediaPromise.file property when you get a response, you'll need to use the MediaPromise.open() method instead.

Can you see how far it gets with all this? so e.g. do you see the image picker? and if you select something, do you get any event triggered?

For this - and for the crash with the ANEs - it would be good to see some logcat output?

thanks

mehmury commented 2 years ago

Thanks a lot for the response. I can grant permissions (myflashlabs ane) at application startup for the permissions and cameroll in the main xml you mentioned. (However, windows asking for permissions do not open in disqrict permission ane. It automatically rejects permissions and opens the application...) For MediaPromise, yes I use MediaPromise.open() in my a.s. 3.0 codes. But then I have to use another line in the form of mediapromise.file.url to reach the selected picture... A system is running on the server that sends the selected picture as a file to the user's e-mail via e-mail.. The code structure I'm using is exactly like this:

import flash.display.MovieClip;
import flash.events.MouseEvent;
[adt.log](https://github.com/airsdk/Adobe-Runtime-Support/files/8458578/adt.log)
[adt.log](https://github.com/airsdk/Adobe-Runtime-Support/files/8458579/adt.log)

import flash.media.CameraRoll;
import flash.events.MediaEvent;
import flash.events.Event;
import flash.events.ErrorEvent;
import flash.media.Camera;
import flash.media.CameraUI;
import flash.media.MediaPromise;
import flash.utils.IDataInput;
import flash.events.IEventDispatcher;
import flash.utils.ByteArray;
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
import flash.errors.EOFError;
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import flash.display.Sprite;
import flash.ui.Mouse;
import flash.ui.MouseCursor;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.geom.Rectangle;
import flash.geom.Point;
import fl.transitions.Tween;
import fl.transitions.easing.Strong;
import flash.net.FileReference;
import flash.events.*;
import flash.net.FileFilter;
import com.adobe.images.JPGEncoder;
var cameraRoll: CameraRoll = new CameraRoll();
var dataSource: IDataInput;
var tempDir;
var jpg: JPGEncoder = new JPGEncoder();

startCameraRoll.addEventListener(MouseEvent.CLICK, initCameraRoll);

function initCameraRoll(evt: MouseEvent): void {
    trace("Opening Camera Roll");

    if (CameraRoll.supportsBrowseForImage) {
        trace("support");
        // Add event listeners for camera roll events
        cameraRoll.addEventListener(MediaEvent.SELECT, imageSelected2);
        cameraRoll.addEventListener(Event.CANCEL, browseCancelled);
        cameraRoll.addEventListener(ErrorEvent.ERROR, mediaError);

        // Open up the camera roll
        cameraRoll.browseForImage();
    } else {
        trace("This device does not support CameraRoll functions.");
    }

}

function browseCancelled(event: Event): void {

    trace("cancelled");
}

function imageSelected2(evt: MediaEvent): void {

    // Create a new imagePromise
    trace("selected");
    var imagePromise: MediaPromise = evt.data;

    // Open our data source
    dataSource = imagePromise.open();
    tempDir = imagePromise.file.url;

    addChildAt(image, 0);
    image.uni.visible = true;
    image.uni.source = tempDir;

    if (imagePromise.isAsync) {

        trace("async");
        var eventSource: IEventDispatcher = dataSource as IEventDispatcher;

        eventSource.addEventListener(Event.COMPLETE, onMediaLoaded);

    } else {
        trace("sync");
        MovieClip(root).image.visible = true;

    }
}

function onMediaLoaded(event: Event): void {

    trace("onmedialoaded");

    MovieClip(root).image.visible = true;

}
function mediaError(event: Event): void {
    trace("error:" + event);
}

The image picker opens in the cameroll process. I can select the image. After that, no warning appears. The selected image cannot be imported into the application.

Firebase analytics anes and google service anes, as well as many anes, including one from which I get the device vendor id, are working in this application. I am forwarding the logs of the crash that occurred when I compile with AIRSDK 33.1.1.821.

*** ADT Logging at 2022/04/10 10:32:26 ***
Called by: D:\adobe air sdks\air_33.1.1.713\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.713 called with: -version
*** ADT Logging at 2022/04/10 11:06:25 ***
Called by: D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.821 called with: -devices -platform android
Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe devices
ADB output = List of devices attached
2c754a9232017ece    device

*** ADT Logging at 2022/04/10 11:06:42 ***
Called by: D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.821 called with: -devices -platform android
Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe devices
ADB output = List of devices attached
2c754a9232017ece    device

*** ADT Logging at 2022/04/10 11:07:25 ***
Called by: D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.821 called with: -package -target apk-debug -listen 7936 -arch armv8 -storetype PKCS12 -keystore D:/testolandrohz1964bit/testandrocam.p12 -storepass xxxxxx D:/testolandrohz1964bit/aab/30/to2018.apk D:/testolandrohz1964bit/to2018-app.xml -C D:/testolandrohz1964bit/ to2018.swf img/192V8.png img/144V8.png img/96V8.png img/72V8.png img/36V8.png img/48V8.png -C D:/testolandrohz1964bit/ as3corelib.swc -extdir C:/Users/geuge/AppData/Local/Temp/to2018_ANE_Cache/
Target requested was apk-debug, but not using legacy APK so building via Android Studio
Setting architecture to: armv8
Version in APK = 33.1.1.821, version of ADT = 33.1.1.821
Version in APK = 33.1.1.821, version of ADT = 33.1.1.821
Version in APK = 33.1.1.821, version of ADT = 33.1.1.821
Version in APK = 33.1.1.821, version of ADT = 33.1.1.821
Gradle build where ADT is using JRE version 11.0.14.1
but where Gradle will be using the JDK from C:/Program Files/Android/Android Studio1/jre\bin\java.exe
Gradle build command:  C:/Program Files/Android/Android Studio1/jre\bin\java.exe -Xmx1024m -Dorg.gradle.appname=gradlew -Dorg.gradle.jvmargs=-Xmx1024m -Duser.dir="C:\Users\geuge\AppData\Local\Temp\03e02a67-f591-427d-96fe-d1879a52a0b7" -cp "D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\android\bin\gradle-wrapper.jar";"D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\android\bin\gradle-cli.jar" org.gradle.wrapper.GradleWrapperMain :app:assembleRelease
Creating temporary file for v2-signed APK: C:\Users\geuge\AppData\Local\Temp\03e02a67-f591-427d-96fe-d1879a52a0b7\app\build\outputs\apk\release\signed13733235594923799594apk
V2-signed file is at C:\Users\geuge\AppData\Local\Temp\03e02a67-f591-427d-96fe-d1879a52a0b7\app\build\outputs\apk\release\signed13733235594923799594apk
*** ADT Logging at 2022/04/10 11:08:57 ***
Called by: D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.821 called with: -uninstallApp -platform android -device 2c754a9232017ece -appid testandrocam
Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 2c754a9232017ece devices
ADB output = List of devices attached
2c754a9232017ece    device

Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 2c754a9232017ece uninstall air.testandrocam
ADB error  = 
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: air.testandrocam
    at com.android.server.pm.Settings.getInstallerPackageNameLPr(Settings.java:4649)
    at com.android.server.pm.PackageManagerService.getInstallerPackageName(PackageManagerService.java:26522)
    at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:26528)
    at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:22147)
    at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:1110)
    at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:1701)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:206)
    at android.os.ShellCommand.exec(ShellCommand.java:104)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:27151)
    at android.os.Binder.shellCommand(Binder.java:916)
    at android.os.Binder.onTransact(Binder.java:790)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:5452)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:5158)
    at android.os.Binder.execTransactInternal(Binder.java:1056)
    at android.os.Binder.execTransact(Binder.java:1029)
..java.base/java.lang.Thread.getStackTrace(Unknown Source)
..com.adobe.air.DebugFile.printStack(DebugFile.java)
..com.adobe.air.ADTException.<init>(ADTException.java)
..com.adobe.air.android.AndroidDeviceOperations._execADB(AndroidDeviceOperations.java)
..com.adobe.air.android.AndroidDeviceOperations.execADB(AndroidDeviceOperations.java)
..com.adobe.air.android.AndroidDeviceOperations.uninstallApplication(AndroidDeviceOperations.java)
..com.adobe.air.ADT.parsePlatformOperationArgs(ADT.java)
..com.adobe.air.ADT.parseArgsAndGo(ADT.java)
..com.adobe.air.ADT.run(ADT.java)
..com.adobe.air.ADT.main(ADT.java)
Stack trace:
Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 2c754a9232017ece devices
ADB output = List of devices attached
2c754a9232017ece    device

Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 2c754a9232017ece shell pm list packages
ADB output = package:com.samsung.android.provider.filterprovider
package:com.monotype.android.font.rosemary
package:com.sec.android.app.DataCreate
package:com.samsung.android.app.ledcoverdream
package:com.android.cts.priv.ctsshim
package:com.sec.android.widgetapp.samsungapps
package:com.samsung.android.smartswitchassistant
package:com.sec.vsim.ericssonnsds.webapp
package:com.sec.android.app.setupwizardlegalprovider
package:com.google.android.youtube
package:com.samsung.android.app.galaxyfinder
package:com.sec.location.nsflp2
package:com.samsung.android.themestore
package:com.sec.android.app.chromecustomizations
package:com.samsung.android.app.aodservice
package:com.samsung.android.app.cocktailbarservice
package:com.android.internal.display.cutout.emulation.corner
package:com.google.android.ext.services
package:com.ezscreenrecorder
package:com.android.internal.display.cutout.emulation.double
package:com.microsoft.appmanager
package:com.android.providers.telephony
package:com.sec.android.app.ve.vebgm
package:com.sec.android.app.parser
package:com.android.dynsystem
package:com.samsung.internal.systemui.navbar.gestural_no_hint_wide_back
package:com.google.android.googlequicksearchbox
package:com.samsung.android.calendar
package:com.samsung.android.timezone.updater
package:com.android.providers.calendar
package:com.alibaba.aliexpresshd
package:com.osp.app.signin
package:com.google.android.apps.googleassistant
package:com.samsung.android.aremoji
package:com.samsung.clipboardsaveservice
package:com.sec.automation
package:org.telegram.messenger
package:com.android.providers.media
package:com.samsung.android.app.social
package:com.android.theme.icon.square
package:com.google.android.onetimeinitializer
package:com.expressvpn.vpn
package:com.google.android.ext.shared
package:com.yandex.browser.alpha
package:com.shazam.android
package:com.android.internal.systemui.navbar.gestural_wide_back
package:com.android.wallpapercropper
package:com.samsung.android.wallpaper.res
package:com.android.theme.color.cinnamon
package:tr.gov.saglik.enabiz
package:com.samsung.android.smartmirroring
package:com.skms.android.agent
package:air.duskelebekleriana
package:com.sec.android.app.safetyassurance
package:com.samsung.android.incallui
package:com.samsung.android.knox.containercore
package:com.android.theme.icon_pack.rounded.systemui
package:com.samsung.android.kidsinstaller
package:com.sec.factory.camera
package:com.sec.vsimservice
package:com.simplescan.scanner
package:com.sec.usbsettings
package:com.samsung.android.easysetup
package:com.android.documentsui
package:com.android.externalstorage
package:com.samsung.android.aware.service
package:com.sec.android.easyonehand
package:com.sec.factory
package:air.simplepuzzle
package:com.android.htmlviewer
package:com.whatsapp
package:com.samsung.android.app.sbrowseredge
package:com.android.companiondevicemanager
package:com.android.mms.service
package:com.samsung.android.rubin.app
package:com.sec.android.wallpapercropper2
package:com.android.providers.downloads
package:com.google.android.apps.authenticator2
package:com.diotek.sec.lookup.dictionary
package:com.sec.android.cover.ledcover
package:com.android.networkstack.inprocess
package:com.sec.android.easyMover.Agent
package:com.samsung.ucs.agent.boot
package:com.samsung.android.mdx.quickboard
package:com.android.theme.icon_pack.rounded.android
package:air.xetna
package:com.wsomacp
package:com.facebook.adsmanager
package:com.digiturkplay.mobil
package:finansbank.enpara
package:com.samsung.faceservice
package:com.monotype.android.font.foundation
package:com.sec.android.widgetapp.easymodecontactswidget
package:com.samsung.android.email.provider
package:com.samsung.android.MtpApplication
package:com.sec.android.app.factorykeystring
package:com.sec.android.app.samsungapps
package:com.sec.android.emergencymode.service
package:com.android.theme.icon_pack.circular.themepicker
package:com.google.android.overlay.gmsgsaconfig
package:com.google.android.configupdater
package:com.sec.android.app.wlantest
package:com.microsoft.office.excel
package:air.testmakinesiv5fizik
package:com.lemon.lvoverseas
package:com.google.android.overlay.modules.permissioncontroller
package:com.samsung.android.app.settings.bixby
package:com.sec.android.app.billing
package:com.samsung.android.app.selfmotionpanoramaviewer
package:com.sec.epdgtestapp
package:com.samsung.android.timezone.data_Q
package:com.samsung.android.game.gamehome
package:com.sec.android.app.desktoplauncher
package:com.ziraat.ziraatmobil
package:tr.gov.saglik.MHRSMOBIL
package:com.sec.android.daemonapp
package:com.google.ar.core
package:com.google.ar.lens
package:org.zwanoo.android.speedtest
package:com.sec.ims
package:com.sec.sve
package:com.sec.enterprise.knox.attestation
package:com.android.providers.downloads.ui
package:com.widex.arc
package:com.widex.dua
package:com.android.vending
package:com.android.pacprocessor
package:com.android.simappdialog
package:com.samsung.android.knox.attestation
package:com.samsung.systemui.bixby2
package:com.samsung.android.secsoundpicker
package:com.dsi.ant.service.socket
package:com.samsung.internal.systemui.navbar.sec_gestural
package:com.microsoft.skydrive
package:com.samsung.android.SettingsReceiver
package:com.android.internal.display.cutout.emulation.tall
package:com.sec.android.app.soundalive
package:com.denizbank.mobildeniz
package:com.sec.android.provider.badge
package:com.android.certinstaller
package:com.samsung.android.securitylogagent
package:com.android.theme.color.black
package:com.android.carrierconfig
package:com.android.theme.color.green
package:com.samsung.android.app.watchmanager
package:com.android.theme.color.ocean
package:com.samsung.android.knox.containeragent
package:com.android.theme.color.space
package:com.samsung.android.app.assistantmenu
package:com.android.internal.systemui.navbar.threebutton
package:com.samsung.SMT
package:com.samsung.cmh
package:com.samsung.mlp
package:com.samsung.rcs
package:com.sec.android.ofviewer
package:com.sec.factory.iris.usercamera
package:com.samsung.android.drivelink.stub
package:android
package:com.android.hotwordenrollment.xgoogle
package:com.samsung.knox.keychain
package:com.setk.widget
package:com.samsung.android.sm.devicesecurity
package:tr.com.media.markt
package:com.cybersoft.intvrg
package:gov.gib.GibTvdMobil.temassizmobil
package:com.android.theme.icon_pack.rounded.launcher
package:com.samsung.android.providers.carrier
package:com.samsung.internal.systemui.navbar.sec_gestural_no_hint
package:com.dsi.ant.sample.acquirechannels
package:com.samsung.android.aircommandmanager
package:com.bork.dsp.datuna
package:com.samsung.android.net.wifi.wifiguider
package:com.samsung.android.bixby.service
package:com.microsoft.launcher
package:com.samsung.android.smartface
package:com.android.egg
package:com.android.mtp
package:com.android.nfc
package:com.android.ons
package:com.android.stk
package:com.samsung.android.messaging
package:com.samsung.android.emojiupdater
package:com.android.backupconfirm
package:com.samsung.klmsagent
package:com.instagram.android
package:com.samsung.android.app.tips
package:com.giphy.messenger
package:tr.com.dr.android
package:com.samsung.android.smartfitting
package:com.sec.android.app.SecSetupWizard
package:com.microsoft.office.onenote
package:air.perioyunu
package:com.ttech.android.onlineislem
package:com.samsung.android.app.telephonyui
package:com.android.internal.systemui.navbar.twobutton
package:com.samsung.android.samsungpositioning
package:com.android.statementservice
package:com.android.hotspot2
package:com.radyoland.android
package:com.google.android.as
package:com.google.android.gm
package:com.samsung.android.bixby.agent
package:com.google.android.apps.tachyon
package:com.microsoft.emmx
package:org.thoughtcrime.securesms
package:com.sec.android.app.hwmoduletest
package:com.android.settings.intelligence
package:com.sec.bcservice
package:com.sec.modem.settings
package:com.samsung.android.server.iris
package:com.android.internal.systemui.navbar.gestural_extra_wide_back
package:com.microsoft.office.outlook
package:com.google.android.permissioncontroller
package:air.gezegen1
package:com.sec.android.app.servicemodeapp
package:com.sec.android.preloadinstaller
package:com.sec.android.uibcvirtualsoftkey
package:com.google.android.apps.playconsole
package:com.google.android.setupwizard
package:air.resmas
package:com.sec.android.gallery3d
package:com.android.providers.settings
package:com.samsung.accessibility
package:com.sec.imsservice
package:com.android.sharedstoragebackup
package:com.facebook.services
package:com.google.android.music
package:com.samsung.android.mobileservice
package:com.android.printspooler
package:com.android.hotwordenrollment.okgoogle
package:com.samsung.android.hmt.vrsvc
package:com.samsung.android.mdx.kit
package:com.android.theme.icon_pack.filled.settings
package:net.fast_notepad_notes_app.fastnotepad
package:com.samsung.storyservice
package:com.android.dreams.basic
package:com.sec.android.app.music
package:com.google.android.overlay.modules.ext.services
package:com.samsung.internal.systemui.navbar.gestural_no_hint_extra_wide_back
package:com.sec.app.samsungprintservice
package:air.rcoandroidv1
package:com.inomera.sm
package:com.android.se
package:com.google.android.stardroid
package:com.android.inputdevices
package:com.pozitron.iscep
package:com.samsung.android.kgclient
package:com.samsung.knox.securefolder
package:com.samsung.android.app.talkback
package:com.android.bips
package:com.android.stk2
package:com.google.android.apps.adwords
package:com.samsung.android.game.gametools
package:com.google.android.apps.nbu.files
package:com.samsung.desktopsystemui
package:com.samsung.android.app.simplesharing
package:com.samsung.android.app.contacts
package:com.samsung.android.service.peoplestripe
package:com.sec.android.gallery3d.panorama360view
package:com.samsung.android.da.daagent
package:com.eset.ems2.gp
package:com.android.theme.icon_pack.circular.settings
package:com.dropbox.android
package:com.positive.ceptesok
package:com.samsung.android.brightnessbackupservice
package:com.samsung.android.app.reminder
package:com.adobe.scan.android
package:com.rarlab.rar
package:com.twitter.android
package:com.samsung.app.slowmotion
package:ru.yandex.yandexmaps
package:com.samsung.android.smartcallprovider
package:com.samsung.android.app.smartcapture
package:com.google.android.overlay.gmsconfig
package:com.sec.android.desktopmode.uiservice
package:com.google.android.apps.docs
package:com.google.android.apps.maps
package:com.google.android.apps.plus
package:com.google.android.modulemetadata
package:com.dsi.ant.plugins.antplus
package:air.testmakinesiv5.A0
package:com.samsung.android.app.taskedge
package:com.samsung.android.dynamiclock
package:com.microsoft.office.word
package:com.samsung.advp.imssettings
package:com.samsung.android.location
package:com.sec.android.inputmethod
package:com.samsung.android.app.advsounddetector
package:com.sec.android.app.clockpackage
package:com.sec.android.RilServiceModeApp
package:com.google.android.webview
package:com.samsung.android.mdecservice
package:com.android.theme.icon.teardrop
package:com.microsoft.office.powerpoint
package:com.android.server.telecom
package:com.google.android.syncadapters.contacts
package:com.samsung.crane
package:com.sec.imslogger
package:com.samsung.android.clipboarduiservice
package:com.android.keychain
package:com.samsung.android.ardrawing
package:com.android.chrome
package:com.samsung.android.ipsgeofence
package:tw.mobileapp.qrcode.banner
package:tr.com.ulkem.hgs
package:com.samsung.android.themecenter
package:com.android.theme.icon_pack.filled.systemui
package:com.google.android.packageinstaller
package:com.google.android.street
package:com.google.android.gms
package:com.google.android.gsf
package:com.google.android.tts
package:android.autoinstalls.config.samsung
package:com.samsung.android.container
package:air.fentest
package:com.samsung.systemui.hidenotch.withoutcornerround
package:com.android.calllogbackup
package:com.google.android.partnersetup
package:com.sec.android.diagmonagent
package:com.android.localtransport
package:com.samsung.android.biometrics.app.setting
package:com.sec.spp.push
package:com.android.carrierdefaultapp
package:com.dsi.ant.server
package:com.samsung.android.biometrics.service
package:com.samsung.android.icecone
package:com.android.theme.font.notoserifsource
package:com.sec.android.app.myfiles
package:com.android.theme.icon_pack.filled.android
package:com.android.proxyhandler
package:com.samsung.android.app.siofviewer
package:com.samsung.android.allshare.service.fileshare
package:com.netflix.mediaclient
package:com.android.theme.icon_pack.circular.systemui
package:com.sec.android.app.dexonpc
package:com.sec.android.mimage.photoretouching
package:air.cameraroll
package:com.sec.android.app.launcher
package:com.samsung.android.universalswitch
package:com.zhiliaoapp.musically
package:com.google.android.overlay.modules.permissioncontroller.forframework
package:com.sec.android.app.apex
package:flipboard.boxer.app
package:com.google.android.feedback
package:com.google.android.printservice.recommendation
package:com.google.android.apps.photos
package:com.carrefoursa.ecommerce
package:com.google.android.syncadapters.calendar
package:com.android.managedprovisioning
package:tr.gov.saglik.hayatevesigar
package:com.samsung.android.setting.multisound
package:com.spotify.music
package:com.samsung.android.arzone
package:com.samsung.android.authfw
package:com.sec.android.app.sbrowser
package:com.monotype.android.font.chococooky
package:com.samsung.android.visionarapps
package:com.android.dreams.phototable
package:com.arneca.dergilik.main3x
package:com.sec.android.service.health
package:com.samsung.safetyinformation
package:com.samsung.android.dialer
package:com.facebook.katana
package:com.samsung.android.dqagent
package:com.samsung.app.highlightplayer
package:com.sec.android.app.ringtoneBR
package:com.samsung.android.game.gos
package:com.samsung.android.forest
package:com.sec.android.app.vepreload
package:com.android.providers.partnerbookmarks
package:com.facebook.pages.app
package:com.samsung.internal.systemui.navbar.gestural_no_hint_narrow_back
package:com.sem.factoryapp
package:com.samsung.android.keyguardwallpaperupdator
package:com.samsung.android.app.camera.sticker.facearavatar.preload
package:com.trustonic.teeservice
package:com.android.wallpaper.livepicker
package:com.samsung.android.beaconmanager
package:com.samsung.internal.systemui.navbar.gestural_no_hint
package:com.sec.enterprise.mdm.services.simpin
package:com.android.apps.tag
package:com.facebook.orca
package:com.samsung.android.stickercenter
package:trendyol.com
package:com.facebook.system
package:com.samsung.android.oneconnect
package:com.galaxyfirsatlari
package:com.samsung.android.providers.media
package:com.sec.android.app.popupcalculator
package:com.sec.android.soagent
package:com.getir
package:org.mozilla.firefox
package:com.adobe.air
package:com.sec.android.app.quicktool
package:com.samsung.android.fmm
package:com.samsung.android.mdm
package:com.samsung.android.mdx
package:com.samsung.android.rlc
package:com.samsung.android.voc
package:com.sec.android.app.shealth
package:com.sec.unifiedwfc
package:com.android.theme.icon.squircle
package:com.sec.phone
package:com.pozitron.hepsiburada
package:com.samsung.android.bixby.wakeup
package:com.google.android.apps.translate
package:com.bionluk.androidapp
package:com.adobe.reader
package:com.adobe.psmobile
package:com.samsung.android.honeyboard
package:com.samsung.android.samsungpass
package:com.android.storagemanager
package:com.samsung.android.scloud
package:com.samsung.android.app.soundpicker
package:com.samsung.android.app.sharelive
package:com.sec.app.RilErrorNotifier
package:com.samsung.android.spayfw
package:com.android.bookmarkprovider
package:com.linkedin.android
package:com.android.settings
package:com.samsung.app.newtrim
package:com.samsung.android.dsms
package:com.samsung.android.lool
package:com.sec.android.app.bluetoothtest
package:com.sec.android.sdhms
package:com.samsung.android.app.spage
package:com.android.theme.icon_pack.filled.launcher
package:com.samsung.android.knox.analytics.uploader
package:com.samsung.android.sm.policy
package:com.android.networkstack.permissionconfig
package:com.sec.android.emergencylauncher
package:com.samsung.android.motionphoto.viewer
package:com.google.android.apps.books
package:com.google.android.apps.youtube.creator
package:com.google.android.projection.gearhead
package:com.tumblr
package:com.google.android.apps.giant
package:com.sec.hearingadjust
package:com.google.android.apps.turbo
package:com.samsung.android.bluelightfilter
package:com.turkcell.ott
package:com.samsung.android.bbc.bbcagent
package:com.samsung.android.visionintelligence
package:com.samsung.android.singletake.service
package:com.turkcell.paycell
package:com.knox.vpn.proxyhandler
package:com.android.cts.ctsshim
package:com.sec.android.splitsound
package:com.samsung.android.livestickers
package:com.samsung.android.app.watchmanagerstub
package:com.samsung.android.svcagent
package:com.sec.mhs.smarttethering
package:com.samsung.android.svoiceime
package:com.bilgetech.aygaz
package:com.ykb.android
package:com.samsung.android.mateagent
package:com.android.theme.icon_pack.circular.launcher
package:com.samsung.android.networkdiagnostic
package:tr.gov.turkiye.edevlet.kapisi
package:com.samsung.android.shortcutbackupservice
package:com.samsung.android.server.wifi.mobilewips.client
package:com.ininal.wallet
package:com.samsung.android.mcfserver
package:com.android.vpndialogs
package:com.samsung.ucs.agent.ese
package:air.duskelebeklerianaeng
package:com.google.android.talk
package:com.google.android.apps.ads.publisher
package:com.samsung.android.providers.contacts
package:com.piriform.ccleaner
package:com.android.phone
package:com.google.vr.vrcore
package:com.android.shell
package:com.android.theme.icon_pack.filled.themepicker
package:com.android.wallpaperbackup
package:com.android.providers.blockednumber
package:com.samsung.android.app.omcagent
package:com.armut.armutha
package:com.armut.armuthv
package:air.duskelebekleri2
package:com.hiya.star
package:tool.scanner.qrscan.barcodescan
package:com.android.providers.userdictionary
package:com.sec.enterprise.knox.cloudmdm.smdms
package:com.android.emergency
package:com.wssyncmldm
package:com.samsung.ims.smk
package:com.google.android.gms.location.history
package:com.android.internal.systemui.navbar.gestural
package:com.migrosmagazam
package:com.ptt.eptt
package:com.android.location.fused
package:com.android.theme.color.orchid
package:com.samsung.android.app.appsedge
package:com.samsung.android.samsungpassautofill
package:com.sec.epdg
package:com.android.systemui
package:com.goseet.VidTrim
package:com.sec.android.app.personalization
package:com.monotype.android.font.cooljazz
package:com.android.theme.color.purple
package:com.android.bluetoothmidiservice
package:com.samsung.android.sdk.handwriting
package:com.facebook.appmanager
package:com.adobe.lrmobile
package:com.samsung.aasaservice
package:com.samsung.systemui.hidenotch
package:com.android.traceur
package:com.samsung.android.allshare.service.mediashare
package:com.sec.android.provider.emergencymode
package:com.google.android.play.games
package:com.sec.android.app.applinker
package:com.samsung.android.cidmanager
package:air.dreamers2
package:com.sec.android.app.camera
package:com.google.android.apps.magazines
package:com.android.bluetooth
package:com.samsung.android.contacts
package:com.samsung.android.app.clipboardedge
package:com.samsung.ipservice
package:com.sec.android.app.magnifier
package:com.sec.android.widgetapp.webmanual
package:com.samsung.sec.android.application.csc
package:com.android.captiveportallogin
package:com.samsung.android.sdm.config
package:com.android.theme.icon.roundedrect
package:tr.gov.tubitak.bilgem.yte.utsmobil
package:com.samsung.android.app.dressroom
package:com.android.internal.systemui.navbar.gestural_narrow_back
package:com.samsung.android.app.motionpanoramaviewer
package:com.samsung.android.app.dofviewer
package:com.android.theme.icon_pack.rounded.settings
package:com.samsung.android.videolist
package:com.samsung.android.bio.face.service
package:com.samsung.android.bixby.agent.dummy
package:com.samsung.android.video
package:android.auto_generated_rro_vendor__
package:com.android.theme.icon_pack.circular.android
package:com.GoodTools.Uninstaller
package:com.google.android.apps.restore
..java.base/java.lang.Thread.getStackTrace(Unknown Source)
..com.adobe.air.DebugFile.printStack(DebugFile.java)
..com.adobe.air.ADTException.<init>(ADTException.java)
..com.adobe.air.android.AndroidDeviceOperations.uninstallApplication(AndroidDeviceOperations.java)
..com.adobe.air.ADT.parsePlatformOperationArgs(ADT.java)
..com.adobe.air.ADT.parseArgsAndGo(ADT.java)
..com.adobe.air.ADT.run(ADT.java)
..com.adobe.air.ADT.main(ADT.java)
Stack trace:
ADT exception: Failed to find package testandrocam
*** ADT Logging at 2022/04/10 11:08:58 ***
Called by: D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.821 called with: -installApp -platform android -device 2c754a9232017ece -package D:/testolandrohz1964bit/aab/30/to2018.apk
Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 2c754a9232017ece devices
ADB output = List of devices attached
2c754a9232017ece    device

Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 2c754a9232017ece install D:\testolandrohz1964bit\aab\30\to2018.apk
ADB output = Performing Streamed Install
Success
*** ADT Logging at 2022/04/10 11:09:08 ***
Called by: D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.821 called with: -launchApp -platform android -device 2c754a9232017ece -appid testandrocam
Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 2c754a9232017ece devices
ADB output = List of devices attached
2c754a9232017ece    device

Running ADB command line: C:\Users\geuge\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 2c754a9232017ece shell am start -a android.intent.action.MAIN -n air.testandrocam/air.testandrocam.AIRAppEntry
ADB output = Starting: Intent { act=android.intent.action.MAIN cmp=air.testandrocam/.AIRAppEntry }
*** ADT Logging at 2022/04/10 11:10:04 ***
Called by: D:\adobe air sdks\air_33.1.1.713\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.713 called with: -version
*** ADT Logging at 2022/04/10 11:10:08 ***
Called by: D:\adobe air sdks\AIR33.1.1.821\AIRSDK_Windows (2)\lib\adt.jar
ADT 33.1.1.821 called with: -version
ajwfrost commented 2 years ago

Okay so for the CameraRoll functionality:

If you can see the image picker then I believe this means the permissions stuff is all sorted. Can I check whether you then get the selected trace:

function imageSelected2(evt: MediaEvent): void {

    // Create a new imagePromise
    trace("selected");
    var imagePromise: MediaPromise = evt.data;

But then this could cause a problem:

    // Open our data source
    dataSource = imagePromise.open();
    tempDir = imagePromise.file.url;

since the "file" property is likely to be null...

See https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/MediaPromise.html and https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/CameraRoll.html#browseForImage() where it actually says: "Note that the MediaPromise object contains a valid file object on some platforms (Blackberry Tablet OS), but not on others (iOS and Android)."

You should be able to load the file via that dataSource object, once it's loaded... or simpler, can you just try it using a Loader object (Loader.loadFilePromise())?

mehmury commented 2 years ago

Thanks. As you said, the main cause of the problem is the use of MediaPromise.file. I solved the problem when I used it with Loader.LoadFilePromise(). However, I ran into problems compiling this usage with the latest AIR SDK (33.1.1.821). When I compile as aab with air sdk 33.1.1.821 and 33.1.1.795, the application crashes after it is installed on the device.

It also crashes when I install apk with 33.1.1.821. When I compile it as apk with 33.1.1.795, it works fine as apk. In previous air sdk versions, for example, when I tried with 33.1.1.743, the mentioned bug is still present I compiled my application that caused this Bug topic with 33.1.1.795 separately as 32 bit and 64 bit apk and updated it as apk on Google Play. My app seems to be back to life for now. I'm adding the actionscript structure that makes the app work:

[import flash.media.MediaType;
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.media.CameraRoll;
import flash.events.MediaEvent;
import flash.events.Event;
import flash.events.ErrorEvent;
import flash.media.Camera;
import flash.media.CameraUI;
import flash.media.MediaPromise;
import flash.display.Loader;
import flash.media.CameraUI;
import flash.utils.IDataInput;
import flash.events.IEventDispatcher;
import flash.utils.ByteArray;
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
import flash.errors.EOFError;
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import flash.display.Sprite;
import flash.ui.Mouse;
import flash.ui.MouseCursor;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.geom.Rectangle;
import flash.geom.Point;
import fl.transitions.Tween;
import fl.transitions.easing.Strong;
import flash.net.FileReference;
import flash.events.*;
import flash.net.FileFilter;

import com.adobe.images.JPGEncoder;
var cameraRoll: CameraRoll = new CameraRoll();
var dataSource: IDataInput;
var tempDir;
var jpg: JPGEncoder = new JPGEncoder();
var imageLoader: Loader = new Loader();
startCameraRoll.addEventListener(MouseEvent.CLICK, initCameraRoll);

function initCameraRoll(evt: MouseEvent): void {
    trace("Opening Camera Roll");

    if (CameraRoll.supportsBrowseForImage) {
        trace("support");
        // Add event listeners for camera roll events
        cameraRoll.addEventListener(MediaEvent.SELECT, imageSelected2);
        cameraRoll.addEventListener(Event.CANCEL, browseCancelled);
        cameraRoll.addEventListener(ErrorEvent.ERROR, mediaError);

        // Open up the camera roll
        cameraRoll.browseForImage();
    } else {
        trace("This device does not support CameraRoll functions.");
    }

}

function browseCancelled(event: Event): void {

    trace("cancelled");
}

function imageSelected2(evt: MediaEvent): void {

    // Create a new imagePromise
    trace("selected");
    var imagePromise: MediaPromise = evt.data;

    //dataSource = imagePromise.open();
    //dataSource = imageLoader.loadFilePromise(imagePromise);

    addChildAt(image, 0);

    if (imagePromise.isAsync) {

        trace("async");
        //var eventSource: IEventDispatcher = dataSource as IEventDispatcher;
        //eventSource.addEventListener(Event.COMPLETE, onMediaLoaded);
        imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onMediaLoaded);
        imageLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, imageLoadFailed);
        imageLoader.loadFilePromise(imagePromise);

    } else {
        trace("sync");
        MovieClip(root).image.visible = true;
        imageLoader.loadFilePromise(imagePromise);

        //image.addChild(imageLoader);
        image.uni.visible=true;
        image.uni.source=imageLoader;

    }
    function onMediaLoaded(event: Event): void {

        trace("onmedialoaded");

        MovieClip(root).image.visible = true;

        //image.addChild(imageLoader);
        image.uni.visible=true;
        image.uni.source=imageLoader;

    }

    function imageLoadFailed(event: Event): void {
        trace("Image load failed.");
    }
}

function mediaError(event: Event): void {
    trace("error:" + event);
}](url)

I couldn't understand the reason for the crash in the latest air sdk versions. I think the problem will be fixed in new versions. Thanks a lot for your help..