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
168 stars 131 forks source link

v1.2.5 can not use locale DE #61

Closed WuglyakBolgoink closed 7 years ago

WuglyakBolgoink commented 7 years ago

I use following config:

var decryptConfig = {
                        clientId: getServiceName(),
                        username: getEmail(),
                        token: getToken(),
                        disableBackup: true,
                        dialogTitle: TOUCH_VIA_ANDROID,
                        locale: 'de'
};

FP-Dialog show all strings on english! But if I try to do it quickly, so I can see error-text on germany language.

if I change locale config on "ru" or "es" it work fine!

mjwheatley commented 7 years ago

Can you confirm that the values-de directory was copied from the plugin into your Android project?

WuglyakBolgoink commented 7 years ago

Hallo @mjwheatley!

Hm...

platforms
    android
        .gradle
        assets
        build
        cordova
        cordova-plugin-crosswalk-webview
        cordova-plugin-iroot
        CordovaLib
        gradle
        libs
        platform_www
        res
            drawable
            . . .
            values
            values-es
            values-fr
            values-it
            values-ja
            values-no
            values-pt
            values-ru
            values-zh
            values-zh-rCN
            values-zh-rHK
            values-zh-rMO
            values-zh-rSG
            values-zh-rTW
            xml
        src
mjwheatley commented 7 years ago

You can manually copy the file to the appropriate directory or try removing and reinstalling the plugin. Just make sure the file is added to your project and that should resolve your issue.

WuglyakBolgoink commented 7 years ago

Hallo @mjwheatley

1) reinstall can not help me... values-de was not copy automatically into platforms folder!

cordova --v
#6.5.0

npm -v
#4.3.0

cordova plugins list
#cordova-plugin-android-fingerprint-auth 1.2.5 "FingerprintAuth"

cordova platforms list
# Installed platforms:
#   android 6.1.2

2) remove and then add android platform -> same effect... de-folder not found

it's a magic 😹 or....

WuglyakBolgoink commented 7 years ago

Hallo @mjwheatley

found ))

you forgot add this file in plugin.xml

        <source-file src="res/android/values-it" target-dir="res" />
        <source-file src="res/android/values-es" target-dir="res" />
        <source-file src="res/android/values-ru" target-dir="res" />
        <source-file src="res/android/values-fr" target-dir="res" />
        <source-file src="res/android/values-zh" target-dir="res" />
        <source-file src="res/android/values-zh-rCN" target-dir="res" />
        <source-file src="res/android/values-zh-rHK" target-dir="res" />
        <source-file src="res/android/values-zh-rMO" target-dir="res" />
        <source-file src="res/android/values-zh-rSG" target-dir="res" />
        <source-file src="res/android/values-zh-rTW" target-dir="res" />
        <source-file src="res/android/values-no" target-dir="res" />
        <source-file src="res/android/values-pt" target-dir="res" />
        <source-file src="res/android/values-ja" target-dir="res" />
mjwheatley commented 7 years ago

I have published version 1.2.6 to fix this issue. Please update to the new version and verify that it resolves the problem for you. Thanks for helping to find the problem.

lordgreg commented 7 years ago

It does not. This issue still exists, even when only installing the plugin:

Installing "cordova-plugin-android-fingerprint-auth" for android
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-android-fingerprint-auth':Error
    at copyNewFile (/Users/USER/Projects/MY_PROJECT/platforms/android/cordova/lib/pluginHandlers.js:232:15)
    at install (/Users/USER/Projects/MY_PROJECT/platforms/android/cordova/lib/pluginHandlers.js:37:17)
    at ActionStack.process (/Users/USER/Projects/MY_PROJECT/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/Users/USER/Projects/MY_PROJECT/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:117:20)
    at PluginManager.addPlugin (/Users/USER/Projects/MY_PROJECT/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:147:17)
    at Api.addPlugin (/Users/USER/Projects/MY_PROJECT/platforms/android/cordova/Api.js:198:10)
    at handleInstall (/Users/USER/Projects/MY_PROJECT/node_modules/cordova-lib/src/plugman/install.js:611:6)
    at /Users/USER/Projects/MY_PROJECT/node_modules/cordova-lib/src/plugman/install.js:407:28
    at _fulfilled (/Users/USER/Projects/MY_PROJECT/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/Users/USER/Projects/MY_PROJECT/node_modules/q/q.js:816:30)
Failed to restore plugin "cordova-plugin-android-fingerprint-auth" from config.xml. You might need to try adding it again. Error: Uh oh!
"/Users/USER/Projects/MY_PROJECT/platforms/android/res/values-de" already exists!
WuglyakBolgoink commented 7 years ago

Hi @lordgreg

my test now:

result:

lordgreg commented 7 years ago

Hi @WuglyakBolgoink for your answer.

My test:

result:

WuglyakBolgoink commented 7 years ago

@lordgreg

do you have this property in your config.xml? because I can't reproduce your error...

    <preference name="cordova-custom-config-autorestore" value="false" />

or try

update tested on a new project. install plugin was without any errors

lordgreg commented 7 years ago

@WuglyakBolgoink

WuglyakBolgoink commented 7 years ago

@lordgreg

lordgreg commented 7 years ago

Interesting,

prepare doesn't work like that and I see it as conflict because, all other plugins that I use in the project:

    <plugin name="com.mwaysolutions.cordova.webviewplugin" spec="https://github.com/mwaylabs/cordova-plugin-inappbrowser.git" />
    <plugin name="cordova-plugin-x-toast" spec="~2.2.0" />
    <plugin name="cordova-plugin-globalization" spec="~1.0.1" />
    <plugin name="cordova-plugin-whitelist" spec="~1.0.0" />
    <plugin name="phonegap-plugin-push" spec="~1.4.5" />
    <plugin name="cordova-plugin-screen-orientation" spec="~1.4.0" />
    <plugin name="cordova-plugin-appinfo" spec="~2.0.3" />
    <plugin name="cordova-plugin-apteligent" spec="~3.1.0" />
    <engine name="ios" spec="~4.3.1" />
    <engine name="android" spec="~5.2.2" />
    <plugin name="cordova-plugin-device" spec="~1.1.3" />
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
    <plugin name="cordova-plugin-network-information" spec="~1.3.0" />
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
    <plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
    <plugin name="cordova-plugin-touch-id" spec="~3.2.0" />

...work as charm. I'm sticking with 1.2.5 until this issue is resolved.

WuglyakBolgoink commented 7 years ago

Hi @lordgreg

Do you have always same error?

Failed to restore plugin "cordova-plugin-android-fingerprint-auth" from config.xml. You might need to try adding it again. Error: Uh oh!
"/Users/USER/Projects/MY_PROJECT/platforms/android/res/values-de" already exists!
lordgreg commented 7 years ago

Always :) with last version that is.

mjwheatley commented 7 years ago

@lordgreg have you uninstalled and removed all plugin files from your project and then try reinstalling?

lordgreg commented 7 years ago

@mjwheatley Thank you for responding.

I did. Before each test, I rimrafed plugins and platforms.

WuglyakBolgoink commented 7 years ago

@lordgreg please

do you have same error? If no, then you have problem in your project folder and not with this plugin...

Vamsi7591 commented 7 years ago

If you are installed cordova-plugin-file and trying add cordova-plugin-android-fingerprint-auth to project first take a backup of following XML files in folders and remove it temporarily

  1. values-de --> multiimagechooser_strings_de
  2. values-ja --> multiimagechooser_strings_ja
  3. values-es --> multiimagechooser_strings_es
  4. values-fr --> multiimagechooser_strings_fr

Next : Install plugin

$ ionic plugin add cordova-plugin-android-fingerprint-auth $ npm install --save @ionic-native/android-fingerprint-auth

And add the removed xml files to respective folders and build.

It's working :100: % for me instead of removing and adding platforms.

Cheers :+1: