Java – How to load a class from another application in android

How to load a class from another application in android… here is a solution to the problem.

How to load a class from another application in android

Is there a way to load a class from a different application?

For example, I have two applications, one of which has a SomeExample class file. I want to load it and use it from another app.

I tried using Class.forName. But this function throws “ClassNotFoundExpetion”.

Solution

Is there anyway to load a class from differen application ?

No, sorry.

You can use startActivity(), startService(), and so on to start components of another application, but the code for each application remains separate.

Related Problems and Solutions