Installing an external C++ program in Android - android

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

Related

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

Can an Android app auto-upgrade itself?

The device my Android app is running does not have Playstore on it. The plan is to pre-install the software when shipping the device. I am now looking for a strategy to upgrade the application.
I found this useful link to install an Android app from the apk file:
Android: install .apk programmatically
I am thinking I will use this logic to auto-upgrade my app. I am wondering if it is even possible. I am thinking the upgrade will first try to uninstall existing version but will fail as the executable is still running and the file may be locked. Is there a better way? Regards.
Peter, we've just implemented the same thing.
Users have the software pre-installed on their device and we host update APK's on the companies servers.
From the app they can then check for updates where we have a WCF service which extracts the APK file (essentially a .zip) and returns the manifest details. From there we have the version of the APK and can compare it against the local version.
If the user decides to upgrade they can download the APK and you can automatically launch it. At which point the user will be told the application is going to be updated. There are no file locks etc, the app will just close and restart using the new version.
Note: Downgrading is not "automatic". The user would have to first uninstall the app. For upgrades, however, it's a simple case of downloading and launching the APK version (the user will be told they need to allow installations from unknown sources if this is not checked).
You have a couple of options, depending upon your target system.
Use the link you posted. This will provide the user with a traditional install dialog, whereby the user can choose to install or not. You should avoid doing that automatically, as APKs can be large and you might irritate the user if they don't want updates.
You can install updates magically, but you will require the firmware signing key (or possibly root, but I haven't tested that). That will not ask for consent from the user. You will need to add additional code using reflection to access the installation methods of Android. If you go this way, you should build an opt-out/in mechanism.
If your app is open-source, F-Droid would solve the problem for you.
F-Droid is an installable catalogue of FOSS (Free and Open Source
Software) applications for the Android platform. The client makes it
easy to browse, install, and keep track of updates on your device.
Mainly, it updates your app when necessary. (Or just have a look at its source code for inspiration on how to do it).
Yes but as far as I remember only if you had Root privileges in order to have access to the INSTALL_PACKAGES permission.

Android system app

I'm developing a remote-control application for Android.
I want to be able to lock/unlock the screen.
To do this there are two ways:
Making the app a Device Administrator.
Using PowerManager.goToSleep(), which requires the DEVICE_POWER permission, which is a system permission.
So eclipse tells me "this permission is only granted to system apps".
I really need this and some other system permissions in my app, as it's a remote control app that must be able to control system features.
From the support page:
Uploading System Applications
Most developers will not need to upload system applications and may ignore this section. System applications may come pre-installed on certain devices and may or may not already be published in the Play store.
If you need to upload a system application and encounter an error message when doing so, please contact us. Please be sure to select the Publishing issues and distribution option.
If I'm understanding it right, It's possible to make a system application. how?
I'm developing a remote-control application for Android
Fortunately, this is not possible, except perhaps if you run as root, or you download the Android source code, modify it, and roll it into your own ROM mod.
If I'm understanding it right, It's possible to make a system application. how?
Build your own ROM mod. Sign the app with the same signing key as is used to sign your ROM mod. Put your app in your ROM mod. Install your ROM mod on your device.
This, of course, will limit your app's distribution to those devices running your ROM mod.
A lot of “system” permissions are really SIGNATURE_OR_SYSTEM permissions. For those, you need to do one of the following:
After building the APK, install it as a system app.
Sign the app with the same key as the Android distribution on your device.
For the first option, you would need to be root on your device. Regular APKs reside in /data/app, while system APKs need to be placed in a different folder (on Android 6 and 7 it’s /system/priv-app, earlier versions may differ). However, this is not very suitable for an app to be distributed to end users, especially if your target audience is not very tech-savvy.
For the second option, you need to build Android from source for your target device. If you sign the app with the same key as your Android build, then users running that build of Android can install it in the usual manner.

how to prevent applications to be installed in Android phone

I am developing a customer care android application. The client want that only the customer care application should be installed in the Android phone and we should prevent installation of other application. Is there any hack we can do to do that?
Is there any hack we can do to do that?
Fortunately, not from a standard SDK app -- the technical term for this would be "malware".
As the comments to your question indicate, you are welcome to root the device, remove the Google Play Store client (if it exists), and disable the ability to install from non-Play sources by adjusting the secure settings. However, I suspect that this will prevent you from updating your own app without rooting.

Android Marketplace

I'm wondering whether the official google Android Marketplace application has access to some restricted functionality in the OS, or if it just uses the standard APIs available. Anyone up to date on this matter?
Update
Would it be possible to get an application signed by the manufacturer so that you can access these functionalities, or does google have to do this?
Market does a few things that third party applications can't do -- most notable is being able to install apps without going through the permission screen (allowing it to verify permissions before downloading the app).
This is not a matter of signing -- Market is signed with Google's cert, not with a device's cert. The special things it does are features available to apps that are bundled as part of the system image. If Market were made available as a third party app, it would not be able to do these things. Likewise a third party app that is included by a manufacturer in their system image will have access to some additional functionality by virtue of being there.
Historically Market has also used a number of private APIs, which it could live with because it is always bundled with the device, so if one of those APIs changes the manufacturer will just need to make sure that they fix that to be able to run Market. Over time we have been cleaning that up to have it use many fewer private APIs.
The Android Market is part of the signed firmware of the device, and it is not an SDK application. Hence, it "has access to some restricted functionality in the OS". So, for example, while an SDK application can request to install an app, it can't uninstall an app.

Categories

Resources