Skip to content

Export signed package missing in 4.5.0a4 #693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ludiccc opened this issue Jun 2, 2022 · 20 comments · Fixed by #695
Closed

Export signed package missing in 4.5.0a4 #693

ludiccc opened this issue Jun 2, 2022 · 20 comments · Fixed by #695

Comments

@ludiccc
Copy link

ludiccc commented Jun 2, 2022

The item "Export Signed Package" is not available. Only "Export Signed Bundle" is shown in "File" menu. Is there a new procedure to export a package for distribution?

@rupeshkumar22
Copy link
Contributor

APK is no longer being accepted for distribution on Google Play Console, Also you can test your app on an emulator or on the actual device through Processing IDE. As the package create option has been removed you can still make a universal APK from exported bundle using the bundletool.jar

command to generate a universal APK from AAB file is as follows -
bundletool build-apks --bundle=sketch_2617**_release_signed.aab --output=myapp.apks --mode=universal
Now unzip the generated zip file, and you will see the generated APK file.

@rupeshkumar22
Copy link
Contributor

@codeanticode @ranaaditya Do we require an Export option for APK? I observe that APK files are sharable and installable on devices and APKs are still widely being used for distributions out of the Google Play Console.

@ludiccc
Copy link
Author

ludiccc commented Jun 2, 2022

The whole idea of using Android mode in Processing is to provide a faster and better way to develop apps with all the Processing framework.

The tutorial must be updated to show the new stuff around this: https://android.processing.org/es/tutorials/index.html, it should simplify these problems.

@rupeshkumar22
Copy link
Contributor

@ludiccc A lot of things have been updated recently in Android Mode and some are in the process. Updating the website is one of the tasks in progress. As the website update involves updating pages in multiple languages and requires updates of image resources as well, It can be a little time-consuming. But, We will try our best to update the website as soon as possible. Thanks for your patience and understanding.

@ludiccc
Copy link
Author

ludiccc commented Jun 3, 2022

Yes, I understand that and is it fine, we are on the Open Source community.

In the meantime, is there a roadmap for using Android Studio properly with the actual state of the Processing+Android code?

I've followed the instructions on the tutorials but Android Studio complains about too many things that I can't continue and it doesn't seem worthy to open issues for each one of them. Some new instructions can help a lot.

@codeanticode
Copy link
Contributor

@ludiccc the reason I removed apk export is that the Google's play store only accepts aabs:

https://android-developers.googleblog.com/2021/06/the-future-of-android-app-bundles-is.html

@rupesh-kumar-lpu couldn't aab files used in the same way as apks to distribute an app outside the store? I did test installing an aab manually from the command line using adb.

@dzaima
Copy link

dzaima commented Jun 4, 2022

AFAICT from a quick search, while .aabs might be installable through adb, they can't outside of it, which makes it useless as a sideloading sharing method.

@codeanticode
Copy link
Contributor

Ok I see. No problem, I will put apk export back in for the next release.

@ranaaditya
Copy link
Member

Yes, I understand that and is it fine, we are on the Open Source community.

In the meantime, is there a roadmap for using Android Studio properly with the actual state of the Processing+Android code?

I've followed the instructions on the tutorials but Android Studio complains about too many things that I can't continue and it doesn't seem worthy to open issues for each one of them. Some new instructions can help a lot.

Hi @ludiccc , thanks for raising the issue, I think Andres and Rupesh have solved your issue.

To use Processing in Android Studio is little bit trouble as it has various gradle files so studio finds it hard to detect the proper configuration, you have to use it as a external library and for reference you can take help from my this repository

In case you don't understand it, you can revert back to this thread anytime.

Thanks for using Processing,
rana

@ludiccc
Copy link
Author

ludiccc commented Jun 4, 2022

As the plan is for the apk export to be included again in the next release, we can conclude this issue. Thanks to everybody :-)

@ludiccc ludiccc closed this as completed Jun 4, 2022
@rupeshkumar22
Copy link
Contributor

rupeshkumar22 commented Jun 4, 2022

@codeanticode Yes, AAB is installable through ADB and It worked fine for me as well. Outside play store, I mean to say here is for third-party distribution app stores. I assumed that many third-party app store websites still be using APK upload options for distribution purposes as the APK was there for a long and it has recently been prioritized to use AAB. But the APK is getting deprecated slowly. I think AAB is the future of distribution and We can remove the option of APK export in the near future. For now, your decision to keep the APK export option can be handy for users as a System APK installer on Android devices for direct installation is usually there.

@dzaima
Copy link

dzaima commented Jun 4, 2022

Distributing APKs through means like GitHub releases is still common (this includes me), and as long as versions of Android are in use which don't support easily installing .aabs (which afaict is all current versions, and currently-in-use android versions will be used for many many more years (this also includes me)), APKs aren't going anywhere.

@codeanticode
Copy link
Contributor

@rupesh-kumar-lpu @ranaaditya we could put apk export back in, sounds like it serves an important function for app distribution outside of the play store. If we do, I'd re-implement the functionality using a gradle task to generate/align/sign the apk instead of doing the aling/sign work ourselves, just like aab export works now.

@rupeshkumar22
Copy link
Contributor

@codeanticode @ranaaditya the option to use grade task for release apk creation sounds good, let me know if I can do something about it. Thanks!

@codeanticode
Copy link
Contributor

The gradle task to generate signed apks ready for distribution is "assemble", correct?

https://developer.android.com/studio/build/building-cmdline

@codeanticode codeanticode reopened this Jun 15, 2022
@rupeshkumar22
Copy link
Contributor

rupeshkumar22 commented Jun 15, 2022

We can execute 'assembleRelease' via tooling API methods. It will use signing information from the file. @codeanticode

@codeanticode
Copy link
Contributor

Just realized the code is all in there already :-)

https://github.com/processing/processing-android/blob/master/mode/src/processing/mode/android/AndroidBuild.java#L792

Only need to add the menu entry to call the exportPackage() function.

@rupeshkumar22
Copy link
Contributor

Yes, We can change keystore manager. I created a boolean earlier to differentiate the type of task(Bundle or APK). e08fa30

@rupeshkumar22
Copy link
Contributor

If you are not working on it, you can assign it to me @codeanticode

@codeanticode
Copy link
Contributor

I made some quick changes:

9e57a33

If you can review and make fixes if needed, I will create a new alpha release of the mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants