Advertisement
tham7777

Untitled

Mar 3rd, 2020
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.20 KB | None | 0 0
  1. #include "finger_print_auth.hpp"
  2.  
  3. #include <QAndroidJniObject>
  4. #include <QtAndroid>
  5.  
  6. #include <QDebug>
  7.  
  8. finger_print_auth::finger_print_auth(QObject *parent) : QObject(parent)
  9. {
  10.     qInfo()<<__func__<<": initialize finger_print_auth";
  11.     /*auth_ = new QAndroidJniObject("com/tham/biometric/FingerPrintAuth",
  12.                                   "(Landroid/app/Activity;Ljava/lang/String;)V",
  13.                                   QtAndroid::androidActivity().object<jobject>(),
  14.                                   QAndroidJniObject::fromString("Some sort of object jet key").object<jstring>());//*/
  15.  
  16.     QtAndroid::runOnAndroidThreadSync([this]()
  17.     {
  18.         auth_ = new QAndroidJniObject("com/tham/biometric/MainActivity");
  19.     });
  20.     qInfo()<<__func__<<": initialize finger_print_auth done";
  21. }
  22.  
  23. int finger_print_auth::auth_start() const
  24. {
  25.     qInfo()<<__func__;
  26.     //auto const results = auth_->callMethod<jint>("authStart");
  27.     //qInfo()<<__func__<<":"<<results;
  28.  
  29.     return 0;
  30. }
  31.  
  32. int finger_print_auth::check_auth_available() const
  33. {
  34.     qInfo()<<__func__;
  35.     //auto const results = auth_->callMethod<jint>("checkAvailableState");
  36.     //qInfo()<<__func__<<":"<<results;
  37.  
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement