I am creating an app which uses ZLib (QR code reader), but it requires another app to be installed for it to work. I want to be able to package the other apps APK file within my APK. Is this possible?
Sidenote: I am trying doing this because my app will be used on an Amazon Fire kindle, but the prerequisite app is only on the Google Play store.
You can have a copy of the other app's APK in your app (e.g. within the assets directory).
After your app is installed, you can copy the APK to the public storage and launch the package manager to install the other app from the APK:
Intent pmIntent = new Intent(Intent.ACTION_VIEW)
.setDataAndType(Uri.parse("file:///path/to/the.apk"),
"application/vnd.android.package-archive");
startActivity(pmIntent);
But note that this requires the user to have enabled side loading of apps from third-party sources.
Your current approach is unsuitable in many ways.
You can use alternative libraries that can be embedded in your app and don't need any other application to be installed on the user's device. There are a handful of options on the Android Arsenal.
Related
I have a client that uses android devices with a kiosk mode. They have a kiosk mode manager that only allows apps they add to it to be opened. I was informed the kiosk manager opens apps from the Android/data directory on the device (from one of the com.google.x type directories). I've been attempting to have on of those directories created by this app so they can launch it from their kiosk manager, but haven't had much luck. I can see the directory I'm looking for in the Device File Manager under data/data/com.x and data/app/com.x, but is there a way for me to get those files to be located under sdcard instead of data? The app also doesn't give me an option to manually move it to external storage, so I'm not sure if that's part of the problem. The devices are running Android 8.1.0 and the app just sends user input data to a server on the network.
Essentially, they want to be able to view the app files from the device and also open the app from a directory on the sdcard (sdcard/Android/data/x).
I have tried adding android:installLocation="preferExternal" in hopes of being able to see the app files on the sdcard where they requested it, but it has not made a difference.
Thanks for any help!
I have seen many guides online for how to do this, but they are all assuming a linux environment. I am developing using Android Studio on Windows, and am having trouble following these guides. Specifically, I do not know where to find the platform.pk8 and platform.x509.pem files required for making my keys. The guides all say they are located in build/target/product/security, but I assume this is the corresponding linux directory. Where can I find these files on my windows device?
To have a system app in Android OS you need to sign your APK by the same key which the OS is signed. These key in the Android open source project can find in
build/target/product/security
But each company has got its own key and you cannot access to those key!
You can build your own Android image and load it your own development bard which probably is not easy. Then you have a system key. you can find useful information here
But the main reason if being a system app is to have the privileges of a system app.
What are those privileges? granting all permission and have access to the restricted area and secure setting for example.
So there is another possible way to be a system app.
If you can push(copy) your APK to /system/priv-app/ folder, then Android will grant all system privileges to your app automatically. (to all application in /system/priv-app/ folder not just to your app) .
How you can push your file into /system/priv-app/?
When you have Android Studio probably you can run adb. you can find some information here
You can connect to your android device using adb and through your local network
adb connect deviceip:port
port by default is 5555 and you don't have normal type it.
For connecting to an Android device the device should in developer option. you can find some useful information here
when you connected to your device you check if your device is rooted and the system folder is mountable or not.
/System/ folder is protected by AVB and furthermore, you need to be a root user, so you use the following command
adb root
adb remount
if your device is rooted you can easily push your APK to system folder and have all privileges of a system app.
adb push <yourPackagePath> /system/priv-app/youtPackage/yourPackage.apk
if your device is not rooted you should search for how you can root your device
I have created an application using TWA (com.github.GoogleChrome: custom-tabs-client).
But when publishing Google shows me an optimization error message and suggests to optimize using the Android App Bundles.
After reading a lot of information in Google, I was able to add the Dynamic Feature Module and enable minification. As a result, the apk was reduced to 700kb from 2mb, but Google still does not accept it.
Tell me please how to configure the assembly so that Google could approve the application?
When building the application, you should select the assembly through the Android App Bundles
After assembly, you need to upload aab file instead of apk in google play
solution
I developped launcher for an android MDM system. I control this mdm system with Api, so I need help to know how can uninstall/install app into device that use this mdm system in background and without the installer permission.
I also need to delete the apk file from android device storage after the install.
How can I do this programmatically in java?
Any one have solution?
For security purpose without the installer permission we cant install/unistall application in android.
It may require device rooted & make your app system. Read this for reference.
Note: this is not recomended if you want publish your app to playstore
I have recently started programming for the Android platform. I have a simple application which I would like to email to someone so that they can execute the application and check how it works.
I am currently using the Emulator in the Android SDK to execute my application but the person who I am emailing it to does not have Android SDK and it would be a mission to send the whole project folder.
Is there any way that I can send just one file such as an .exe or something that would allow the recipient to execute the application to see how it works.
Thanks so much for your help in advance guys
The "exe" for android is called apk. I suggest you to look at this question. You'll need to build the apk and sign it in order to be able to run it.
If you just want to send it to a user for testing purposes, you can enable the setting in the target android device to allow "unknown sources" (I don't know the proper english name, as I don't have an english android here at the moment). You can find this in the app settings.
In your development environment look for the apk file created by eclipse. Then connect your smartphone to the pc and copy the apk over. Start up a file manager and click on the apk and it will install just like any other app.
If you want to deploy it properly, you have to sign it and probably follow the procedures from google. Since I don't have a fully deployable app yet, I can't say what the procedures is for that, but the google site is very helpfull on all aspects about android programming.
Check the "bin" folder in your project path. There you will have a .apk that you can share with your clients.
If they execute it in an Android mobile phone the application will be installed.