Phonegap App displayed with Plugin-Name

I have a strange behaviour of my phonegap app on Android. I'm using this Barcode-Scanner-Plugin:

https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner

Everything works fine, but when I build my project and deploy my application to phone, the name of the plugin is displayed. So the App is called 'Barcode Scanner'. Of course its not a big problem, I just changed the name of the plugin to my application name as well and now it's displayed correctly.

Answers


Had the same problem:

You have to check in:

./res/values/strings.xml

and other localized sources like ones in:

./res/values-de/strings.xml

./res/values-it/strings.xml

./res/values-fr/strings.xml

Ensure you have this line

<string name="app_name">PUT HERE YOUR FINAL APP NAME</string>

I think I found out, my app didn't have a values-nl folder in ./res. The barcode scanner project did so it localized the app with that file and in that file is a app_name = Barcode Scanner.

I copied the /res/values folder to /res/values-nl and now it shows my app name and the scanner tool is still localized.


Still no clue why this occoured, but I could obviously solve the problem by changing the app-name of the plugin in its android manifest to the name of the application.


The source of the problem is, the ZXing Barcode Scanner Library has it's own strings.xml with the app_name value, therewithal it's localized. It's not reccommend to change the source code of the external library, because of the updates.

The name of the application comes from AndroidManifest.xml, application android:label. Change it to an other string, that you can control.

<application android:icon="@drawable/icon" android:label="My App"

or

<application android:icon="@drawable/icon" android:label="@string/myappname"

insert to res/values/strings.xml the following line:

<string name="myappname">My App</string>

Need Your Help

Php Yii define form field validation outwith model

php validation yii

I'm using yii framework in my current project. I have a page with a form (submitting to database) which defines the required fields in the rules of the model - as standard. On this page, I also hav...