App custom notification light color - android

I am programming my own app and I have some issues with my notifications.
Is it possible to have custom notification light color in android?
Because when I try to set the color to #FF64B5F6 I didn't gte this color.
Or can I only set the color to these Color.RED, Color.MAGENTA?
And when I can set custom colors, is this the right way?
Java:
NotificationCompat.Builder(this.context).setLights(ContextCompat.getColor(this.context, R.color.c_account), 500, 500)
xml:
<color name="c_account">#FF512DA8</color>
Hope you guys can help me.

Is it possible to have custom notification light color in android?
Well, you can try. It may not work.
First, some devices do not have an LED.
Of those that do, some devices do not use the LED for showing notifications.
Of those that do, some devices do not support different colors.
Of those that do, some devices will not support arbitrary colors (though ideally they map your requested color to one that they do support).
So, you are welcome to request a specific color. Just bear in mind that it is quite likely that you will not get the color that you want, and that there is no guarantee that you will get any sort of LED effect.

Related

Theme based Google play icons

I found that some apps icons on google play are changing their background colour based on whether dark theme is enabled or not like in the photos below.
Any ideas how to implement this?
Light mode icon
Dark mode icon
This is based on a transparent background you can define making your app icon.
Probably you remember you need to set a foreground (often the symbol, here the pocket) and also a background. If you use a transparent background, it will get a greyish black in darkmode and a white in light mode ("whitemode").
It's an optical illusion.
You could check it if you would have the app and set a custom screen wallpaper on your phone, for example with particles. Those would shine through the app icon background.
Probably your idea is posible in the future, I haven't heard about it yet. Cheers!

How Can I Improve Colour Reproduction When Styling HERE Maps?

When styling a HERE Map for an application using the NORMAL_DAY scheme as a base, I have noticed that the colours of some map elements are exactly as assigned, while others are off by 2-4% (the amount of black in the colour) and some others are wildly off (30-40%).
For example, LAND was sampled at ARGB 255,251,57,57 while it was actually set to ARGB 255,255,0,0 (pure red). It feels like there is some kind of runtime manipulation of assigned colour values.
Can anyone shed light on this? How can this be compensated for?
you can load the custom style. please refer https://heremaps.github.io/maps-api-for-javascript-examples/change-style-at-load/data/dark.yaml

Color issues from photoshop to android

I have created some images and set some colors using photoshop and applied them to our app in android studio, but for the same hex code, colors arent same, I do not understand why this is happening. I took a screen shot of the color im working in photoshop and then opened the image in photoshop, surprisingly the color code changed, and it was same as android studio was showing and its not the actual color, I have even checked the RGB/ CMYK mode, it is in RGB mode, i even tried CMYK mode, in the both the cases the problem persists. No matter how many times i have tried, the problem persists. Please help me out
I agree with Rodrigo, you should set a color workflow.
If you are mainly working on documents viewed on the web or mobile devices :
1) in Photoshop go to Edit>Colors Settings and set your RGB Colorspace to "sRGB".
2) Make sure Proof Colors is unchecked in the View menu.
3) Make sure your document has the "sRGB" color profile attributed (can be fixed by using "Attribute color profile" or "Convert color profile" in the Edit menu).
This should ensure color consistency across most devices and web browsers.
It very strongly depends on device screen. I have 4 devices, and colors are different on all of them
You have to setup your color profile in photoshop, by default photoshop gives you different colors when you save for web. Check out this tutorial step by step and let me know if this fixed your problem.
http://viget.com/inspire/the-mysterious-save-for-web-color-shift

Android notification icons with color

According to the android iconography documentation here
and also here the icons in the status bar are supposed to be entirely white with transparent background. However, even the built in icons don't all follow this pattern it seems. The signal quality (for wifi and cell), battery indicator, and some others have the holo blue background on some icons on newer devices. Is this color built into the icon itself?
I am looking to implement a status bar icon with my app that will indicate the status of a connection to an external (bluetooth) device. I was planning on doing my company logo (which is a fairly simple, mostly circular shape) filled in with a color to indicate the status of the connection (connected - green, not connected - red). But since I'm not supposed to use a color these seems much more complicated. Is it really that bad to use a non white icon, and if it's so bad why does google do it?
It's convention, like creating accessors for your private fields, but it's not strict that you follow it. That being said, it is a good idea to follow the color scheme of the OS, simply because that way everything looks uniform. Therefore, I would suggest that rather than green and red, you choose holo blue and grey. It is completely your choice as the developer.

Icon color on different themes

Different Android devices have different themes.
That means, that background colors, like in dialogs, may differ among Android versions and among manufacturers.
This may result into icons getting "invisible":
The problem with stock Android themes could be solved relatively easy, by providing different colored icons in target specific folders, e.g. white icons in a folder drawable-v14, and black ones in drawable-v10.
But that does not solve the issue that comes with customized themes from manufacturers, may it be TouchWiz, Blur or Sense.
It is simply not possible to cover every device by this method.
Another way would be, to draw a small black border around white icons, and vice versa.
But if the background would be gray, like in ICS, it wouldn't look good, either.
So, the question is: How to provide custom icons, that will work well on every theme, without touching the theme itself?
Accounting for all vendor choices (and mistakes) would be a pain.
I see a couple of options:
Explicitly select a stock theme and hope for the best
Select a custom theme derived from a stock theme, where you control the background color
Dynamically evaluate the background color for the chosen theme, and set the icon based by a tipping point (e.g. dark icons if background is light enough). Not sure if this would be practical, but at least it should be somewhat universal.
I recently went with the hard-coded colors in a derivative theme to fix a bug in the Nook dialog color selections for a dialog. More extensive testing would probably show me another platform that I just made worse with that.
Hopefully someone has a better answer than those, because none of those seem completely clean and universal. Reading your post again, it looks like none of those options meet your criteria of not touching the theme, either.

Categories

Resources