mjwheatley / cordova-plugin-android-fingerprint-auth

A cordova plugin for fingerprint authentication using the hardware fingerprint scanner on devices running Android 6+
Apache License 2.0
169 stars 131 forks source link

Re:cordova plugin android fingerprint auth #120

Closed Arunraj93 closed 5 years ago

Arunraj93 commented 6 years ago

If i install the fingerprint plugin my app is displaying blank page while running on device but in browser it works fine

WuglyakBolgoink commented 6 years ago

use chrome://inspect/#devices in chrome browser to see exactly error on device

Arunraj93 commented 6 years ago

same plugin i worked out in another app its working fine but in browser its working fine but if you take build and run on mobile its coming as blank page

Arunraj93 commented 6 years ago

its coming as blank white page

WuglyakBolgoink commented 6 years ago

@Arunraj93 and are there any errors in logs?

Arunraj93 commented 6 years ago

function Date_show() { document.addEventListener("deviceready", function () { // Check if device supports fingerprint /**

}

function successCallback() { alert("Authentication successfull"); }

function errorCallback(err) { alert("Authentication invalid " + err); }

function isAvailableSuccess(result) { / result depends on device and os. iPhone X will return 'face' other Android or iOS devices will return 'finger'
/ alert("Fingerprint available"); }

function isAvailableError(message) { alert(message); }

i call function like this and installed the cordova plugin

Arunraj93 commented 6 years ago

1>------ Build started: Project: BlankCordovaApp8, Configuration: Release Android ------ Cordova 6.3.1 ------ Platform android already exists ------ Copying native files from F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\res\native\android to F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android ------ Done copying native files to F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android ------ Preparing platform: android


/ | | | ____ _ _ | | / _ | '/ ` |/ \ \ / / ` | | ' | '/ \ ' \ / _` | '/ _ \ | |_| () | | | (| | () \ V / (| | | |) | | | / |) | (| | | | / ___\/|| _,_|_/ _/ _,| | ./|| _| ./ _,|| __| || |_|

Running Cordova prepare on the project

You have been opted out of telemetry. To change this, run: cordova telemetry on. No scripts found for hook "before_build". No scripts found for hook "before_prepare". Checking config.xml for saved platforms that haven't been added to the project Checking for any plugins added to the project that have not been installed in android platform No differences found between plugins added to project and installed in android platform. Continuing... Generating platform-specific config.xml from defaults for android at F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\res\xml\config.xml Merging project's config.xml into platform-specific android config.xml Found "merges/android" folder. Copying its contents into the android project. Merging and updating files from [www, platforms\android\platform_www, merges\android] to platforms\android\assets\www rmdir platforms\android\assets\www\Plugins\cordova-plugin-android-fingerprint-auth (no source) rmdir platforms\android\assets\www\Plugins\cordova-plugin-android-fingerprint-auth\www (no source) delete platforms\android\assets\www\Plugins\cordova-plugin-android-fingerprint-auth\www\FingerprintAuth.js (no source) delete platforms\android\assets\www\VSBuildInfo.xml (no source) copy platforms\android\platform_www\cordova_plugins.js platforms\android\assets\www\cordova_plugins.js (updated file) mkdir platforms\android\assets\www\plugins mkdir platforms\android\assets\www\plugins\cordova-plugin-android-fingerprint-auth mkdir platforms\android\assets\www\plugins\cordova-plugin-android-fingerprint-auth\www copy platforms\android\platform_www\plugins\cordova-plugin-android-fingerprint-auth\www\FingerprintAuth.js platforms\android\assets\www\plugins\cordova-plugin-android-fingerprint-auth\www\FingerprintAuth.js (new file) Wrote out android application name "CIMS" to F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\res\values\strings.xml android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000 Wrote out Android package name "com.urcinfotec.URCICIMS" to F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\src\com\urcinfotec\URCICIMS\MainActivity.java Updating icons at platforms\android\res Updating splash screens at platforms\android\res Prepared android project successfully No scripts found for hook "after_prepare". Checking config.xml for saved plugins that haven't been added to the project ------ Building platform: android ------ Build configuration options: --release --

You have been opted out of telemetry. To change this, run: cordova telemetry on. No scripts found for hook "before_compile". ANDROID_HOME=C:\ProgramData\Microsoft\AndroidSDK\25 JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_131 Reading build config file: F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\build.json Reading the keystore from: c:\urci-release-key.keystore Running command: cmd "/s /c ""F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\gradlew.bat" cdvBuildRelease -b "F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"" Incremental java compilation is an incubating feature. :preBuild UP-TO-DATE :preReleaseBuild UP-TO-DATE :checkReleaseManifest :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preReleaseBuild UP-TO-DATE :CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:compileLint :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseProguardFiles UP-TO-DATE :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseRenderscript UP-TO-DATE :CordovaLib:generateReleaseResValues UP-TO-DATE :CordovaLib:generateReleaseResources UP-TO-DATE :CordovaLib:packageReleaseResources UP-TO-DATE :CordovaLib:compileReleaseAidl UP-TO-DATE :CordovaLib:generateReleaseBuildConfig UP-TO-DATE :CordovaLib:mergeReleaseShaders UP-TO-DATE :CordovaLib:compileReleaseShaders UP-TO-DATE :CordovaLib:generateReleaseAssets UP-TO-DATE :CordovaLib:mergeReleaseAssets UP-TO-DATE :CordovaLib:processReleaseManifest UP-TO-DATE :CordovaLib:processReleaseResources UP-TO-DATE :CordovaLib:generateReleaseSources UP-TO-DATE :CordovaLib:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE :CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE :CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE :CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE :CordovaLib:bundleRelease UP-TO-DATE :prepareAndroidCordovaLibUnspecifiedReleaseLibrary UP-TO-DATE :prepareReleaseDependencies :compileReleaseAidl :compileReleaseRenderscript :generateReleaseBuildConfig UP-TO-DATE :mergeReleaseShaders UP-TO-DATE :compileReleaseShaders UP-TO-DATE :generateReleaseAssets UP-TO-DATE :mergeReleaseAssets :generateReleaseResValues UP-TO-DATE :generateReleaseResources :mergeReleaseResources :processReleaseManifest :processReleaseResources :generateReleaseSources :incrementalReleaseJavaCompilationSafeguard :compileReleaseJavaWithJavac :compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). :compileReleaseNdk UP-TO-DATE :compileReleaseSources 1>MSBUILD : cordova-build error : F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\res\values\strings.xml:3: Error: "app_name" is not translated in "ar" (Arabic), "de" (German), "es" (Spanish), "fr" (French), "it" (Italian), "ja" (Japanese), "no" (Norwegian), "pt" (Portuguese), "ru" (Russian), "th" (Thai), "zh" (Chinese), "zh-CN" (Chinese: China), "zh-HK" (Chinese: Hong Kong SAR China), "zh-MO" (Chinese: Macau SAR China), "zh-SG" (Chinese: Singapore), "zh-TW" (Chinese: Taiwan) [MissingTranslation] 1>MSBUILD : cordova-build error : CIMS 1>MSBUILD : cordova-build error : ~~~ 1>MSBUILD : cordova-build error : F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\res\values\strings.xml:4: Error: "launcher_name" is not translated in "ar" (Arabic), "de" (German), "es" (Spanish), "fr" (French), "it" (Italian), "ja" (Japanese), "no" (Norwegian), "pt" (Portuguese), "ru" (Russian), "th" (Thai), "zh" (Chinese), "zh-CN" (Chinese: China), "zh-HK" (Chinese: Hong Kong SAR China), "zh-MO" (Chinese: Macau SAR China), "zh-SG" (Chinese: Singapore), "zh-TW" (Chinese: Taiwan) [MissingTranslation] 1>MSBUILD : cordova-build error : @string/app_name 1>MSBUILD : cordova-build error : ~~~~ 1>MSBUILD : cordova-build error : F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\res\values\strings.xml:5: Error: "activity_name" is not translated in "ar" (Arabic), "de" (German), "es" (Spanish), "fr" (French), "it" (Italian), "ja" (Japanese), "no" (Norwegian), "pt" (Portuguese), "ru" (Russian), "th" (Thai), "zh" (Chinese), "zh-CN" (Chinese: China), "zh-HK" (Chinese: Hong Kong SAR China), "zh-MO" (Chinese: Macau SAR China), "zh-SG" (Chinese: Singapore), "zh-TW" (Chinese: Taiwan) [MissingTranslation] 1>MSBUILD : cordova-build error : @string/launcher_name 1>MSBUILD : cordova-build error : ~~~~

:lintVitalRelease :prePackageMarkerForRelease :transformClassesWithDexForRelease To run dex in process, the Gradle daemon needs a larger heap. It currently has approximately 494 MB. For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB. To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties. For more information see https://docs.gradle.org/current/userguide/build_environment.html 1>MSBUILD : cordova-build error : Explanation for issues of type "MissingTranslation": 1>MSBUILD : cordova-build error : If an application has more than one locale, then all the strings declared 1>MSBUILD : cordova-build error : in one language should also be translated in all other languages. 1>MSBUILD : cordova-build error : If the string should not be translated, you can add the attribute 1>MSBUILD : cordova-build error : translatable="false" on the element, or you can define all your 1>MSBUILD : cordova-build error : non-translatable strings in a resource file called donottranslate.xml. Or, 1>MSBUILD : cordova-build error : you can ignore the issue with a tools:ignore="MissingTranslation" 1>MSBUILD : cordova-build error : attribute. 1>MSBUILD : cordova-build error : By default this detector allows regions of a language to just provide a 1>MSBUILD : cordova-build error : subset of the strings and fall back to the standard language strings. You 1>MSBUILD : cordova-build error : can require all regions to provide a full translation by setting the 1>MSBUILD : cordova-build error : environment variable ANDROID_LINT_COMPLETE_REGIONS. 1>MSBUILD : cordova-build error : You can tell lint (and other tools) which language is the default language 1>MSBUILD : cordova-build error : in your res/values/ folder by specifying tools:locale="languageCode" for 1>MSBUILD : cordova-build error : the root element in your resource file. (The tools prefix 1>MSBUILD : cordova-build error : refers to the namespace declaration http://schemas.android.com/tools.) 1>MSBUILD : cordova-build error : 3 errors, 0 warnings :mergeReleaseJniLibFolders UP-TO-DATE :transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE :processReleaseJavaRes UP-TO-DATE :transformResourcesWithMergeJavaResForRelease UP-TO-DATE :validateReleaseSigning :packageRelease :zipalignRelease :assembleRelease :cdvBuildRelease

BUILD SUCCESSFUL

Total time: 16.794 secs Command finished with error code 0: cmd /s /c ""F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\gradlew.bat" cdvBuildRelease -b "F:\Hailops RND\APPS\App Backup\CIMSAPP_V4\BlankCordovaApp8\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" Built the following apk(s): F:/Hailops RND/APPS/App Backup/CIMSAPP_V4/BlankCordovaApp8/platforms/android/build/outputs/apk/android-release.apk F:/Hailops RND/APPS/App Backup/CIMSAPP_V4/BlankCordovaApp8/platforms/android/build/outputs/apk/android-release-unsigned.apk No scripts found for hook "after_build". No scripts found for hook "after_compile". ------ Copying back to project: android 1>Done building project "BlankCordovaApp8.jsproj". ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Arunraj93 commented 6 years ago

anybody there to rectify my issue soon

Arunraj93 commented 6 years ago

issue

Arunraj93 commented 6 years ago

in browser working fine but in mobile app if i install and open the app blank page only coming

WuglyakBolgoink commented 6 years ago

Hallo @Arunraj93

1) In browser it will be always working :) 2) you have wrong variable names!?

  Fingerprint.show({
        clientId: "Fingerprint-Demo",
        clientSecret: "password" //Only necessary for Android
    }, successCallback, errorCallback);

    Fingerprint.isAvailable(isAvailableSuccess, isAvailableError);

are u using 2x different plugins?

Arunraj93 commented 6 years ago

Issue solved because of using 2 different pulgins thanks buddy

Arunraj93 commented 6 years ago

Let anyone tell how can we check if the device support fingerprint or not using javascript