Comments (14)
I moved the BarcodeScannerActivity
below the MainActivity
in the AndroidManifest.xml
. That fixed the issue for me.
I did not add the exported="true".
from flutter_barcode_reader.
- android:exported="true"
<intent-filter>
<action android:name="android.intent.action.MAIN" >
</action>
</intent-filter>
Both are required .
<activity
android:name="com.example.lib.MainActivity"
android:label="LibMain"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" >
</action>
</intent-filter>
</activity>
from flutter_barcode_reader.
Do you have com.apptreesoftware.barcodescan.BarcodeScannerActivity declared in your AndroidManifest.xml?
from flutter_barcode_reader.
from flutter_barcode_reader.
is the uses-permission for the camera there?
from flutter_barcode_reader.
The permissions are there indeed.
But I've found the culprit! After some twiddling around I stumbled upon this SO post: https://stackoverflow.com/questions/19829507/android-java-lang-securityexception-permission-denial-starting-intent.
Adding android:exported="true"
to the Activity definition fixed the issue. This should be added to the README I guess.
from flutter_barcode_reader.
@haarts With android:exported="true" my app just launches the barcode scanner. Then I have to press back button then click on the installed icon again
from flutter_barcode_reader.
Try
from flutter_barcode_reader.
On running the app from Android Studio (natively), it just runs successfully.
from flutter_barcode_reader.
@dark-chocolate No, the issue arose when dart sdk was updated recently.
from flutter_barcode_reader.
@Pushan-Gupta Did you find any solution?
from flutter_barcode_reader.
@dark-chocolate Yes I did. Check my reference above in the comments.
from flutter_barcode_reader.
@beatzcraft Thanks a lot. Your solution finally worked. Don't know the insane reason (putting it below the MainActivity
) but it just worked. Thanks for sharing it. +1
from flutter_barcode_reader.
Solved for me too. +1
from flutter_barcode_reader.
Related Issues (20)
- [Question] Can we remove the scanning box from the center of the screen? HOT 1
- [Bug] Camera Permission HOT 2
- Execution failed for task ':barcode_scan:extractIncludeDebugProto'. [Bug]
- [Bug] build warnings: [unchecked] unchecked conversion and unchecked call
- [Feature Request] HOT 2
- How to customize Scanner UI? HOT 1
- [Bug] Making the library size become 0.45MB, instead of the current 4.5MB using a simple refactor
- [Feature Request] HOT 1
- What is minimum api level of android support in flutter_barcode_reader ? HOT 1
- there are so many following errors repeatly
- [Feature Request] Camera selection improvement
- [Bug]Should not store rootViewController of window at plugin register
- [Bug]Can't build project by XCode 12 (after update) HOT 1
- []how to handle access denied finding property vendor.camera.aux.packagelist
- Not detecting PDF417 barcode on Android. In iOS, PDF417 barcode reading is slow..[Bug] HOT 1
- [Bug]
- [Bug] Not detected barcode in Andorid, (ios work) HOT 1
- [Feature Request] Continuous Scan Mode HOT 1
- App crashing when build for release HOT 1
- Warnings unchecked or unsafe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_barcode_reader.