Android N Developer preview introduced a new feature called Android Instant Apps.
I read basic information about this topic and here is my understanding:
Android Instant Apps enables Android apps to run instantly, without requiring full scale app installation. that means suppose user discovered an app from search, social media, messaging or other deep links, they can directly access Activity belonging to this App,and use functionality within the app, without going to Google Play store, clicking Install App etc. thus bypassing app installation flow.
But then, suppose the Activity which is getting installed through Instant apps requires a Dangerous permission to work, when it will be invoked?
Basically, how android runtime permissions are to be handled in Android instant apps?
As per the Instant Apps FAQ:
How do permissions work in Android Instant Apps?
Android Instant Apps uses the runtime permissions model introduced in Android 6.0. If an app supports the permission model introduced in Android 6.0 (API level 23), it does not require any additional work to become an Instant App that runs on older devices.
No matter what device an Instant App is used on, it will always use the runtime permissions model.
Related
I was looking for an answer whether Google allows to install externall C++ applications together with Android Apps on Google Play. I found some information on this site: Developer Policy Center - Malicious Behavior.
They say, that the following sentence is explicitly prohibited:
Apps that install other apps on a device without the user's prior consent.
Now my question is, what exactly does mean other apps? It is about other apps in Google play or any apps like my external C++ program that I want to execute in Android app? Does I have to inform users that some C++ app will be installed in the device?
first i you want to execute an c/c++ application in android , the only right and best way is to convert that app to a static or shared library using android NDK and after that you can use it by Java Native Interface (JNI).
second , "other apps" in the sentence that you mentioned in your question , some application can install some applications in system without user permission. for example in a rooted device we can simply install application without showing any windows or getting permission. in android old release because of some security issue in non-root device we was able to install an application without asking permission.
see this link for more information :
https://paulononaka.wordpress.com/2011/07/02/how-to-install-a-application-in-background-on-android/
Update
google wont allow developers to do that because android system cannot track this executive and it could be virus or dangerous tool that may harm android system
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
So I have this app that I made before the Android M came out, the app has permissions such as Camera(using custom camera within the app) Write & Read from external storage and System Alert permission I installed the app to my phone which has android 6.0 and the app was able to run normally and without any restrictions. I was able to use the camera, save files into sdcard & show a custom view using the WindowManager API.
please take a note that the target SDK for the app is android lollipop.
my question: is this even possible? the OS let apps that has target SDK smaller than M to run perfectly without asking for permissions? and if this is actually the default behaviour that android developers implement?
P.S: the identified question is not really applicable for my question. and i don't see any similarity between them at all.
Yes, it is possible. But that can give you a big problem. If the user deactivates some permission your app simple crushes because the permission is no longer available. The OS ask the user "This app was developed for a previous android version. disabling this permission can cause unexpected closing of the app" (ore some thing similar). In conclusion this is the normal behaviour because the android version that you are using to compile your app is before permissions needed to be confirmed by the user.
https://inthecheesefactory.com/blog/things-you-need-to-know-about-android-m-permission-developer-edition/en
this link explains all you need to now about your question .
Yes, if your app has targetSdkVersion below 23, it will work on M and above without asking any permissions (they will be asked during installation).
But if user will revoke any permission himself, app will crash. It was made by Google to get backwards compatibility with old applications that does not support new Permissions API.
You can read more about it here.
Here is quote from that page:
If the device is running Android 5.1 or lower, or your app's target
SDK is 22 or lower: If you list a dangerous permission in your
manifest, the user has to grant the permission when they install the
app; if they do not grant the permission, the system does not install
the app at all.
How will the Instant app affect the already existing app ? When its out in the market does it mean that all the existing app must be made compatible to be behave like instant app ?
Does anyone has any idea if these could be integrated with the Hybrid apps?
Will it be using the run-time permission mode ?
What will happen to the games app and other apps that has information stored about the progress of the players and the current state ?
Does this seems to be the future of the apps? What is the actual benefit in having the instant app?
Instant Apps documentation has been published: https://developer.android.com/topic/instant-apps/index.html
Instant Apps are opened through URLs. If the app is installed, then this behaves like a normal deep link. If the app is not installed, the Instant App can be launched instead.
Instant Apps must support runtime permissions.
Android Instant Apps enables native Android applications to run in response to launching a URL, without installing the app. Instant apps can use many Android APIs and you use Android Studio to build them.
How do they work? When Google Play receives a request for a URL that matches an instant app, it sends the necessary code files to the Android device that sent the request. The device then runs the app.
Note: Android Instant Apps only work on Android devices running on Android 5.0 (API level 21) or higher.
Reference:- android Developer Instant app
As from Google I/O 2016 key note, Google has Introduced Android Instant Apps
This is pretty clear from the description that it is going to be possible to download a part of application (that is stream?) when it will be out for the developers to try it.
Couple of posts like This one quotes about Instant Apps :
While this is different from Google's efforts to do app streaming inside search, it's in the same spirit — and gives Google similar access to previously walled-off data inside apps.
I am wondering how it is different from app streaming if the app is going to be installed partially with Android Instant Apps?
Any additional information about this new leap in android development will be helpful.
A module of the app gets downloaded inside a sandbox. As the user navigates to the boundaries of the app more app modules will be downloaded. You as a developer will need to determine when to prompt the user to download the full app. Note that the app state inside the sandbox will not automatically be transferred over when the user downloads the full app. Furthermore, whilst the instant app module(s) will be cached inside the sandbox there is no guaranteed persistence.
Android Instant Apps enables native Android applications to run in response to launching a URL, without installing the app. Instant apps can use many Android APIs and you use Android Studio to build them.
How do they work? When Google Play receives a request for a URL that matches an instant app, it sends the necessary code files to the Android device that sent the request. The device then runs the app.
Note: Android Instant Apps only work on Android devices running on Android 5.0 (API level 21) or higher.
Reference Android Instant Apps