Code Monkey home page Code Monkey logo

Comments (6)

ajalt avatar ajalt commented on May 25, 2024

The sample app works fine on Samsung devices, so there's probably an issue in how you're integrating the library. Have you tried the sample app on your devices? Make sure that you're including the right gradle dependencies in you integration, and that you're using the aar artifacts or including the right permissions in you manifest. Finally, make sure you're only initializing reprint once in your app, and not each time you start an activity.

from reprint.

natiq266 avatar natiq266 commented on May 25, 2024

i have integrated same as you said In Application.onCreate, initialize Reprint with Reprint.initialize(this) once
then in my LockService's onCreate i called

Reprint.authenticate(new AuthenticationListener() {
    public void onSuccess(int moduleTag) {
        showSuccess();
    }
    public void onFailure(AuthenticationFailureReason failureReason, boolean fatal,
                          CharSequence errorMessage, int moduleTag, int errorCode) {
        showError(failureReason, fatal, errorMessage, errorCode);
    }
});

added this in my build.gradle within android{ }

repositories {
    maven { url "https://jitpack.io" }
}

added all these dependencies in same gradle (app:gradle)
compile 'com.github.ajalt.reprint:core:3.1.0@aar' // required: supports marshmallow devices
compile 'com.github.ajalt.reprint:reprint_spass:3.1.0@aar' // optional: support for pre-marshmallow compile 'com.github.ajalt.reprint:rxjava:3.1.0@aar' // optional: the RxJava 1 interface
compile 'com.github.ajalt.reprint:rxjava2:3.1.0@aar' // optional: the RxJava 2 interface

and added those permissions in manifest

from reprint.

natiq266 avatar natiq266 commented on May 25, 2024

also tried your sample apk
https://github.com/ajalt/reprint/releases/download/2.5.6/sample-debug.apk
its showing only that fingerprint is present,registered and listening but onSuccess() never called

from reprint.

ajalt avatar ajalt commented on May 25, 2024

You said you were trying to run this from a service? That's probably the issue. Many versions of android won't let you use the fingerprint sensor unless you have a foreground activity.

from reprint.

natiq266 avatar natiq266 commented on May 25, 2024

yes i think this was the issue before...
but now i am inflating view by adding it to window manager within service but i am starting service like this to bring it to front/foreground by intent flags

Intent i = new Intent(context, LockService.class);
i.setAction(ACTION_LOCK_SCREEN);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_CLEAR_TASK
| Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_RECEIVER_FOREGROUND
| Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startService(i);

now my view is on the top of all view but its still not working....even on that view fingerprint sensor not listening neither correct finger nor wrong finger

from reprint.

ajalt avatar ajalt commented on May 25, 2024

A foreground service is not enough. You need a foreground activity.

from reprint.

Related Issues (20)

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.