the app didn't appear in my phone flutter - android

I have flutter app,
I made some edit on the android side, and I added the native java code, and made some edit on manifest after the edit, flutter app didn't appear in my phone,
but the app appears in settings in apps
what is the problem ??
this is my Arduino manifest:
<application
android:name="io.flutter.app.FlutterApplication"
android:label="flutter app"
android:icon="#mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
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>
<data android:scheme="com.jopoint" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- <action android:name="android.intent.action.MAIN"/>-->
<category android:name="android.intent.category.LAUNCHER"/>
</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" />
<service
android:name="com.oppwa.mobile.connect.service.ConnectService"
android:exported="false"/>
<activity
tools:replace="android:theme,android:windowSoftInputMode"
android:name="com.oppwa.mobile.connect.checkout.dialog.CheckoutActivity"
android:theme="#style/Theme.Checkout.Light"
android:windowSoftInputMode="adjustPan"
android:exported="false"
android:launchMode="singleTop"/>
</application>
</manifest>

what is the problem?
You commented out android.intent.action.MAIN action of your intent filter (docs).

Related

Flutter internet conneciton not working real device

Hello I have App in Play Store. I updated the app and flutter 2.0 but when ı download the app in playstore internet connection not working. I builded release mode and send the normal phone internet connection working but if someone want the download the app in playstore connection is not working ı don't understand where is the problem.
This is my main Androidmanifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.agronet_seracilik">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Agronet Seracılık A.Ş"
android:icon="#mipmap/ic_launcher">``
<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>
</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>
You need to give permission to application in manifest
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Agronet Seracılık A.Ş"
android:icon="#mipmap/ic_launcher"
android:usesCleartextTraffic="true"> --> Add this line to send http request after flutter 2.0

In my Flutter project, adding a Browsable category in AndroidManifest.xml makes my app unusable

Recently, I've added the stripe_sdk package to my flutter project. The 3DS system requires to add a deep link mechanism to come back to the app when the 3D is OK or KO.
On iOS, I modified my Info.plist to declare the scheme, it works well when I debug and when I deploy the released version via diawi.
On Android, I modified my android/app/src/main/AndroidManifest.xml to add in intent-filters :
<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="myapp"
android:host="3ds.myapp.fr" />
</intent-filter>
No compilation issue, when I debug on simulator or device, no problem.
The issue appears when I build a release package using flutter build apk, and distribute it via diawi. the apk is well download, installation works also, but at the end of the installation, The "Open" button is not active. The app is not present with others apps.
If I go to parameters -> Applications, I can find my app, but the "open" button is also inactive. I can only uninstall my app.
PS : The issue is exactly the same if I upload directly my apk without using diawi.
I tried to modify the scheme and host, and the result is always the same : unable to open my app.
If I modify my AndroidManifest.xml to remove the BROWSABLE category and rebuild the package, all becomes OK again. The app can be launched.
What can be the issue ?
Thanks,
Luc
My full AndroidManifest.xml :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.myapp">
<!-- 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. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="myapp"
android:icon="#mipmap/ic_launcher">
<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"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="myapp"
android:host="3ds.myapp.fr" />
</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>
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
The standard launcher intent in Android does not include a URI, so it will not match the combined filter.
An intent that contains neither a URI nor a MIME type passes the test only if the filter does not specify any URIs or MIME types.
In order to accept both the launcher intent and an ACTION_VIEW intent for your URI scheme, MainActivity will need two intent filters:
<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="myapp"
android:host="3ds.myapp.fr" />
</intent-filter>

How to change the app tray icon in android programmatically?

I had changed the app icon and app name dynamically. But the app launching icon is not changed after the app icon and app name change. Please guide.
I switched the app icon and name using activity alias concept.
See image for issue: issue image
Code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.batpoc">
<!-- 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. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="bat poc"
android:icon="#mipmap/ic_launcher">
<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">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity-alias
android:label="bat poc"
android:name=".MainActivityDefault"
android:enabled="true"
android:icon="#mipmap/ic_launcher"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>
<activity-alias
android:name=".MainActivityOneLaunch"
android:enabled="false"
android:logo="#mipmap/th"
android:label="One Launch"
android:icon="#mipmap/th"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>
</application>
I think that's the phone's issue. The phone might have stored some cache files of the app and hence the icon is not changed. Just clear the data of the app, then uninstall it, then reboot your phone and then build the app again.

Android contacts - custom field icon not showing in android 6

The goal
I'm working on application that keeps own contacts in contacts database. I want to add my own field with my logo that leads to my application's edit form.
What I did already
Working with this tutorial: http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-2/
and a couple of other sources i have assembled something like this:
AndroidMainifest.xml:
<service android:enabled="true" android:exported="true" android:name="com.MySyncAdapterService" android:process=":contacts">
<intent-filter android:icon="#drawable/icon">
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data android:name="android.provider.CONTACTS_STRUCTURE" android:resource="#xml/contacts" />
<meta-data android:name="android.content.SyncAdapter" android:resource="#xml/sync_contacts" />
</service>
Contacts.xml:
<ContactsAccountType xmlns:android="http://schemas.android.com/apk/res/android">
<ContactsDataKind
android:icon="#drawable/icon"
android:smallIcon="#drawable/icon"
android:mimeType="vnd.android.cursor.item/vnd.my.contact"
android:summaryColumn="data2"
android:detailColumn="data3"
android:detailSocialSummary="true" >
</ContactsDataKind>
</ContactsAccountType>
The problem
As can be seen on first image my custom field is displayed with icon properly in Android 4.3. Unfortunatetly Android 6.0.1 does display my field but without the icon.
Any help will be appreciated, I'm running out of hair on my head ;)
I think i resolved my problem. Android 6.0 seems to ignore ContactsDataKind icon property. In order to provide icon for custom field you need to provide action hadndling it. It will use intent filter's icon if it's provided. If not it will use your application's icon.
<activity android:name=".ContactActivity">
<intent-filter android:icon="#drawable/icon">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/vnd.my.contact" />
</intent-filter>
</activity>

Launching app from HomeScreen (shortcut) and from App drawer, is not the same

I've encountered a weird behaviour. Maybe someone could clarify it.
When I download my app from GooglePlay, there are 2 icons that are added. One goes to the Home Screen as a shortcut and another goes to the App Drawer (the screen with all the different installed apps I got on my device).
Now here is the flow of events:
I install the app from GooglePlay
I launch the app once installation is complete, also from GooglePlay (There's an open button) --> This launches the app, shows a splash screen and goes to my main screen
I navigate around in my app to a different screen
I click the home button to go to the Home Screen.
Now the interesting part:
I press the Home Screen shortcut icon GooglePlay has created for me to get back to my app --> This takes me to the exact same screen I was in.
I click the home button again to go to the Home Screen.
This time, I press the App Drawer shortcut icon to get back to my app --> This shows the splash screen again and takes me to my main screen.
This happens constantly. Each shortcut launches to a different state (or screen).
Notice that there is only one app in the Recent list.
On a the other hand. If I create the Home Screen shortcut myself, I get the same results when I launch the app from both icons.
Something is different with the shortcut GooglePlay is creating for me.
Any ideas?
EDIT
Here is the AndroidManifest.xml
Some names where changed. Some information (that is not related to intent-filters) had to be removed..
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.xxxx.xxxxjh"
android:installLocation="internalOnly">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
tools:node="replace"
android:name=".xxxxgggApplication"
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:largeHeap="true"
android:hardwareAccelerated="true"
android:theme="#style/AppTheme" >
<activity
android:name=".view.activities.StartupActivity"
android:theme="#style/AppThemeNoBar"
android:windojhoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".view.activities.WelcomeActivity"
android:theme="#style/WelcomeActivityStyle"/>
<activity
android:name=".view.activities.AccountActivity"
android:theme="#style/AppThemeNoBar"
android:windojhoftInputMode="adjustResize|stateHidden"/>
<activity
android:name=".view.activities.UrlSchemeHandlerActivity"
android:launchMode="singleInstance">
<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="xxxx" />
</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="xxxx5.4" />
</intent-filter>
</activity>
<activity
android:name=".view.activities.FileManagerActivity"
android:label="#string/app_name"
android:launchMode="singleTask"
android:logo="#drawable/fm_drawer"
android:theme="#style/AppThemeBar"
android:windojhoftInputMode="adjustPan|stateHidden"/>
<activity
android:name=".view.activities.ViewerActivity"
android:label="#string/launcher_activity_label"
android:theme="#style/AppThemeNoBar"
android:windojhoftInputMode="adjustResize|stateHidden"
android:parentActivityName=".view.activities.FileManagerActivity" >
<!-- The meta-data element is needed for versions lower than 4.1 -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".view.activities.FileManagerActivity" />
</activity>
<activity
android:name=".view.activities.DemoActivity"
android:label="#string/launcher_activity_label"
android:theme="#style/WelcomeActivityStyle"
android:windojhoftInputMode="adjustResize|stateHidden" />
<activity
android:name=".view.activities.ApplicationSettingsActivity"
android:logo="#drawable/fm_drawer"
android:label="#string/AG_Settings"
android:windojhoftInputMode="adjustResize|stateHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xxxx.xxxxjh.view.activities.FileManagerActivity" />
</activity>
<activity
android:name=".view.activities.WebViewActivity"
android:logo="#drawable/fm_drawer"
android:theme="#style/AppThemeBar" />
<service android:name="com.xxxx.sdk.controller.service.account.AccountService" >
<!-- Actions and meta data goes here... -->
</service>
<service android:name="com.xxxx.sdk.controller.service.storage.StorageService">
<!-- Actions and meta data goes here... -->
</service>
<service android:name="com.xxxx.sdk.controller.service.designFeed.DesignFeedService">
<!-- Actions and meta data goes here... -->
</service>
<service android:name="com.xxxx.sdk.controller.service.ConfigService">
<!-- Actions and meta data goes here... -->
</service>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
I am sorry to tell you that this is not a bug in your project but an android default behaviour. I did some research ending up in the following threads. Maybe you can filter out some useful information and test these approaches in your project.
App completely restarting when launched by icon press in launcher
Android application restarts when opened by clicking the application icon
Greetz.

Categories

Resources