How far can I automate Android Studio project cloning and building? - android

I've read that you could automate builds quite a lot, but what about creating an equal project and changing a few things like the app name and colors.xml values for uploading to the Play Store? I am developing many similar apps that are a copy of each other with different names, pictures, icons and colors for quantity distribution at a low price. This would be easy for a website as you could store all changing variables in a single file and then upload that through an FTP Client, but when it comes to Android software, it's obviously different.
I am looking to learn a way to make something like a .bat file or cmdline Command that would let me do this quick, and output a Signed APK ready for upload. Thanks in advance

This is probably against Google Play terms of service. See the Policy site, especially the "Spam and minimum functionality" section.

Related

How to test and deploy a Flutter app with more than 150 MB of assets?

The assets in my Flutter app are about 300 MB in total (lots of media files, which are the essence of the app and can't sensibly be trimmed down).
As I understand it, there are two ways to upload apps to the Play Store:
An APK file (legacy) containing binaries for all platforms. It looks like APKs are limited to 100 MB.
An App Bundle (new) which lets the Play Store figure out what bits to deploy where. App Bundles have a limit of 150 MB on what the user actually downloads.
For APKs, the way to work around this limit is APK Expansion Files (often "obb" files), which can be up to 2 GB. I could try to get this to work with Flutter, but the APK delivery method is somewhat deprecated, and has other drawbacks like bloating the install size with unused binaries. So I'd rather not use this approach.
For App Bundles, a similar mechanism exists in the form of Dynamic Asset Delivery. There are three options, depending on when the user will download the asset pack: during installation, right after installation, or on demand. The install-time option sounds most transparent and simple and is limited to 1 GB, so it would be great for my use case.
Sadly, Flutter does not yet support Dynamic Asset Delivery. Fortunately, when using install-time delivery, it looks like these assets become available through the regular AssetManager class provided by the system. At first I thought Flutter might pick them up without having to write any Java/Kotlin code, but no, it uses its own assets mechanism, and there is nothing but a proposal for getting access to the AssetManager. So I'd have to do some legwork myself to interact with the Java world, but it sounds doable.
To create the bundle in the first place, I followed these steps. Now how do I run the app?
flutter run produces no errors, but doesn't seem to install the asset bundle, so all my assets are missing during testing. I suspect it builds an APK directly, rather than building an app bundle and then creating an APK from that. And because IntelliJ IDEA also seems to invoke flutter run or something similar, my debugger and other IDE integration are useless now.
flutter build appbundle seems to work and spits out an .aab file. For testing, presumably I could use bundletool to create an APK out of this and install it, but that would be a terrible development experience compared to Flutter's usual sub-second hot reload.
Is this a dead end? Is there another way to deliver an app with large assets through the Play Store? Please note, I'm not interested in external hosting unless it offers free and (near) unlimited traffic, because this is a noncommercial project.
(On the App Store for iOS, the limit seems to be 4 GB, no questions asked. Whot?)
For deploying, this is now supported by using Deferred Components (which is introduced in around Mar 2021).
Technical details in Flutter wiki
With Deferred Components you can distribute large assets through Play Feature Delivery (no Play Assets Delivery yet).
In my opinion the documentation is a bit lacking (especially for using feature to deliver assets only), but after digging into source code + trial and error, I can distribute an app with 150MB+ assets as dynamic feature through Play Store (to testers).
For testing, I can't find another way other than bundletool as you mentioned. What make it worse for me is some Deferred Components APIs seem to work differently on the apks built by bundletool and the apk built by Play Store, so testing can be even more time consuming and painful than it looks.

How can I know if provided source code was used to build APK?

tl;dr: I'm wondering if there's anyway for me to ensure that the source code I (re)viewed on GitHub for an open-source project was actually used to build the APK I'm downloading from Google Play?
Let's say I want to find an app for encrypting files on my local Android device. There are several apps available when googling, many open-source. As I'm going to encrypt sensitive information, I'd like to ensure it's done correctly (and without bad intent), so I review the source code for the app. All looks okay, so I download the app from Google Play and start using it.
If the developer of the app wanted to, they could just offline modify the source code (in a "private build step", so to say), and inject whatever they want (send the unencrypted file content somewhere, fake-encrypt the files, whatever), build the APK and upload that APK to Google Play instead.
Is there anyway to verify the APK actually came from the source code?

Automate screenshots for Play Store

I have an app to publish on Google Play Store. The app comes with a lot of different languages and I need to provide screenshots for every single one of them.
It's time consuming so I'm looking for a solution to automate the process.
I found this one (Screengrab). The problem is, you need to install a separated component and it's only available for Lunix platform when I'm currently running Windows.
Do you know any other way to do that?
There are several tools at the market that can help you with the creation of all required localized screenshots in different resolutions.
TOOLS
Here is a tool where you can export different resolutions and localizations with very less effort.
Launchmatic
Furthermore you can find an overview of different tools that can help you with an easy screenshot creation.
Screenshot Tools Overview
Uploading process
As an addition, however you create your screenshots, uploading more than 1000 screenshots for the playstore/appstore is still very time consuming.
Fastlane
You can setup your own pipeline with fastlane to automate the process of uploading screenshots. Disadvantage: You need to setup the environment for fastlane and learn how to use it.
FASTLANE
AppStoreManager
Service that provides an "ready-to-use" solution for uploading your screenshots automatically. Just provide a ZIP file with the screenshots in the right format and let the upload handled via the service.
App Store Manager

Android: updating an existing app on google play store using a patch file

I have an application on google play-store. The size of the apk is too large around 40MB due to some known reasons. So, whenever i update my app and upload the apk, users have to download entire 40 MB i suppose.
So, is it possible to release a patch instead of re-uploading the entire apk. Large applications whose size is in hundreds of MB's follow this approach, that is the user need not re-download hundreds of MB of data again. If this approach is possible in my scenario, then what code modifications should be included in my apk, such that next release can just include a patch.
I have searched quite enough, but haven't found anything related. It shall be really helpful to me and others referring the post if anyone answers this query of mine.
Thanks in advance.
You can consider creating another application and uploading it and make your main application use that other application. Such as they have MX Player application and MX ARM codec in the Google play. It is possible for one application to use features from the other one if they both, say, define the same custom security permission.
There is also apk extension mechanism http://developer.android.com/google/play/expansion-files.html
Other than that I don't know

phonegap build android signing

I have used HTML files to build an application for Android on PhoneGap's website. I want to release it as a free App and signed up with the Play Store and all that. However when I upload it, it says I need to sign my application and such because it is in Debug Mode. I have searched on here and the web for help but I cannot figure out how to sign the App or add Keystore files and such in the PhoneGap Build website.
I checked the documentation for it on there website. I would post the link but I can only post 2 for my reputation. It is quite vague and it says there is more information on the Google Play documentation:
While there was more information it directed me to use something called "Keytool utility" and that seems to be my disconnect. Where would I find this utility so I may use it?
I also checked this question and its answers but it again left me in the dark:
Error signing android app on phonegap build
Here are other questions I have searched in for clues or anything I could use --
I tried this one but I do not know where they are finding this command line. I do not see it on the phonegap build website and they said I didn't have to install anything.
How to generate a signing keystore file for PhoneGap Build within Mac OSX?
Someone suggested to another user on here to follow a tutorial on mobiletutsplus and i am familiar with Eclipse for HTML/CSS but I do not understand their signing section. Am I missing a program here or something?
Download and install the Android SDK, be sure to update it, open a dos command line, and launch the script/exe called keytool which will be located in your Android SDK inside the tools/ folder or the platform-tools/ folder.
When asked how long the certificate should last, select something long like 99 years or 120 years. Be sure to note down all the identifiers you use to generate your key, and be sure to back up your key in a secure location after signing your apk.
If you ever lose that key, there is no way to replace it and you won't be able to update your existing app without losing its current users, its current reviews, its current ratings, and its current ranking it may have garnered over time.
When signing your app, you will be able to do it from the dos command line as well, however, you may prefer to install Eclise and use the IDE itself to help you to import your application, to do the packaging and the signing. Eclipse just uses the same command line tools in the background to package the app and sign it, but it gives you a visual interface to do with, so you may prefer to do it that way. And basically, the way you'd package and sign an Android Cordova/Phone Gap app is exactly the same way you would package and sign a standard Java Android app.
Whoever gave you the idea of viewing a video tutorial, that's probably a good idea. That video is only 3 minutes and 43 seconds long, so it's a good investment of your time. It's not complicated, but there are a bunch of little steps to follow and it's easy to miss one if you're just following what's written on the documentation.

Categories

Resources