Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with authenticator.xml's label #5

Open
ritzo opened this issue Feb 15, 2017 · 1 comment
Open

Problem with authenticator.xml's label #5

ritzo opened this issue Feb 15, 2017 · 1 comment

Comments

@ritzo
Copy link

ritzo commented Feb 15, 2017

Hi,
I found a problem with this plugis: the file authenticator.xml only gets replaced when the plugin is added.

After a "cordova platform remove android;cordova platform add android" authenticator.xml goes back to the original file, and as a result, my apps end with "app_name" in the authenticator label.

@ritzo ritzo changed the title AuthLabel not used Problem with authenticator.xml's label Feb 15, 2017
@luchusnet
Copy link

Use this script on HOOKS->beafore_build

var fs = require('fs');
console.log('AccountManager change authenticator appName');
var authenticatorFile = fs.readFileSync('platforms/android/res/xml/authenticator.xml','utf8');
authenticatorFile = authenticatorFile.replace(/android:label="[ \S]*"/i, 'android:label="@string/authLabel"');
fs.writeFileSync('platforms/android/res/xml/authenticator.xml', authenticatorFile);

@kunder-lab kunder-lab deleted a comment from luchusnet Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants