I have developed a SDK for android applications.We have many clients using this SDK in there applications.Now i have updated my SDK.I am looking for a way that these changes can reflect in there application without updating there app on play store.Urgent help needed.Any help will be appreciated.Thanks in advance.
How does OTA work? The OTA process is self-explanatory in that it delivers updated software wirelessly or 'over the air'. These updates are distributed over WiFi or mobile broadband using a function built into the smartphone or tablet's operating system or through a special OTA app that's given root access.
Over-the-air (OTA) or Firmware Over-the-air (FOTA) are remote updates to the Android operating system (OS) running on a mobile device. Android devices connected to a network can receive and install over-the-air updates to the OS, application software, and time zone rules.
Well you can dynamically load a jar file from your SD card using DexLoader class...which you can update when ever you want..on your storage... below is working code..
final String libPath = Environment.getExternalStorageDirectory() + "/test.jar";
final File tmpDir = getDir("dex", 0);
final DexClassLoader classloader = new DexClassLoader(libPath, tmpDir.getAbsolutePath(), null, this.getClass().getClassLoader());
final Class<Object> classToLoad = (Class<Object>) classloader.loadClass("com.test.android.MainActivity");
final Object myInstance = classToLoad.newInstance();
final Method doSomething = classToLoad.getMethod("doSomething");
doSomething.invoke(myInstance);
and in your library file code can be like this
public class MainActivity {
public void doSomething() {
Log.e(MainActivity .class.getName(), "MainActivity : doSomething() called.");
}}
tell me if you need any assistance
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With