My ionic app uses:
"#ionic-native/barcode-scanner": "^5.19.1",
"phonegap-plugin-barcodescanner": "^8.1.0",
Android app crashes right away when i call barcode.scan funcion. I am doing everything like on the very basic example: https://ionicframework.com/docs/native/barcode-scanner
Note: I am testing this on android7 version at the moment. The phone is not very new but still not very old neither.
It crashes right after accepting camera permissions.
There is no err message in catch block or anything, app just crashes.
Has anyone experienced this or can help me investigate more logs ?
I have found the issue, basicly it was missing com.google.zxing.client.android.SCAN from AndroidManifest.xml file:
<activity android:configChanges="orientation|keyboardHidden" android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:theme="#android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Not sure why the plugin installation did not added anything nor it was described in github, but It was requiring activity for the manifest file.
Related
Is there any possibility to do, from API get data to show notification in flutter using Flutter_Local_Notifications.
If this is possible please let me share a tutorial or some code to get an Idea.
Thanks ...
Edit your AndroidManifest file
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
Add this inside the application section
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
</intent-filter>
</receiver>
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
Continue with the following link.
I had created the default(counter) app from flutter and this works perfectly in terms of appearing on the app list as an icon just like any other normal app. However, as i continue adding files to it for example plugins, added firebase too, I rebuild it and the app launches but the app icon does not show on the app list on the phone.
Now am wondering if this is a bug on flutter sdk or what has happened. Since previously I was using flutter version 2.2.2 and now am on flutter 2.5.0
I figured it out I think. The problem is in the android/app/src/main/AndroidManifest.xml. I believe you need to include the following tag in your intent-filters:
<category android:name="android.intent.category.LAUNCHER"/>
However, I had some tags overwriting this one and this is what broke the visibility in the app drawer. My intent filters now look as follows and everything is working now:
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<!-- <action android:name="android.intent.action.VIEW" /> -->
<category android:name="android.intent.category.DEFAULT" />
<!-- <category android:name="android.intent.category.BROWSABLE" /> -->
<!-- <data android:scheme="my.test.app" /> -->
</intent-filter>
Hope this helps.
Deployed Flutter application to Google Play Store but it's stuck at the splash screen and never open
I did match my AppID and still facing the same issue
Here is my manifest.xml:
<!-- TODO: Changed by Parveen Before merge 1 -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mrbox.store">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--
io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here.
-->
<!-- TODO: Add By Parveen before merge 1 -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Mr.Box Store"
android:usesCleartextTraffic="true"
android:icon="#mipmap/launcher_icon">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!--
Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI.
-->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<!--
Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame.
-->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!--
TODO: Changed by parveen before merge 1
android:name="default-url"
android:value="https://inspireui.com"
-->
<meta-data
android:name="default-url"
android:value="https://www.mrboxstore.com" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- TODO: Changed by parveen before merge 1 android:value="inspireui.com" -->
<data android:scheme="https"
android:host="mrboxstore.com" />
<data android:scheme="http" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#drawable/logo" />
<!--
Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message.
-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="#color/notiColor" />
<!-- Google map and Admod setup -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/api_key" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_api" />
<!-- Facebook Login configuration -->
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:exported="true" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<!--
Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
-->
<meta-data android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
Things to try
Make sure flutter doctor -v runs without ANY complaints
Edit android/gradle.properties and add the flag: android.bundle.enableUncompressedNativeLibs=false
Do a flutter clean command
Try creating a release build using flutter build appbundle
Test Locally / Offline
download bundletool
Generate a set of APKs from your app bundle, following this guide
Deploy the app to your connected device(s) following this Guide
Works?
Upload your bundle to Google Play using the internal test track, or the alpha or beta channels to test the bundle before releasing it in production
Instructions for doing this can be found here
Good Luck :)
Because it is not working after uploading on google play. then there might be some issue with your app signing. You can follow the steps here
I have faced issues like this when I used facebook login sdk, so I would suggest checking following:
Check if you have signed the apk/appbundle with proper release keystore
Check if you have opt in for google's automatic signing on playstore while deploying app
2.1 If yes then it will change the sha-1 value which is used in facebook app for authentication, for it to work use the one generated by google in playstore
Assuming that you publish an App Bundle (.aab file) the issue can be related to the format itself since it is not testable via IDE. E.g. when running the app in Release mode on a device .apk is created and provisioned to it, not .aab.
What I did in the past to troubleshoot .aab (also had failures only with GPlay version, local Debug and Release modes worked fine) was to use Firebase Test Lab. You can run automated monkey tests on 5 physical devices and 15 virtual devices every day free-of-charge. Just log in to Firebase Console, cretae an empty project, go to Test, upload your .aab file, select devices (it's worth also to choose different locales) and wait for completion. After that check logs in test results, you might find answers there (in my cases there was an issue with localization resources which got broken while producing .aab release package).
This option can be esier/faster than splitting .aab locally with comand line into APKs and testing on a local device.
In my experience, try to check your database(sqlite) if created. Try to replace the path and check if the database is created properly.
Hi im new to Unity3d and AR, and i need to setup Arcore to use with vuforia.
i already have the " core-1.7.0.aar " file in Assets/Plugins/Android folder
and i already set the AndroidManifest.XML in the same folder as the .aar file
<application android:theme="#style/UnityThemeSelector" android:icon="#mipmap/app_icon" android:label="#string/app_name">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="#string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="unity.build-id" android:value="53bad2ba-a78a-4c14-9e44-e3d1cbb2f87c" />
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="True" />
<!-- The following must be present to facilitate use of ARCore, if available -->
<meta-data android:name="com.google.ar.core" android:value="optional" />
</application>
and according to Vuforia Guide i need to edit the Build.gradle but i dont know How to do that from unity?
and also after i set this up, will the tracking be as good as ARcore or no?
Thank you.
You can export your project from Unity to Android Studio by selecting Export Project in the Build Settings window then press Build. Unity will ask where you want to save the output. This will give you access to all the Gradle files to follow the instructions provided by Vuforia.
When I run my application code, I could see the following entry in the console:
[2011-03-01 10:29:26 - mireader] Uploading mireader.apk onto device 'emulator-5554'
[2011-03-01 10:29:26 - mireader] Installing mireader.apk...
[2011-03-01 10:29:40 - mireader] Success!
[2011-03-01 10:29:41 - mireader] Starting activity com.mireader.reader on device emulator-5554
[2011-03-01 10:29:44 - mireader] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.mireader/.reader }
The application's main GUI automatically runs. Until here, there is no problem. When I get back to the application list, there my app icon is not visible. I checked in settings->application->manage application, there I could see my app and it shows uninstall option too.
What is the problem?
probably missing
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
in your main <activity> in the manifest
I had the same problem in Android Studio, with API 19 and with gradle building system. We spent a couple of hours to figure this out, and we realized, if you have more library (for example you have more test app in the same project) and you have more launcher icon in separated library, than gradle cannot solve this. You don't get any error message, just you don't see the icon.
So use different names for launcher icon or just delete which you don't need.
(I just thought, maybe someone gonna have the same problem...)
There was an other scenario as well, when icon is disappear. When you use <data android:scheme="your-own-uri">
The solution is to split intent-filter.
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="your-own-uri" />
</intent-filter>
</activity>
Just for Android noobs like myself, putting this:
<data android:scheme="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.pdf" />
between the intent filter tags of the main activity also causes an icon disappearing act. The code above is to open a file based on its extension. Remove it and the icon reappears.