android-5.0-lollipop

Attaching Equalizer to Android global audio output

旧城冷巷雨未停 提交于 2020-01-02 05:47:08
问题 I am planning to make an equalizer app for Android. I noticed in the Equalizer class documentation here, it says: NOTE: attaching an Equalizer to the global audio output mix by use of session 0 is deprecated. I see from other questions that although this is deprecated, it was still possible in certain Android versions; however the most recent answer is from 2013. Is it still possible to attach an Equalizer to global audio via session 0 in the latest Android version (5.1 Lollipop)? If not,

MediaPlayer.prepare() throws IllegalStateException on Android L

有些话、适合烂在心里 提交于 2020-01-02 05:12:14
问题 I have code that plays mp3 file from assets directory: MediaPlayer mediaPlayer = new MediaPlayer(); descriptor = context.getAssets().openFd("beep.mp3"); mediaPlayer.setDataSource(descriptor.getFileDescriptor(), descriptor.getStartOffset(), descriptor.getLength()); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setVolume(soundLevel, soundLevel); descriptor.close(); mediaPlayer.setLooping(false); mediaPlayer.prepare(); mediaPlayer.start(); This code was working fine on

Toolbar don´t work with pre-lollipops devices using appcompat v7

我怕爱的太早我们不能终老 提交于 2020-01-02 04:52:07
问题 I'm doing a simple code for a toolbar and menu drawer, using material appcompatv7. Everything works perfectly on the Nexus 5 with lollipop , but in a pre-lollipop (4.1 or 4.4) device crashes. The problem comes in defining the style. I put my code if anyone can tell me where the fault is. This is my main activity: import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.widget

Pass a Bundle to startActivityForResult to achieve Scene Transitions

廉价感情. 提交于 2020-01-02 04:33:06
问题 I am playing around with Lollipop sceneTransitionAnimations . To get it to work you need to implement getWindow().setExitTransition() + getWindow().setReenterTransition() in the calling activity's onCreate , and getWindow().setEnterTransition() + getWindow().setReenterTransition() in the called activity's onCreate . Then, when you call startActivity you have to pass a Bundle to that function that you obtain by calling ActivityOptions.makeSceneTransitionAnimation(getActivity()).toBundle() .

Alert dialog buttons problems in Android L

一世执手 提交于 2020-01-02 03:11:10
问题 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

MediaStyle notification is not responding to RemoteControl events.

筅森魡賤 提交于 2020-01-02 03:06:44
问题 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

Android Lollipop not showing android:background image

江枫思渺然 提交于 2020-01-02 02:35:14
问题 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

Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L

℡╲_俬逩灬. 提交于 2020-01-01 19:49:15
问题 I've followed following topic with no result. Decided to find|grep all support-v4 contents in project folder and remove them. Every time I make and run project it respons with: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1 My build.gradle from module is: apply plugin: 'com.android.application' android { compileSdkVersion 19

Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L

十年热恋 提交于 2020-01-01 19:49:07
问题 I've followed following topic with no result. Decided to find|grep all support-v4 contents in project folder and remove them. Every time I make and run project it respons with: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1 My build.gradle from module is: apply plugin: 'com.android.application' android { compileSdkVersion 19

Android L ActionBarActivity using Feinstein SldingMenu and AppCompat v21 is cut off at bottom of the screen

我与影子孤独终老i 提交于 2020-01-01 12:09:06
问题 I'm using AppCompat v21 with the Style "NoActionBar" and add a Action/Toolbar in onCreate . Also a SlidingMenu of Feinstein is added and that causes the problem that the that the Activity (and therefore the inside Fragments) overlap with the navigation buttons of Android (it is not fully shown, cut off at the bottom) if i add: android:layout_marginBottom="48dp" in the layout it everything is visible (of course). On Android 4.4. everything is shown properly. What am I missing on Android L