Menu

Example in Android Studio

Jonas
2017-12-09
2020-08-27
  • Jonas

    Jonas - 2017-12-09

    Does anyone have any more recent examples of using SymmetricDS on Android with AndroidStudio?

    The example available and the documentation itself is still done in Eclipse, it is very outdated.

    I believe that a more recent example would be of great value to new users / projects.

     
  • Mark Michalek

    Mark Michalek - 2017-12-13

    Jonas, check out this example that is a little more recent.
    https://www.jumpmind.com/downloads/symmetricds/extras/Android-FileSync-Demo.zip

    Feel free to tweak that and contribute those changes as a better starting point for new users. Thanks for your interest.

     
  • Jonas

    Jonas - 2017-12-20

    I tried this example and it does not work, it does not sync.
    Too bad a tool as interesting as this does not have current examples for mobile ... that would solve the lives of many people. Every mobile developer is looking for something to fill this data gap offline in their Apps.

     
  • Chris Henson

    Chris Henson - 2017-12-21

    Try this out: https://github.com/JumpMind/symmetric-android-client-demo. More details as to what went wrong would be great. We do have users that sync Android.

     
  • Bill Noble

    Bill Noble - 2018-03-06
    • Chris
      Just a very small detail, the end FullStop is included in the link and causes 404 error.
     
  • hershit

    hershit - 2018-10-05

    Can any one help me i want to sync data as well in android but demo is not working fine.

     
  • Thierno Mamadou Bah

    Hi, I am also blocking on this new published documentation resources. Do when it installs on an android 8 version it works very well but not on an earlier version for example on the 7 or 6. Can you help me to have a solution for istaller the resource on a version 7 for example?

     
  • red

    red - 2019-04-26

    Same problem. Android 7 does not support. I am getting exception while installing the demo apk. Please advise, how to fix the problem.

    java.lang.NoClassDefFoundError: Failed resolution of: Ljava/nio/file/DirectoryStream$Filter;
    at org.jumpmind.symmetric.android.AndroidSymmetricEngine.createStagingManager(AndroidSymmetricEngine.java:108)
    at org.jumpmind.symmetric.AbstractSymmetricEngine.init(AbstractSymmetricEngine.java:348)
    at org.jumpmind.symmetric.android.AndroidSymmetricEngine.<init>(AndroidSymmetricEngine.java:84)
    at org.jumpmind.symmetric.android.SymmetricService.onStartCommand(SymmetricService.java:88)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3406)
    at android.app.ActivityThread.-wrap21(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1648)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:165)
    at android.app.ActivityThread.main(ActivityThread.java:6375)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "java.nio.file.DirectoryStream$Filter" on path: DexPathList[[zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/base.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_dependencies_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_0_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_1_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_2_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_3_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_4_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_5_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_6_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_7_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_8_apk.apk", zip file "/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/lib/arm64, /system/lib64, /vendor/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:74)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    ... 13 more
    Suppressed: java.io.IOException: No original dex files found for dex location /data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_0_apk.apk
    at dalvik.system.DexFile.openDexFileNative(Native Method)
    at dalvik.system.DexFile.openDexFile(DexFile.java:373)
    at dalvik.system.DexFile.<init>(DexFile.java:113)
    at dalvik.system.DexFile.<init>(DexFile.java:78)
    at dalvik.system.DexPathList.loadDexFile(DexPathList.java:366)
    at dalvik.system.DexPathList.makeElements(DexPathList.java:327)
    at dalvik.system.DexPathList.makeDexElements(DexPathList.java:263)
    at dalvik.system.DexPathList.<init>(DexPathList.java:126)
    at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:62)
    at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
    at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
    at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
    at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:522)
    at android.app.LoadedApk.getClassLoader(LoadedApk.java:555)
    at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1942)
    at android.app.LoadedApk.getResources(LoadedApk.java:773)
    at android.app.ContextImpl.<init>(ContextImpl.java:2078)
    at android.app.ContextImpl.createAppContext(ContextImpl.java:2023)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5410)
    at android.app.ActivityThread.-wrap2(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
    ... 6 more
    Suppressed: java.io.IOException: No original dex files found for dex location /data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_3_apk.apk
    at dalvik.system.DexFile.openDexFileNative(Native Method)
    at dalvik.system.DexFile.openDexFile(DexFile.java:373)
    at dalvik.system.DexFile.<init>(DexFile.java:113)
    at dalvik.system.DexFile.<init>(DexFile.java:78)
    at dalvik.system.DexPathList.loadDexFile(DexPathList.java:366)
    at dalvik.system.DexPathList.makeElements(DexPathList.java:327)
    at dalvik.system.DexPathList.makeDexElements(DexPathList.java:263)
    at dalvik.system.DexPathList.<init>(DexPathList.java:126)
    at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:62)
    at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
    at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
    at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
    at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:522)
    at android.app.LoadedApk.getClassLoader(LoadedApk.java:555)
    at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1942)
    at android.app.LoadedApk.getResources(LoadedApk.java:773)
    at android.app.ContextImpl.<init>(ContextImpl.java:2078)
    at android.app.ContextImpl.createAppContext(ContextImpl.java:2023)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5410)
    at android.app.ActivityThread.-wrap2(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
    ... 6 more
    Suppressed: java.io.IOException: No original dex files found for dex location /data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_5_apk.apk
    at dalvik.system.DexFile.openDexFileNative(Native Method)
    at dalvik.system.DexFile.openDexFile(DexFile.java:373)
    at dalvik.system.DexFile.<init>(DexFile.java:113)
    at dalvik.system.DexFile.<init>(DexFile.java:78)
    at dalvik.system.DexPathList.loadDexFile(DexPathList.java:366)
    at dalvik.system.DexPathList.makeElements(DexPathList.java:327)
    at dalvik.system.DexPathList.makeDexElements(DexPathList.java:263)
    at dalvik.system.DexPathList.<init>(DexPathList.java:126)
    at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:62)
    at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
    at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
    at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
    at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:522)
    at android.app.LoadedApk.getClassLoader(LoadedApk.java:555)
    at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1942)
    at android.app.LoadedApk.getResources(LoadedApk.java:773)
    at android.app.ContextImpl.<init>(ContextImpl.java:2078)
    at android.app.ContextImpl.createAppContext(ContextImpl.java:2023)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5410)
    at android.app.ActivityThread.-wrap2(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
    ... 6 more
    Suppressed: java.io.IOException: No original dex files found for dex location /data/app/org.jumpmind.symmetric.symmetricandroidclientdemo-1/split_lib_slice_7_apk.apk
    at dalvik.system.DexFile.openDexFileNative(Native Method)
    at dalvik.system.DexFile.openDexFile(DexFile.java:373)
    at dalvik.system.DexFile.<init>(DexFile.java:113)
    at dalvik.system.DexFile.<init>(DexFile.java:78)
    at dalvik.system.DexPathList.loadDexFile(DexPathList.java:366)
    at dalvik.system.DexPathList.makeElements(DexPathList.java:327)
    at dalvik.system.DexPathList.makeDexElements(DexPathList.java:263)
    at dalvik.system.DexPathList.<init>(DexPathList.java:126)
    at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:62)
    at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
    at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
    at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
    at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:522)
    at android.app.LoadedApk.getClassLoader(LoadedApk.java:555)
    at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1942)
    at android.app.LoadedApk.getResources(LoadedApk.java:773)
    at android.app.ContextImpl.<init>(ContextImpl.java:2078)
    at android.app.ContextImpl.createAppContext(ContextImpl.java:2023)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5410)
    at android.app.ActivityThread.-wrap2(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
    ... 6 more</init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init></init>

     
  • Maxwell Pettit

    Maxwell Pettit - 2019-05-08

    At the moment Android APKs prior to API 26 are unsupported. This is due to the use of a Java 7 library that is not supported until API 26.

    A possible workaround has been mentioned here:
    https://sourceforge.net/p/symmetricds/discussion/739236/thread/15f2d8dc53/#4939

     
  • jonathan danilo loker

    Hi.

    I have an android application with symmetricds in version 3.9.15 and I want to update it, when I change the .jar to any more current version I get several errors.
    Do you have an example for the most current versions?

    Thank you very much!!

     

Log in to post a comment.