Does Flutter is Instant App available? - android

I'm very new to Flutter and I have to know before learning if Flutter works with Instant App.
Thanks.

Instant apps is currently unavailable on Flutter. There is not really a way to split the functionality, but Flutter also makes your app bigger as you can see in this discussion: https://groups.google.com/d/msg/flutter-dev/JpoMCJsPF-4/lzbUdLigAQAJ
"A trivial Java app does not ship with any graphical engine or widget, everything is provided by the Android Runtime, even most of the standard Java libraries.
A Flutter app has to ship with pretty much everything: engine, widgets, standard libraries, etc ..."
I am not completely sure about how much bigger (this example states about 7MB install size), but as Instant Apps have to be below 4MB I don't think Instant Apps will come to Flutter any time soon if ever.

This year google released Google Play Instant, which basically is a program to test games and application without need to install them on actual device (like Android instant apps). Right now it looks like you have to apply in order get access to the program, but soon should be available for more applications. You can apply here if you want.
This program does not have 4MB limitation any more, but 10MB for the build file size. I guess this is something which could help Flutter applications, because usually they have bigger file size.
In conclusion I would say:
As long as you have android build file (.apk or .aab) and it's under the upload limitations for Google play store, you can ship it in Google play store as Instant version of your application.

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.

Criteria in favor of AppBundle

Google Play is not the first time insistently offers to use the App Bundle application.
I started to understand, but did not see many criteria and reasons to use it in my project, so please tell me who has already encountered or managed to notice more than me.
One of the main criteria that I managed to identify for myself is the ability to load functions On Demand. By the way which are very well described here.
But based on this, the only criterion that comes to my mind is that you can load those or modules as needed.
It is also not clear how the choice of screen extensions/specific platform when downloading the application from the Google Play Store.
App Bundle allows your app to be split up along different lines.
https://developer.android.com/platform/technology/app-bundle
It's easy to switch. You don't need to refactor your code to start benefiting from a smaller app. And once you've switched, you'll benefit from modular app development and customizable feature delivery.
Therefore like you mention
One of the main criteria that I managed to identify for myself is the ability to load functions On Demand. By the way which are very well described here.
So Google can be clever and send a subset of your app to the device. (The benefit being faster download times for your app. More acquisition, less user drop off on install).
If your app targets tablets and phones, google can be clever and only send the tablet resources to the tablet. Same example can be said for languages and other resource types.
Documentation benefits:
They give 6
TLDR: 1 file to upload when making an app
Build one artifact that includes all of your app's compiled code, resources, and native libraries for your app. You no longer need to build, sign, upload, and manage version codes for multiple APKs.
TLDR: smaller downloads for users
Google Play's Dynamic Delivery uses your Android App Bundle to build and serve APKs that are optimized for each device configuration. This means your users enjoy a smaller app download without the unused code and resources needed for other devices. Track the size of your app in the new app size report in the Google Play Console.
TLDR: smaller downloads for users
Customize and control your user experience by delivering features to the devices and users you choose, as and when they're needed, instead of at install time. This means that adding features no longer has to result in adding to your app's size at install time. Use conditional delivery to deliver features to countries, device types, or devices running a minimum SDK version. Use on-demand delivery to deliver features on demand, which can be installed and uninstalled as needed.
TLDR: More maintainable code
The Android App Bundle enables modular app development so you can design, build, debug and test your app's features as independent modules that can be added to your main app when ready. You'll see fewer merge conflicts and disruptions because you no longer have to have an entire engineering team working on the same monolithic app with complex and bloated code.
TLDR: Faster build speeds
Build systems, such as the Android Studio build system using Gradle, are optimized for modular apps so they are significantly faster to build than large, monolithic apps. You'll spend less time sitting around waiting and more time designing, coding, and testing your app.
TLDR: Better user acquisition
Instant-enable your Android App Bundle or instant-enable specific dynamic feature modules to give users a frictionless way to experience your app. Users can launch your experience from the Try Now button on Google Play and web links without installation.

Android app without instalation?

Last time I've heard about running android app without installing it.
Like "demo app" or something like that.
What doest it mean?
Generally you have to go to Google Play in order to install the app and run it.
It isn't via a browser, because you can supposedly use the android app functions
Instant Apps are the next step in app evolution, a universal Android solution that brings the speed and power of a native app with the ease and immediacy of a web app. They look and operate just like one of the apps that are installed on your phone, but you don’t need to download anything.
Android Instant Apps allow you to use native Android apps in a form that doesn’t even require installing. Which means the users get to experience interactive and smooth interfaces with the tap of a finger.
Note: Android Instant Apps only work on Android devices running on Android 5.0 (API level 21) or higher.
For further info about instant apps you can refer to following link
https://developer.android.com/topic/instant-apps/overview.html#apps-features
An instant app is a portion of your app that will be executed in response to an Url. This was introduced by Google year.
Google play store will download the code necessary to execute the task it is supposed to and it will dispose of the code after the user is done.
You would create an Instant apps if you mean to provide specific feature of your app that does not require the user to download the full app. Ex: watch a video on vimeo by clicking a link on social media
This apps are built using the same process you would use to develop a regular android app but instead of developing all of the features in the same module you divide the features in different modules.
This modules should be very small and have a size limit of 4MB.
Instant apps are currently limited to a few countries, so if you are thinking of developing one and putting in production check the link below for this information and others documents on how to get started.
https://developer.android.com/topic/instant-apps/overview.html
It's Instant App.
Here you have Google documentation

How big is the download for my users if my app requires the 2015 Android Vision API?

I am interested in adding face detection to my app (com.google.android.gms.vision.face the Google Play services 7.8 version as described here here and here)
But in the documentation it says 'Adding the vision functionality dependency to your project's AndroidManifest.xml will indicate to the installer that it should download the dependency on app install time'
Its very important to me that my App size should be small and not require a huge download- so does anyone know how big the 'dependency' for com.google.android.gms.vision.face will be and how much it will add to my download for users that don't already have it?
Also do people know if iOS works the same way?
Your app size always depends upon the artwork you have used to beautify your app interface, how detailed your application has been developed and how many dependency the application is using, sometime the application size is very small on app store, but after downloading the app on phone, the app installs dependency on run time and consume some disk space.This approach save developers to submit heavy applications to the store.
This can be true for both platforms i.e. iOS and Android. I am expert on iOS development so don't know about this specific dependency com.google.android.gms.vision.face. So any expert on Android might answer this. But I think it might not take so much memory as, it will not contains any images but few kbs of files.

Blocking Apk's from installing directly into BB10.2.1 updated devices

I port my android apps for making bb10 builds . Since now from bb10.2.1 update blackberry has introduced a new concept wherein apk's can be directly installed and can be installed in BB10 devices if the manage apps in settings menu of the phone is made ON. My question is that I wanna restrict my users from doing so and not installing the apk's into bb10 . And take download my app only from appworld.
Has anyone faced and has fixed this issue kindly tell me on how to solve the same.
Based on the Android behaviour, I don't think you can restrict users from doing so.
I haven't tried it on BlackBerry but from what you say, that option sounds analogue to the Unknown sources setting under Security settings on Android. If the user enables the installation of applications from unknown sources on their phone, there is now way to prevent the direct install of the apk (by adding something to your apk or any other way).
There is no way to restrict it to BlackBerry World only. If they get the APK, they can load it directly this way. There may be other ways around it though.
If, for example, your app is for sale and people are side loading a pirated copy, you could change your app to be free, and put some advanced functionality in your app behind an in-app purchase. That way they'll be forced to go through the storefront at some point to pay. This takes bigger changes to your app though, and the IAP implementation is likely different between BBW and GPlay.
You could also put in a version check: when your app launches, it checks a special file on your web server to see what the latest version of the app is. If they don't have the latest version, it doesn't let them use the app until they upgrade. This won't prevent side loading or piracy outright, but you can put out updates often enough to make side loading very annoying. When they are roadblocked and told to get the new version, you can link directly to the storefront to encourage them to get the latest version there.
Thirdly, and lastly, if you port your app to a BlackBerry 10 native, cascades, or WebWorks app, the app file is fully protected and can't be pirated or extracted from BlackBerry World (since the platform is secure). That will 100% protect you from piracy on BlackBerry 10.
I hope this helps!

Categories

Resources