Tag: android-5.0-lollipop

How to solve the error onClientConnectionState() – status=22 clientIf=7 in BLE

I have an Android application which uses to connect Bluetooth Low Energy (BLE) with my phone. The application worked well in the almost phone such as Galaxy S5 (Android 5.0.1), Galaxy S6 (Android 6.0). However, it has a critical issue in Galaxy Note 3 (Android 5.0.1). When I call the connect() function, and then call […]

Crash in Activity Transitions with SharedElement

I’m using Activity transitions from a ViewPager (in the calling activity) with a shared element and content transitions as well. I’m getting this crash when re-entering to the calling activity: java.lang.NullPointerException: Attempt to invoke virtual method ‘void android.os.ResultReceiver.send(int, android.os.Bundle)’ on a null object reference at android.app.EnterTransitionCoordinator.sendSharedElementDestination(EnterTransitionCoordinator.java:199) at android.app.EnterTransitionCoordinator.viewsReady(EnterTransitionCoordinator.java:123) at android.app.EnterTransitionCoordinator$2.onPreDraw(EnterTransitionCoordinator.java:148) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:895) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2153) at […]

setColorFilter() broken on Android 4, working on Android 5

I am trying to flash different colours onto the screen at regular intervals (a few times per second). To change the colours, I use Drawable.setColorFilter(int color, Mode mode) on the background of my main view: myView.getBackground().setColorFilter(Color.RED, PorterDuff.Mode.SRC); For debugging purposes, I added another view that I change using View.setBackgroundColor(int color). The problem is that the […]

“FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS” affects getRootView().getHeight()

I found a issue that affects Relative Layout height while I was trying to add color to status bar. adding Flag affected of calculation of the relative layouts rootView’s height. private void changeStatusBarColor(){ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.setStatusBarColor(getResources().getColor(R.color.red_e31837)); } } I have a view tree observer that help me […]

Glitch when animating nested views in a shared element Activity transition?

I’ve been messing around with the new APIs in Android 5.0 and have been trying to figure out whether or not it is possible to animate both a ViewGroup and one of its children separately as shared elements during an Activity transition. The screenshots below gives a simplified example of what I am trying to […]

AVD stays stuck on “Android is starting”

I’ve no issue launching a Wear VD but I can’t get a normal Android to start… Working on Windows 7 – 64 bits, with Intel Core 2 Duo E8200 (so no 64 bits emulation) and 6Gb RAM. When I try to launch a virtual device with avd, If I try with Intel Atom (x86), I […]

Convert Android camera2 api YUV_420_888 to RGB

I am writing an app that takes the camera feed, converts it to rgb, in order to do some processing. It works fine on the old camera implementation which uses NV21 Yuv format. The issue I am having is with the new Yuv format, YUV_420_888. The image is no longer converted correctly to RGB in […]

Weird issue when transitioning ImageView in Android 5.0

I’m experiencing a strange issue / bug regarding ImageView transitions between Activities in Android 5.0. I’m trying to transition a thumbnail image from Fragment A (in Activity A) to the header image of Fragment B (in Activity B). It works well most of the time, but it sometimes messes up ever so slightly. Here’s a […]

Android Lollipop Activity Screen corrupted

This question already has an answer here: Android SystemUI glitches in Lollipop 6 answers

Screen Capture and Sharing in Android 5.0

There is a mention about Screen capture and Sharing api in Android 5.0 at: Android 5.0 APIs There its mentioned about MediaProjectionDemo class in the ApiDemos. I could not find it anywhere to download. Where can I find it? Are they yet to publish API demos for Android 5.0?

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.