Closed mshoperi closed 5 years ago
Same here - any ideas?
I don't really have any time at all right now to diagnose or fix this stuff, especially without an android device in hand. Getting the simulators running consistently is tough where I'm at due to internet access.
I expect that this has something to do with this line in the plugin.xml
file and the fact there is a second activity not referencing BarcodeCaptureActivity
:
<activity android:label="@string/title_activity_main" android:name="com.dealrinc.gmvScanner.SecondaryActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Note there are two sections with this activity tag, one for each AndroidManifest
location since I was trying to maintain compatibility with both cordova-android@7 & @5/6.
If someone can try to remove these couple activities and verify functionality and then submit a pull request that would be great!
I discovered the problem, just delete the lines:
<category android:name="android.intent.category.LAUNCHER" />
even without them the reader still works.
@brunoftmenezes There isn't a line in this entire project with that value, so it may be unrelated.
cordova version 8.1.2 cordova android version 6.3.0 cordova-gmv-barcode-scanner version 1.2
android device is on Android OS 8.1.0
creates two icons when downloading the APK from the store. My app icon and then a Barcode Scanner Example application.
i tried removing the lines you mentioned in plugins/cordova-gmv-barcode-scanner/plugin.xml and then rebuilding.
it still added those lines into the AndroidManifest.xml.
@pjwl33 I'm quite certain that the issue is based on the lines I commented on above. I've made a commit to remove them from the two sections they were showing up in. I think that may have been your issue.
To fix the issue for now you just need to install from the git repository rather than npm.
Will this be solved on the version installed through npm?
It will be once I get around to deploying it on npm I'm just absurdly busy nowadays so I haven't gotten to it.
If it's possible to find some time to publish a new version, please do so! Thanks for your efforts :)
I downloaded the ZIP version from repository and then I copy de files into de plugins folder, built the app again , but still having the secondary app at the screen. What must id do ? Sorry about my english.
Ok now it is working Just deleted the intent-filter section from plugin.xml at the node-module folder, in my case "C:\node\PreciosApp\src-cordova\node_modules\cordova-gmv-barcode-scanner\plugin.xml" and from "C:\node\PreciosApp\src-cordova\platforms\android\android.json". Thanks
Works great on iOS, but when installing on Android 2 apps are installed - the app itself, and then a Barcode Reader Sample app.
Why is there a second activity with the sample app?