Android AIDL remote Service for 3rd party developers - android

I am writing a SDK which defines a remote Service and provides a AIDL interface for 3rd party developers. For my testing, I install the SDK as an Android app (XYZService.apk), although its just a background service(which does not start until a Client binds to it) and there are no Activities defined. I also install my test client app as the second app (TestClient.apk). TestClient app has Activities and on launch, it binds to the XYZService and starts it.
But I am confused how should I package this SDK for 3rd party developers. Lets say 3rd party developer writes a new client ClientFoo.apk. How do they provide XYZService.apk to their users who download ClientFoo.apk via Google Play. Do I have to make XYZService.apk availavle via Goolge Play ? is there any way 3rd party developer can package XYZService along with their .apk file ?
Can I provide a JAR file to 3rd party developers. Basically, providing a JAR for my remote service will be an idea solution for me.
thanks a lot for your answers. I am new to Android development.

Do I have to make XYZService.apk availavle via Goolge Play ?
You have to distribute it somehow. APK files do not appear on users' devices by magic. Whether you use Google Play or some other distribution mechanism is up to you.
is there any way 3rd party developer can package XYZService along with their .apk file ?
Yes, by getting rid of the APK, getting rid of the AIDL, and implementing your SDK as a JAR or Android library project. Distributing reusable code as a JAR has been in use in Java-based development for around 15 years.
You use AIDL and an APK if you are distributing your own app, that the user wants independently of anything else, and that you additionally want to allow third parties to access a service exposed by your app. If you do not have such an app, or do not want users to have to install a separate app, you should be giving a JAR or Android library project, so your code is baked into the third parties' apps.
Can I provide a JAR file to 3rd party developers
You can implement your SDK as a JAR, so long as it does not require resources -- then, you will need to distribute it as an Android library project.

Related

Google Play rejected my update because it says I collect installed apps on device, but I don't collect such type data?

I don't collect installed apps from a device, but I use variety of libraries. I think it is probably from one of the libraries I use, If so, how can I find the library that collects such data.
The cause is most likely from the library you used. Here is the steps to find out which library collects installed apps on device. This applies if you developed the application via Java/Kotlin.
Decompile the application - You can use: http://www.javadecompilers.com/apk
Search the specific code for collecting installed apps on device one by one from the whole decompiled folder. Like getInstalledApplications, getInstalledPackages, ApplicationInfo.FLAG_SYSTEM, for more info How to get a list of installed android applications and pick one to run. You can use Visual Studio Code to search specific text from a whole folder.
You can now find the library that you uses the code.

Android app feature update on-demand from my own server

I know that I can let users download apks from my server but...
What I need is a technique to implement a modular app with features that I can add and remove such as the Play Feature Delivery from Android App Bundles.
At the same time I can't use Google Play Store.
I read that:"App Bundle format is open source, so other stores can adopt it"
So I think I could implement my own store but how can I implement the Play Feature Delivery?
I read also about:
apk split
apk Expansion Files
over-the-air programming
native app over HTTP
Do you have any idea where I can start?
UPDATE 1
I can't put +1 but thanks to Rediska I can elaborate the question.
With bundletool I can generate an APK Set archive containing APKs for all possible devices.
How do I automate the installation of new features from the client point of view?
Can I use Play Core lib or another lib?
UPDATE 2
From here I found Evolve.
Evolve is a library for Android Developers that lets them deploy new
versions of an app without going through Google Play or asking users
to download an update. It works by using reflection and dynamic
bytecode generation to "trick" Android into running new code.
Now, this opens to ideas but also security risks.
There is bundletool - a utility for handling .aab files. It is open source, and it does have the ability to generate APK files based on specs.

how to make a third party library as api in android

I am new in android programming.I have created an application (in eclipse using android).it has many features and one of them is tess-two.some of them increases my application size.(like tess-two that increase about 15 MB).so I want to make it as api and if user needs it , download it.tess-two is a project that improrted to eclipse and used ndk and checked islibrary (properties -> android) and used in my main project(so in my project it is in bin folder).
I am sorry that my question is complicated or I asked it badly.
A recommended option is to put tess-two in a separate app. This new app has no user interface. When installed, it exposes an API you (or potentially other apps) can use. This API could be, depending on your needs, a ContentProvider or a service\activity that handles an intent you create.
When the user of your main app asks for a feature that uses tess-two you will check if your API is available (i.e the intent is resolved or the content provider is available) and if not, direct the user to the play store.
An alternative option is to dynamically download code into a new classloader. It's both complicated and forbidden by Play Store policy.

Is it possible to get stats on specific app versions installed from Android Market?

I recently released an updated version of my app on the Market and would like to know how many users have updated to the latest version.
I've looked in the Market help docs and on the Google Market dev forums with no luck.
Is there a way to get this metric from directly from Android Market? or do I need to add some 3rd party analytics to my app in order to track this. I'd like to avoid that if possible, as currently my app requires no permissions and I get feedback from my users that they like this and use my app over similiar apps because of this.
But if I do need to go down the road of using a third party analytics service, is using Google's own SDK the simplest solution out there to collect this stats?
As I am understanding your question,
Android market doesn't provide like this (get stats on specific app versions installed from Android Market), Try some third party analytics (I am using FlurryAgent.jar but what you needed I never tried). Try it.
Analyze your android application
Nice way to analyze your android application behavior: http://www.flurry.com/
Flurry is just small package that catches events inside your application and sends it to flurry server from time to time. You can see what functions are most useful in your application and even analyze exceptions remotely via web interface.
(This is my personal opinion for this question, if any other solution or third party library available then I don't know)

Multiple APK's Interacting with each other

Recently I came across a few apps (such as Clockworkmod's Rom Manager) where in order to get the pro version you had to download another APK. However once this APK was downloaded Rom Manager automatically knew this APK existed and added new functionality's. For example another app is the Astro app in which you can extend it by downloading modules from the Market.
Now I know how to check for the existence of another app, and I also know how to interact between apps via services. However my question is,it seemed like Clockwork and these other apps are using different apks for a plug-in type architecture. How does one do that? Have they predefined an entire plugin architecture and service model so whenever a new apk is installed the main app can check if its a module and call commands on it? Or is there something else going on?
I think these apps just know their plugins and how to use them. Plugins are separated to save some space or to add paid functionalities to free apps. Note that there are no 3rd party plugins to these apps - all of them was created by apps authors.
Actually I think it is technically possible to create real plugin system for Android apps. You could search for installed plugins using broadcast receivers, then talk with them through some API. However adding extensibility through plugins isn't trivial task, so I don't think it makes much sense to create such apps for mobile devices.

Categories

Resources