Change app icon every day
You can not change the Icons on your normal Apps on iOS, but you can change them between updates.
You can change the icons of Newsstand Apps (i.e. magazine Apps inside the Newsstand), if you are making such an App.
Changing the app icon with MonoTouch every day
Changing the app icon programmatically is not allowed i am afraid. It must match the icon supplied to the App Store.
Is there any way to dynamically change an app icon like Calendar app does?
Whatever your home screen is has special hooks for whatever your calendar app is and whatever your alarm clock app is. In general, apps cannot update their icons.
What do you mean by hooks?
For example, Samsung can ship a Samsung calendar app on Samsung devices. Samsung's home screen on those same Samsung devices can have special rules for rendering an icon for Samsung's calendar app, rules that involve showing the day of the month. This is because Samsung wrote the home screen. If you install a third-party home screen, it may not do the same thing. After all, I can write a home screen in an hour or so, and I feel quite confident that I don't have to do anything special for Samsung's calendar app.
There's nothing stopping Samsung from exposing some sort of API to allow developers to hook into Samsung's home screen and notify it about this sort of thing. Whether Samsung intends for third parties to use that API, or whether it is somebody hacking into how Samsung does it for their own apps, I can't say.
(BTW, I am citing Samsung here as a possible example -- I don't know that they actually have this sort of feature, and if so on which devices they have it)
I seem to recall that somebody has a GitHub project that tries to wrap the proprietary APIs of various home screens. IIRC, some supported capabilities included either replacing the app icon or adding a badge (e.g., unread message count). However:
Only a small percentage of devices will support those proprietary APIs
Undocumented and unsupported APIs, discovered through reverse-engineering apps, are subject to change and may break in unexpected ways
I am quite certain that there is nothing in the Android SDK that supports dynamic app icons. The only thing that I know of, that people have tried, is using
to have N different "activities", all pointing to the same implementation, but having different icons. Using PackageManager
and setComponentEnabledSetting()
, the app disables the old launcher alias and enables a different one, in hopes that home screens will pick up on this and show the new icon. A few do. Others only would find out about the change on a reboot.
To flip the problem around, I can write a home screen. Perhaps I want to offer some way for apps to change their icons on the fly, even though there are no standards for it. Perhaps I don't. Perhaps I do not intend to use icons at all, as my home screen is optimized for the visually impaired, and so it is using text-to-speech and hardware key input. It's my home screen implementation, and I can do what I want.
How can i change icon.png depending on app theme (day/night) android kotlin
The usual way is to use a night
resource qualifier, so if you're using a dark theme it pulls the named resource from the equivalent night
folder if it exists there.
You have three basic options with this I think:
just call them both
logo.png
, but put one version indrawable
and the other indrawable-night
. That way, whenever you refer to@drawable/logo
it'll pull the correct version depending on the theme. If you have multiple density versions, indrawable-hdpi
etc, you'll need them indrawable-night-hdpi
etc. (the qualifier order matters)if you're making your splash in the usual way, where you create a splash drawable with a background layer and your logo drawable on another layer, you could just make a
night
variant of this instead (indrawable-night
). Each version can explicitly refer tologo_day
orlogo_night
and you can just keep those PNGs in the normaldrawable
folderor you can make a
night
version of your splash theme, and explicitly set the background to the dark version of your splash drawable instead. Both your splash drawables can stay in the normaldrawable
folder
So basically, something's gotta get a version in a night
-qualified resource folder, so it can provide an alternative resource for dark mode. It's up to you which resource in that hierarchy you want to make the night version of (or you can do it for all of them if you want).
Also bear in mind that your splash theme (if you're doing it that way) follows the system's dark mode setting. If you're implementing a toggle in your app, and you set it to dark mode, the splash will still show up as the light variant if that's what the device is set to. That theme is set before your app starts and gets to work out if it should be in dark or light mode
How to create dynamic icon like calendar icon of ios 7?
You can not do this, there is no API allowing this.
Your apps icon is in your application bundle which is readonly and therefor can not be modified.
How to change flutter app icon from code?
Yes, you can change the app icon dynamically. However, only for the iOS as of now.
Package: Flutter Dynamic Icon
Sample Code:
import 'package:flutter_dynamic_icon/flutter_dynamic_icon.dart';
try {
if (await FlutterDynamicIcon.supportsAlternateIcons) {
await FlutterDynamicIcon.setAlternateIconName("photos");
print("App icon change successful");
return;
}
} on PlatformException {} catch (e) {}
print("Failed to change app icon");
...
// set batch number
try {
await FlutterDynamicIcon.setApplicationIconBadgeNumber(9399);
} on PlatformException {} catch (e) {}
// gets currently set batch number
int batchNumber = FlutterDynamicIcon.getApplicationIconBadgeNumber();
Note: You shold check first to see if platform supports dynamic icons or not using await FlutterDynamicIcon.supportsAlternateIcons
boolean check and then try to change the icons.
Office js - different icon for each taskpane
There is no way currently. I'd suggest posting a feature request for that.
Feature requests on Tech Community
are considered, when the dev team go through the planning process. Use the github label: “Type: product feature request” at https://aka.ms/M365dev-suggestions .
Related Topics
Failed to Read Values in Cfprefsplistsource iOS 10
Programmatically Change Rootviewcontroller of Storyboard
iOS Multiple Columns in Uitableview
How to Add Unique Constraints for Some Fields in Core Data
Simulate Force Touch/3D Touch on iPhone 6S or iPhone 6S Plus Simulators
How to Release a Cgimageref in iOS
How to Set Cg_Context_Show_Backtrace Environmental Variable
How to Add Minutes to Current Time in Swift
Generate a Random Float Between 0 and 1
Navigationlink Works Only for Once
How to Integrate Facebook Without Redirect Safari Browser in iOS App with Latest Fbsdk
Working with C APIs from Swift
Changing the Height of the Navigation Bar iOS Swift
Unable to Get the Access Token Through [Fbsdkaccesstoken Currentaccesstoken] in iPhone Sdk
Need Assistance Setting Two Buttons of Equal Width, Side by Side Autolayout
Kcfstreamerrordomainssl, -9802 When Connecting to a Server by Ip Address Through Https in iOS 9