Tagged: 

This topic contains 9 replies, has 2 voices, and was last updated by  ayushmaharjan 1 year, 10 months ago.

  • Author
    Posts
  • Participant
    ayushmaharjan
    Newbie
    Member since: 28.02.2017
    Number of posts: 10

    Hi
    I am trying to integrate ESignLive Android SDK into my app. I am already using Realm as my database. When I try to integrate the SDK. I get the following error:

    Error:Execution failed for task ‘:app:transformClassesWithJarMergingForLftDebug’.
    > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: io/realm/DefaultRealmModule.class

    I have researched and found out an issue in the realm repository: https://github.com/realm/realm-java/issues/1545
    They have mentioned the following link: https://realm.io/docs/java/latest/#sharing-schemas

    Can you help me with this issue?

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    Hello,

    As per our mobile dev team, the android sdk doesn’t have the Realm as module. It will be available in the next version of the sdk. Until then you can use the sdk implementation of Realm by calling:

    PersistentDataManager.getInstance().getRealmForCurrentThread();

    That will give you a normal Realm object that you can use. The issue you are having is that you can’t use classes named the same way as the one used in the SDK. I would recommend however that you don’t close that object, because the sdk uses on a per thread basis, and it that might cause issues within the sdk.


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    ayushmaharjan
    Newbie
    Member since: 28.02.2017
    Number of posts: 10

    Score

    0

    I have replaced all my ‘Realm.getDefaultInstance()’ with ‘PersistentDataManager.getInstance().getReralmForCurrentThread(). But I am still getting the same error.

    Do you have any timeline for the next sdk release?

    • This reply was modified 1 year, 10 months ago by  ayushmaharjan.
    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    The recommendation of our mobile dev team will only work if you remove your previous implementation. You should not have Realm implementation on the application side. In other words, you should not have executed code such as Realm.setDefaultConfiguration(…); and RealmConfiguration realmConfiguration = new RealmConfiguration.Builder. As for the next release of the android sdk, there is no confirmed date yet. I will post back here once it has been released.


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    ayushmaharjan
    Newbie
    Member since: 28.02.2017
    Number of posts: 10

    Score

    0

    I had already removed all such configurations. I am still getting the same error.

    The only way I could remove the error was to implement ‘RealmModel’ class instead of inheriting ‘RealmObject’ class. After refactoring all my code, I tried to save my objects using ‘PersistentDataManager’ but I get the following exception:

     io.realm.exceptions.RealmException: class <package>.LocationEntry is not part of the schema for this Realm. 

    It is almost a week not and I cannot even integrate the sdk in my app. Is there any way you can provide a version of sdk that resolves this issue?

    • This reply was modified 1 year, 10 months ago by  ayushmaharjan.
    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    1

    Hey,

    Sorry for the late reply. Our mobile dev team is currently working on a patch to fix this issue. It should be released next week or the following week. I’ll post back here once it’s available.


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    ayushmaharjan
    Newbie
    Member since: 28.02.2017
    Number of posts: 10

    Score

    0

    Hello Haris

    Are there any updates?

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    Hi,

    I spoke to our mobile dev team and a new version should be released sometime this week.


    Haris Haidary
    OneSpan Technical Consultant
    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450
    Approved answer

    Score

    1

    Hi there,

    The Realm module has been added to the SDK. You can download the latest SDK from our documenation: http://docs.esignlive.com/content/c_integrator_s_guide/sdk/l_esignlive_mobile_sdk/esignlive_android_sdk.htm


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    ayushmaharjan
    Newbie
    Member since: 28.02.2017
    Number of posts: 10

    Score

    0

    Thank you. I’ll try out the new SDK and let you if I have any problems.

You must be logged in to reply to this topic.