Android Question Photo Editor SDK

tuhatinhvn

Active Member
Licensed User
I am making app use DS Photo Editor SDK ( https://www.dsphotoeditor.com/ )

This is guide: https://www.dsphotoeditor.com/android

Add-on Lib i used downloaded here: https://filebin.net/iadrp0uaw51qau8f/Add-onLib.rar?t=pmd9mhwp

B4X:
#AdditionalJar:ds-photo-editor-sdk-v9.aar
#AdditionalJar:picasso-2.71828.aar
#AdditionalJar:rxjava-2.1.0.jar
#AdditionalJar:rxandroid-2.0.1.aar
#AdditionalJar:okio-2.2.2.jar
#AdditionalJar: kotlin-stdlib-1.3.0.jar
#AdditionalJar:okhttp-4.2.2.jar
Everything is work well but screen only show "Loading...."

Anyone can check it and help me and everybody want to use it?
 

Attachments

DonManfred

Expert
Licensed User
I tried you example using all the additional files but it crashes when i run it.

It looks like it is not AndroidX Compatible.

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
has allow to save
** Activity (main) Resume **
has allow to save
Success: true
** Activity (main) Pause, UserClosed = false **
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.example.demotimavatar/com.dsphotoeditor.sdk.activity.DsPhotoEditorActivity}: android.view.InflateException: Binary XML file line #72: Binary XML file line #72: Error inflating class com.dsphotoeditor.sdk.ui.photoview.PhotoView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3116)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3259)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1950)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: android.view.InflateException: Binary XML file line #72: Binary XML file line #72: Error inflating class com.dsphotoeditor.sdk.ui.photoview.PhotoView
Caused by: android.view.InflateException: Binary XML file line #72: Error inflating class com.dsphotoeditor.sdk.ui.photoview.PhotoView
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.dsphotoeditor.sdk.ui.photoview.PhotoView" on path: DexPathList[[zip file "/data/app/b4a.example.demotimavatar-6P8SJwk-zJdlr2OqAZGNcw==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example.demotimavatar-6P8SJwk-zJdlr2OqAZGNcw==/lib/arm64, /data/app/b4a.example.demotimavatar-6P8SJwk-zJdlr2OqAZGNcw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:606)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:469)
at android.app.Activity.setContentView(Activity.java:2858)
at com.dsphotoeditor.sdk.activity.DsPhotoEditorActivity.onCreate(Unknown Source:5)
at android.app.Activity.performCreate(Activity.java:7327)
at android.app.Activity.performCreate(Activity.java:7318)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3096)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3259)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1950)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteIni
Message longer than Log limit (4000). Message was truncated.
 

tuhatinhvn

Active Member
Licensed User
I tried you example using all the additional files but it crashes when i run it.

It looks like it is not AndroidX Compatible.
Yes, Please jetify jar before run app!

And i fix project, now it can load image (by using File Provider : https://www.b4x.com/android/forum/threads/class-fileprovider-share-files.97865/),
but when i apply frame or any effect it has error about rederscript SO library

@DonManfred , can you to try make wrapper for it, i think it is very interesting and usefull for many other b4A developer, because Aviary is now died!
 
Top