Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What will happen if you use App Bundle instead of apk

What will happen if you use App Bundle instead of apk

Matsuda Jumpei

August 01, 2019
Tweet

More Decks by Matsuda Jumpei

Other Decks in Programming

Transcript

  1. What will happen? if you use App Bundle instead of

    apk shibuya.apk #36 @red_fat_daruma
  2. What will happen if you use App Bundle instead of

    apk shibuya.apk #36 @red_fat_daruma 今更更聞けない App Bundle で何が変わる?(邦題)
  3. today's contents Agenda ▸ Big changes ▸ What will be

    installed ▸ Download size for users ▸ The limit of the file size which users can install ▸ New Features and/or Tips ▸ Dynamic Delivery ▸ Prevent Sideloading ▸ Frequently asked questions ▸ Known issues and/or limitations 3
  4. What do App Bundle change? Big Changes ▸ What will

    be installed ▸ Optimized .apks for each device, which is built from .aab file ▸ base.apk and configuration .apk s ▸ Download size for users ▸ Significantly decreased ▸ The limit of the file size which users can install ▸ Increased to 150 MB! It was 100 MB. 4
  5. App Bundle can realize... New Features and/or Tips ▸ Dynamic

    Delivery ▸ Download and use *required* modules at run-time ▸ Also, can delete modules if it's no longer needed ▸ e.g. Onboading guide ▸ Require API 21 and higher but *fused* option is help for lower versions 5
  6. New Features and/or Tips ▸ Prevent Sideloading: Block installing apps

    bypass PlayStore ▸ A few line configurations can do it ▸ For Application class and ContentProviders (if used) 6 class AnyProvider : ContentProvider { override onCreate(): Boolean { if (MissingSplitsManagerFactory.create(context) .isMissingRequiredSplits) { return false } super.onCreate() ... } } class CustomApplication : Application { override fun onCreate() { if (MissingSplitsManagerFactory.create(this) .disableAppIfMissingRequiredSplits()) { return } super.onCreate() ... } } App Bundle can realize...
  7. Some of you might misunderstand this Frequently Asked Questions ▸

    in-app updates ▸ Do not require App Bundle ▸ The official documents are currently hosted in the App Bundle section, though. ▸ App distribution ▸ internal app sharing and internal tracks are required to check Dynamic Delivery for example ▸ DeployGate does not currently accept .aab 7
  8. App Bundle is not kinda silver bullet Known Issues and/or

    Limitations ▸ Around the download file size restriction (150MB) ▸ on-demand modules must meet this restriction ▸ obb file is not supported ▸ Around app package naming ▸ Root package names like *lib* and *res* cannot be used because of aab file structure ▸ Around dependencies ▸ API 21 and higher is required basically ▸ + Require newer Play Services regardless of OS version ▸ Around sideloading ▸ New APIs since Android Q must be required ▸ Otherwise ▸ Read the official documents and unofficial blogs 8
  9. Closing... positive stuff Summary ▸ Big Changes ▸ Optimized apk

    will be generated for each device ▸ Download size has been decreased significantly ▸ A file whose size is less than150MB can be installed w/o obb ▸ New Features and/or Tips ▸ Dynamic Delivery : Manage *required* materials dynamically ▸ Prevent Sideloading : Block app-launch from non-PlayStore installs ▸ Answers to frequently asked questions ▸ In-app updates works w/o App Bundle ▸ Distribute apps via official delivery systems if you'd like to check Dynamic Delivery etc. ▸ DeployGate cannot accept .aab for now (I'm in charge of supports...) 9
  10. Closing... negative stuff Summary ▸ Known issues and/or limitations ▸

    The size restriction is not avoidable if you are using Dynamic Delivery ▸ Does not support obb file ▸ Some of root package names like *lib* and *res* have been forbidden ▸ Depends on OS and Play Service versions ▸ New API since Q is required to install .aab (i.e. .apks) ▸ etc. 10
  11. Closing... Appendix ▸ Overview ▸ https://developer.android.com/guide/app-bundle ▸ in-app updates ▸

    https://developer.android.com/guide/app-bundle/in-app-updates ▸ Prevent sideloading ▸ https://developer.android.com/guide/app-bundle/sideload-check ▸ https://objectbox.io/app-bundle-and-sideloading-how-to-prevent-crashes/ ▸ Dynamic Feature ▸ https://developer.android.com/studio/projects/dynamic-delivery#feature_build_config ▸ https://developer.android.com/guide/app-bundle/playcore ▸ Codelab ▸ https://codelabs.developers.google.com/codelabs/your-first-dynamic-app/index.html ▸ https://codelabs.developers.google.com/codelabs/on-demand-dynamic-delivery/index.html ▸ Keywords ▸ app bundle, aab, dynamic feature, dynamic delivery, play core library, split manager, sideloading, in-app updates etc... 11
  12. Onaka suitane Thank You for Listening! ▸ Jumpei Matsuda /

    daruma ▸ Software Engineer @DeployGate ▸ GitHub: jmatsu ▸ Twitter: red_fat_daruma ▸ Please feel free to ask any questions 12