Coder Social home page Coder Social logo

slyce-android-sdk's Introduction

Slyce Android SDK

GitHub release

The Slyce Android SDK makes it easy to add visual search capabilities to mobile apps.

(Beta) Maven Distribution

Starting with version 5.13.1, the Slyce Android SDK is now available as a maven dependency via the Github Package Registry. You'll need to add the repository, usually in your top-level build.gradle:

allprojects {
    repositories {
        google()
        jcenter()

        maven {
            // Add Slyce-Android-SDK maven repo from Github Package Registry.
            url 'https://maven.pkg.github.com/Slyce-Inc/Slyce-Android-SDK'
            credentials {
                // EXAMPLE
                username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
                password = project.findProperty("gpr.key") ?: System.getenv("GPR_API_KEY")
            }
        }
    }
}

A personal access token with read permissions on packages is required to download dependencies from the GPR. Please see the documentation on gradle integration.

Once the maven repo is set up you may add the Slyce SDK as a normal dependency in your application's build.gradle:

// Standard Slyce SDK
implementation 'it.slyce:slycesdk:5.13.2'

// Lite Version
implementation 'it.slyce:slycesdk-lite:5.13.2'

Copyright Slyce, Inc 2014-2019

slyce-android-sdk's People

Contributors

amrox avatar atroutt avatar chernetsov0 avatar danboe2018 avatar davidsvilem avatar flopshot avatar jchunchar avatar l-lemesev avatar romrozen avatar zachpepsin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slyce-android-sdk's Issues

SlyceNotOpenedException while initializing Privacy Policy

I'm initializing Privacy Policy as is specified in official documentation (https://slyce.zendesk.com/hc/en-us/articles/360020090011-How-to-Enable-GDPR-Compliance-for-the-Slyce-Android-SDK):

 SlycePrivacyPolicy privacyPolicy = Slyce.getInstance(this).getGDPRComplianceManager().getPrivacyPolicy();

And SlyceNotOpenedException appears. This case is not indicated in documentation.
Please, explain why I am getting SlyceNotOpenedException and how to prevent this situation.

Crash in SlyceDotsView

Description

The crash happens when a search result arrives, the BottomSheetDialog with the search result starts showing, and at that moment the application crashes

Environment Details

SlyceSDK Version: 5.13.4
Android SDK Version: 29-32
Device Model: Samsung, Huawei, Motorola and others
Device OS Version: 10-12

Stack Trace

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.animation.ValueAnimator.cancel()' on a null object reference
       at it.slyce.sdk.internal.SlyceDotsView$4.onAnimationEnd(SourceFile:3)
       at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:554)
       at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1250)
       at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1492)
       at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
       at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
       at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1350)
       at android.view.Choreographer.doCallbacks(Choreographer.java:1149)
       at android.view.Choreographer.doFrame(Choreographer.java:1040)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1333)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:233)
       at android.app.ActivityThread.main(ActivityThread.java:8010)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)

[AndroidX] Android resource linking failed

Hi 👋

I have some errors with android resource during the merge stage. Since I update our app to AndroidX package, I got these errors :

/.../jetified-slyce_lite_5.13.4/res/values/values.xml:178:5-198:25: AAPT: error: resource attr/slArrowPosition (aka [...]:attr/slArrowPosition) not found.
    
/.../jetified-slyce_lite_5.13.4/res/values/values.xml:178:5-198:25: AAPT: error: resource attr/slBorderType (aka [...]:attr/slBorderType) not found.
    
/.../jetified-slyce_lite_5.13.4/res/values/values.xml:178:5-198:25: AAPT: error: resource attr/slStrokeCap (aka [...]:attr/slStrokeCap) not found.
    
/.../jetified-slyce_lite_5.13.4/res/values/values.xml:178:5-198:25: AAPT: error: resource attr/slStrokeJoin (aka [...]:attr/slStrokeJoin) not found.

As you can see, I use the latest SDK (5.13.4) and if I check the file SlyceShapedImageView, I can confirm that you use an AndroidX package too. But nothing to do, Android Jetifier crash with these errors.
The library was renamed to jetified-slyce_lite_5.13.4 by Android Jetifier.
I try android.jetifier.blacklist=.*slyce.* in order to keep your .aar like you built it. But nothing to do ... (you can see that we use the original .aar slyce_lite_5.13.4).

Android resource linking failed
/.../slyce_lite_5.13.4/res/values/values.xml:178:5-198:25: AAPT: error: resource attr/slArrowPosition (aka [...]:attr/slArrowPosition) not found.
    
/.../slyce_lite_5.13.4/res/values/values.xml:178:5-198:25: AAPT: error: resource attr/slBorderType (aka [...]:attr/slBorderType) not found.
    
/.../slyce_lite_5.13.4/res/values/values.xml:178:5-198:25: AAPT: error: resource attr/slStrokeCap (aka [...]:attr/slStrokeCap) not found.
    
/.../slyce_lite_5.13.4/res/values/values.xml:178:5-198:25: AAPT: error: resource attr/slStrokeJoin (aka [...]:attr/slStrokeJoin) not found.

Do you have any clues for a correct integration ?
Thanks
BR, Thibault

Runtime exception when trying to use the feature in app.

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #6

java.lang.RuntimeException: An error occurred while executing doInBackground()
    at android.os.AsyncTask$4.done(AsyncTask.java:399)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
    at java.util.concurrent.FutureTask.run(FutureTask.java:271)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)
 Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.sample.app-mWuV2e6uT1qGu3cpgEP3GQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.sample.app-mWuV2e6uT1qGu3cpgEP3GQ==/lib/arm64, /data/app/com.sample.app-mWuV2e6uT1qGu3cpgEP3GQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]] couldn't find "libslyce_core.so"
    at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
    at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
    at java.lang.System.loadLibrary(System.java:1667)
    at it.slyce.sdk.internal.SlyceMatcher.<clinit>(SourceFile:1)
    at it.slyce.sdk.internal.lens.SlyceImageMatchDetector.a(SourceFile:3)
    at it.slyce.sdk.internal.lens.SlyceImageMatchDetector.getDetectorResultsFromFrameData(SourceFile:7)
    at it.slyce.sdk.internal.lens.LocalDetectorTask.doInBackground(SourceFile:7)
    at it.slyce.sdk.internal.lens.LocalDetectorTask.doInBackground(SourceFile:1)
    at android.os.AsyncTask$3.call(AsyncTask.java:378)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
    at java.lang.Thread.run(Thread.java:919) 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.