Answer the question
In order to leave comments, you need to log in
How to update a class dynamically from the server in Android?
The essence of the problem is this.
We are writing a specialized application that will be out of the market. People far from technology will use it (storekeepers, mechanics, etc.).
The application should be updated from the server without any questions. Root access to phones will not be done.
How to overwrite a concrete class? That is, in case of a change in MakeSell.java, load it from the server into the application.
Answer the question
In order to leave comments, you need to log in
you need to make an intermediate layer
you make an interface with the structure of your class as
a class you implement the interface
everywhere you use a reference to the interface instead of a class class
you compile separately from the project into dex
dex you put it on the server
the application downloads the dex file and loads it via
https://developer.android.com/reference /dalvik/sys...
profit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question