insightautos / cordova-gmv-barcode-scanner

A Cordova barcode scanning plugin based on the Google Mobile Vision library for iOS & Android.
MIT License
52 stars 77 forks source link

Fix plugin's crash when Activity gets destroyed by OS, rename activity_main.xml to prevent possible errors #8

Closed chun-baoluo closed 6 years ago

chun-baoluo commented 6 years ago

Hi! Found another couple of Android bugs.

  1. It is better to have a distinct name for the plugin's activity layout. When two or more cordova plugins save their activity layout under the same name (for example classic activity_main.xml filename) they overwrite each other's layouts when android platform is being added and at least one of them stops working as a result.

  2. Also, the plugin crashes when it's Activity gets destroyed by the OS (due to lack of RAM on the device). This commit should fix both bugs.