Closed Arunraj93 closed 5 years ago
use chrome://inspect/#devices
in chrome browser to see exactly error on device
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
its coming as blank white page
@Arunraj93 and are there any errors in logs?
function Date_show() { document.addEventListener("deviceready", function () { // Check if device supports fingerprint /**
} */ FingerprintAuth.isAvailable(function (result) {
console.log("FingerprintAuth available: " + JSON.stringify(result));
// If has fingerprint device and has fingerprints registered
if (result.isAvailable == true && result.hasEnrolledFingerprints == true) {
// Check the docs to know more about the encryptConfig object :)
var encryptConfig = {
clientId: "myAppName",
username: "currentUser",
password: "currentUserPassword",
maxAttempts: 5,
locale: "en_US",
dialogTitle: "Hey dude, your finger",
dialogMessage: "Put your finger on the device",
dialogHint: "No one will steal your identity, promised"
}; // See config object for required parameters
// Set config and success callback
FingerprintAuth.encrypt(encryptConfig, function (_fingerResult) {
console.log("successCallback(): " + JSON.stringify(_fingerResult));
if (_fingerResult.withFingerprint) {
console.log("Successfully encrypted credentials.");
console.log("Encrypted credentials: " + result.token);
} else if (_fingerResult.withBackup) {
console.log("Authenticated with backup password");
}
// Error callback
}, function (err) {
if (err === "Cancelled") {
console.log("FingerprintAuth Dialog Cancelled!");
} else {
console.log("FingerprintAuth Error: " + err);
}
});
}
/**
* @return {
* isAvailable:boolean,
* isHardwareDetected:boolean,
* hasEnrolledFingerprints:boolean
* }
*/
}, function (message) {
console.log("isAvailableError(): " + message);
});
Fingerprint.show({
clientId: "Fingerprint-Demo",
clientSecret: "password" //Only necessary for Android
}, successCallback, errorCallback);
Fingerprint.isAvailable(isAvailableSuccess, isAvailableError);
}, false);
}
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
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
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 : ~~~
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 : ~~~~
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 : ~~~~
: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
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 ==========
anybody there to rectify my issue soon
in browser working fine but in mobile app if i install and open the app blank page only coming
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?
Issue solved because of using 2 different pulgins thanks buddy
Let anyone tell how can we check if the device support fingerprint or not using javascript
If i install the fingerprint plugin my app is displaying blank page while running on device but in browser it works fine