Android: set dependency between two apps - android

I want to create an app which uses an aidl interface of another app. I was wondering if there is the possibility to make the other app automatically downloaded when the user install my app

See here: http://android.amberfog.com/?p=98
Basically, you cannot directly install the other app, only launch the thing that actually can install it. You would have to include the other apk inside of yours (in your assets folder perhaps), but if it's not your apk, then that's probably not a good idea unless you have the original author's permission.
If that other apk is published on Google Play, you could use PackageManager to check for the presence of the package name of that apk on the device. If you don't find it, invite the user to download the other app from Google Play using an Intent. This post shows you how to open Google Play to a specific app.

Related

How does the google playstore and Aptoide App store directly install apps on the phone rather than downloading only the APK file?

I am curious to know the technology behind automatic installation.
Apps from google playstore get installed automatically.
Moreover, 3rd party app store Aptoide also has this feature of automatic installation where the apk file needs not to be manually installed.
How does this happen?
Is there any certain API function or back end code for this?
Thanks
The play store does download the APK file. It just has a permission that allows it to install apps without asking permission. Any system app can get that permission- INSTALL_PACKAGES.

How can I prevent from extracting APK of my application using other application?

I am developing a non-free android application. How can I prevent others from sharing apk to other users, like if I am using share-it or Xender we can share a apk which is installed in our application to others. Is there any way to prevent our application from sharing the apk?
Please add your thoughts.
You cannot prevent it from being downloaded or shared. It's a problem each app faces, even well-known apps apk are available easily over internet, all you need is to search for it :)
What you can do is restrict User to use it, if he has not purchased it.
Assuming this app will be on Google Play, & what you need is Play Billing Library
Using this you can identify user has rights to use this app or not.
if the user has not purchased it, he will not be able to use your app.
If this app is not going to be on Google Play store, you can see respective app store billing library.
Set allowBackup="false" to your application in your androidmanifest file.
Read more about flags - https://developer.android.com/guide/topics/manifest/application-element.html

Would package installerID of an app change if an app is shared via apk sharing, like ShareIt?

I am trying to recognise from app if the app was not installed from play store and some other source. I first read this answer Detect if an app is installed from Play store
But then, this answer https://stackoverflow.com/a/16862957 said amazon:
finally sets PackageManager.getInstallerPackageName() to
"com.amazon.venezia"
So is it optional to change the package installer name?
If yes, then if the app is shared via apk then is the package name installer changed?
For example if the app was shared via shareit, would the package name installer change?
I just want to be sure that if I use the method in the first answer, I can also identify installs by such sharing.
If it won't change when shared via apk, is there a way to find out whether it was shared via apk?
The package name will be whatever it is set by the developer.
Some third party stores will add their own tag like "freeapk.com.company.appname", but as far as submission and downloading from Google play or Amazon, the only way to know which store it came from would be to see if the developer created two different versions of the app.

How to make my WordPress blog to offer visitors to install an Android app?

I have created a custom Android app for my blog and I want when someone visits the blog a notification to pop up that will say that there is an Android app for the blog and an option to install it.
I haven't yet posted the app on Google Play and only have an APK file.
You could use a simple JS popup to notify the user about the download but this isn't your main problem.
By default a user will not be able to download and install an apk file quite so simply. There is a setting to prevent a user from installing apps that are not from Google Play. They would first need allow your application to be installed from their settings menu. This is done with the option: Settings >> Applications >> Unknown sources
Beyond this you would need to have the user trust that your app is not malicious and answer the question "why can you not deploy this app via Google Play as normal?"
You can make it a download link by just putting the apk file in a shared folder in your dropbox folder (like dl.dropboxusercontent.com/....../YourApp.apk).
But still the problem that Scott Helme told you about will exist (Users will have to admid unknows sources).
This is a solution that i used to give an app to specific people without publishing my app in the Play Store.
Hope it helps you.

Android, sideloading applications and keep them up to date via Google Play

My company would like to give an Android device to a group of our selected customers.
Doing that, we would like to provide users with our mobile app. The app is already on Google Play, but we would like to avoid users downloading and installing by themselves. We prefer to give the device ready, with the app already installed.
We found several ways to manually install an APK on the phone without having to login to the market. But it seems that doing that, the user will not be able to update the app via Google Play, as the app would not be recognized as installed.
Any idea?
As per January 2015, this appears to be impossible. Here is the response I got from Google Play Developer support:
Side-loaded apps do not update via the Play Store. If you would like the app to update, you will need to uninstall the app on your phone and reinstall the app via the Play Store.
I wonder if anyone found a way around this?
To summarize the answer from #Android-Developer and OP's comment discussion:
Google Play recognizes the app signature of APKs regardless of the installation source. As long as you use the same package name and keystore when generating your APK, Google Play will be able to detect newer versions and trigger an update.
To install the app without logging in to a Google account, enable the "Install from unknown sources" option in Settings. You can disable it once the installation is complete.
You may install Titanium Backup if your phone is rooted, then long press on your side loaded app package and select "Attach to market" option. Now you may receive updates via Google Play.
I don't recommend this, I mean never install cracked or patched apps because of copyright or security risks, but installing a Modded version of Google Play can make patched side loaded apps to be upgraded after attaching them to market via Titanium Backup. This is not needed for purchased apps because they are registered in your Google account, so attaching to market will be enough.
To get a MANUALLY INSTALLED APK to show up in the Google Play Store in the UPDATES or INSTALLED section, do either of the following:
1.) Manually install the APK with the SAME APK filename that Google knows the app as (i.e. from the APK download site like APKMirror.com).
2.) If you CHANGED the APK name when you saved it, it will NOT show up in Google Play Store as an installed app.
However, IF there is an update to the app, you will have to do a ONE-TIME search for that app in the store and update it. It will give you the UPDATE option on the app's store page. Once updated via the store, it will show up in the store's Installed / Updates section from now on.
Why does this work? Because the UPDATE will be done thru the store and the APK name it's using during the update process is what Google knows the app as.
If there is NO update, do option #1.
I always add the App name and version info to the front of the filename so I know what it is for later use (because if I'm manually installing, I'll probably be saving it for multiple / future devices).
I also keep the original name at the end, so I can rename it back to the original name if needed. Android is the only O/S I've seen where the filename matters during the install process.

Categories

Resources