While I continue to ponder this for the technical consequences that hitting ‘compile’ generates, shouldn’t I be able to access static final variables on a class in one project/app, from another project/app? The one project is in the build path of the other. It compiles but throws a NoClassDefFound error at runtime.
Both apps are mine, so I have a bit of freedom here, though I don’t think sharing the user id and process is involved here. It’s important that the class stays within one of the projects. I’m not looking for solutions like Android Library Projects or JAR libraries.
EDIT: After consideration, I’m abandoning this idea since it had a few logic mistakes. What I really want seems to be to let the first app offer some function to the second. I.e. so that the second app can send the first some data, and get a result back. The functionality has little domain related value, rather a technical one, so I’d like the shortest simplest solution.
Each app instance is sandboxed, so you can’t get directly at the memory of another process. Unencumbered data sharing between apps as you suggest would amount to a gaping security hole.
If you need to communicate between apps to share data, look into the ContentProvider
From the docs:
EDIT:
There’s a solution for that too. Intents