chuanpham / dynamic_icon_flutter Goto Github PK
View Code? Open in Web Editor NEWA flutter plugin for IOS app icon changing
License: MIT License
A flutter plugin for IOS app icon changing
License: MIT License
How is it possible to add other sizes for the app icon? Currently we have only 2x and 3x. We actually need to add all sizes like the app icon so that it is displayed everywhere. Currently on iOS when I bring up the app in the background the app icon is not displayed because the size is not created. A white default app icon is displayed.
How can we create all app icon sizes so that they are used in appropriate places such as push notifications?
Also we have the problem if i close the app - firstly the white default icon shown and then change to selected app icon?
Every time I'm changing the icon on Android - it creates a new app with selected icon.
AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com. ....">
<uses-feature
android:name="android.hardware.microphone"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<!-- 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. -->
<!-- android:requestLegacyExternalStorage="true"-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="TextToSpeech.Engine.INTENT_ACTION_TTS_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>
<application
android:icon="@mipmap/ic_launcher"
android:label="Fleengo"
tools:targetApi="lollipop"
tools:ignore="MissingTvBanner">
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification" />
<service
android:name="com.pravera.flutter_foreground_task.service.ForegroundService"
tools:ignore="MissingClass" />
<activity
android:name=".MainActivity"
android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:enabled="true"
android:windowSoftInputMode="adjustResize"
>
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<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:host="fleengo.page.link"
android:scheme="https" />
</intent-filter>
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
</activity>
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub- ..." />
<activity-alias
android:label="Fleengo"
android:icon="@mipmap/ic_launcher_1"
android:name=".app_icon_gradient"
android:enabled="true"
android:targetActivity=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:label="Fleengo"
android:icon="@mipmap/ic_launcher_2"
android:name=".app_icon_light"
android:enabled="false"
android:targetActivity=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:label="Fleengo"
android:icon="@mipmap/ic_launcher_3"
android:name=".app_icon_dark"
android:enabled="false"
android:targetActivity=".MainActivity"
android:exported="true">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
</application>
</manifest>
Changing icon in app:
await DynamicIconFlutter.setIcon(
icon: name,
listAvailableIcon: [
'app_icon_gradient',
'app_icon_light',
'app_icon_dark'
]);
How to fix this?
Hello,
I am trying to get a dynamic app icon for both mode Dark/Light.
So I tried your steps but with no success, and actually, It was not obvious what is the correct procedure to get that, my tries ended with getting my app in an infinite launching loop.
I will appreciate any instruction that helps to do that.
thanks in advance.
Example app is not working on android and I don't see any activity-alias inside AndroidManifest.xml @chuanpham
Hi @chuanpham, if possible please update pub.dev. The latest changes are not there.
Hey!
I've just wanted to build my app again, but there is an error that tells me, that the kotlin-version is not the right one.
The error:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':dynamic_icon_flutter' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
It would be really nice of you if you could update the app that the Kotlin Gradle Version is alright again.
Thanks for that wonderful plugin, kind regards!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.