android-5.0-lollipop

Is it possible to have a “Profile Owner” app in Android Lollipop that is not co-present

安稳与你 提交于 2019-12-05 05:38:31
The Lollipop API provides 2 new features "Profile Owner" and "Device Owner" ( http://developer.android.com/about/versions/android-5.0.html#Enterprise ). Between them, they offer just the features I need for an app that parents can use to control their children's device activity. The setup flow for each is: Device Owner During device setup, using NFC, you can tell Android that you want your app to be a Device Owner. Android then downloads the app from a URL, and the device is encrypted and is provisioned with the app as a Device Owner. So for someone installing my app from Google Play, I would

How do i remove a foreground notification in Android Lollipop?

故事扮演 提交于 2019-12-05 05:31:06
I'm looking to stop/dismiss a foreground notification for a service for a mediaplayer, much similar to Google's implementation for Google Music. For instance in Google Music, if you are playing music then the the notification cannot be swiped away. However if you pause the music it can. This is completely different to how it is implemented on Android 4.4, where the notification starts only when you leave the app and removes itself when you go back into the app. I can't see how to implement this either considering the requirements for a service to have a notification. Any help would be much

Alert dialog buttons problems in Android L

☆樱花仙子☆ 提交于 2019-12-05 04:43:26
I have created a AlertDialog in my app. Before Android L AlertDialog buttons fit in dialog box, but in Android L buttons label automatically converts in title case and buttons not fit in dialog box. Please see screenshots: Android L: Android Kitkat: Is anybody see this issue. Can any help me to solve this problem, although this is latest android version. Code : (I have not used xml code to create dialog, here is java code:) AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(R.string.feedback_label); alert.setMessage(msgStrId); alert.setNegativeButton(R.string.close_label

Android Lollipop not showing android:background image

不羁的心 提交于 2019-12-05 04:38:55
I have designed screen where I have used JPEG image as layout background. The complete UI screen is visible correctly in Android 8( GingerBread ) to Android 19( Kitkat ). The layout background is not visible in Android 20+( Lollipop ) I am using App Compatibility Library . See the screenshot below Emulator Android 8 Device Kitkat Device Lollipop Solutions already tried Create another folder mipmap and copied the same image there and try to access it using @mipmap\image_background . Nothing changed . Layout XML <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="

MediaStyle notification is not responding to RemoteControl events.

删除回忆录丶 提交于 2019-12-05 04:29:00
We are in the process of migrating our ongoing playback notification to MediaStyle notifications introduced in Lollipop. RemoteControlClient seems to be deprecated, and the MediaStyle notification is not handling the media button events (such as pause/play through headphones remote). Did anyone get this work? None of the events in MediaSessionCallback are called. Here is how the media session is initialized mSession = new MediaSessionCompat(this, TAG); mSession.setCallback(new MediaSessionCallback()); mSession.setFlags(MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS | MediaSessionCompat.FLAG

AppCompat v21 Toolbar changing logo size

有些话、适合烂在心里 提交于 2019-12-05 04:26:37
I am migrating to the new Toolbar feature in appcompat v21 from the previous action bar. I still want to keep the logo on the top left part of the actionbar (toolbar). For doing I added in my layout the support toolbar and I created a new thene for it. app:theme="@style/NewToolBarStyle" I am adding the log programmatically as there is some logic in the app for this. actionBar.setLogo(R.drawable.myicon); Referring to my new style (empty for the moment): <style name="NewToolBarStyle" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> </style> However the result is showing an image the is too

Lollipop EditBox styling

独自空忆成欢 提交于 2019-12-05 04:08:31
I currently have this one: Is it possible to remove black stroke and have only highlighted? Does it violate any Google guideline about material design It is totally an android lollipop bug. It happens to the framework and AppCompat version of the EditText and will be fixed in a future release. See here: https://code.google.com/p/android/issues/detail?id=80180 来源: https://stackoverflow.com/questions/27123278/lollipop-editbox-styling

file path return null always in lollipop android

岁酱吖の 提交于 2019-12-05 03:38:56
this is my code when i'm getting image from internal storage (gallery). In lollipop file path return always null. if (requestCode == PICK_IMAGE) { if(resultCode == RESULT_OK){ //image successfully picked // launching upload activity Uri selectedImage = data.getData(); String[] filePathColumn = { MediaStore.Images.Media.DATA }; Cursor cursor = getContentResolver().query(selectedImage,filePathColumn, null, null, null); cursor.moveToFirst(); columnindex = cursor.getColumnIndex(MediaStore.Images.Media.DATA); file_path = cursor.getString(columnindex); Log.d(getClass().getName(), "file_path"+file

Button with getBackground().setAlpha on version 5 - lollipop isn't working correctly

你离开我真会死。 提交于 2019-12-05 03:36:43
问题 I have this code and works for every version since API 14 but on Android 5.0 (Lollipop) isn't working correctly. Below is the way how I want the buttons appear. click of button1 buttonArrivals.getBackground().setAlpha(180); buttonDepartures.getBackground().setAlpha(255); click of button2 buttonArrivals.getBackground().setAlpha(255); buttonDepartures.getBackground().setAlpha(180); On Lollipop version the buttons appear with the same Alpha but I never set the same alpha. I just use the code

Primary color (sometimes) goes transparent

馋奶兔 提交于 2019-12-05 03:23:35
I am developing with the latest SDK version (API 21) and Support Library 21.0.2 and I've been having trouble when trying to implement the new Material Design guidelines. Material Design says that I need to have my primary color and my accent color and apply them over my app. But sometimes when I open the app the primary color becomes transparent in some widgets, it goes back to normal until I close the app (with the Back Button) and launch it again. Here is an example of the primary color being transparent in my toolbar. I am using Teal 500 as my primary color and, as you can see, it is