1

Hello I am trying to build an app which will hold "other app's"
For example MY app will hold different apps of different ClIENTS. Now i want to make it so that 1 client has the option to only download his part, BUT he still has to use MY main app. (in other words i don't want to reference to another APK, cause then he can start his app without using mine(i think))
And the download option should be at runtime, cause else he has to download everything in one go.
I have thought about using jar files as library files, but what i found so far is that you have to add them in Eclipse (else they are not found) I also thought about building the app with the jar files in it, and then leave them out when i compile the app. Then my client can download those files afterwards. But i am guessing that will cause reference errors?

So the questions are;

  1. Is it possible?
  2. How to go about?

The main idea is that i don't want to make one HUGE app where as my client will only use his part of it.

Thanks in advance

It is I
  • 11
  • 1

2 Answers2

1

It can be achieved in android, and some big platform apps could let the 3rd party developers to develop plugins for them. The main idea is try to create your own DexClassLoader to replace the default one, the custom DexClassLoader could load classes from apkfile.

Try to look through this article for details.

Same with this question.

Community
  • 1
  • 1
faylon
  • 7,360
  • 1
  • 30
  • 28
  • Very interesting technique, indeed. Thanks for the links (and congrats to Fred Chung for its nice article on the topic) – AlexBottoni Nov 30 '12 at 11:04
  • @faylon thanks for the awnser, i will look in to it, but at first glance i fear that this is a bit to much for my skill level. – It is I Nov 30 '12 at 11:10
  • @ItisI. Not very hard. Same with the ClassLoader mechanism in java. – faylon Nov 30 '12 at 11:14
  • I didn't ever try DexClassLoader. If it really works, I think it should be very bad. As Android security model, user should explicitly allow every application to install on the device, and user will be told what permissions the application requires. If DexClassLoader works, hacker could build a simple app with basic permission requirement, then download other harmful apk silently, and do anything from the downloaded apk. It's too bad! Looks like a big security hole of Android. – TieDad Nov 30 '12 at 12:01
  • @EvanLi . No.. you can not grant other permissions in your new apk. since it is not installed and registered in your device. – faylon Nov 30 '12 at 12:07
0

It seems this is a difficult topic. I can only give you some point.

Since you don't want to make a huge app, then you have to build CLIENTs as separate APKs. But if you don't define CLIENT's activity as MAIN and DEFAULT in manifest, after install CLIENT app, user could not find CLIENT app from system menu (launcher). You can define a private intent name for CLIENT app's activity, this way, only your main app could start CLIENT app's activity.

TieDad
  • 9,143
  • 5
  • 32
  • 58
  • If i understand correctly; as long as i don't name the activity of the client app MAIN and Default, it will not be found in the android menu. BUT is it then still installable without permitting "installment from unkown source"? – It is I Nov 30 '12 at 10:40
  • The apk should be exact same as normal apk only except that it couldn't be found in android menu. – TieDad Nov 30 '12 at 10:57