android-5.0-lollipop

AlarmManager doesn't work on samsung device with Android lollipop 5.0.2

流过昼夜 提交于 2019-12-12 02:57:39
问题 I have an issue with the AlarmManager API, it doesn't fire at all on my samsung device, but it works on other Android device... My code is like that: public void setAlarm(int hourAlarm, int minutesAlarm, int numeroAlarm, boolean yesOrNoRepeatAlarm) { PendingIntent pendingIntent = PendingIntent.getBroadcast(this, numeroAlarm, broadcastIntent, PendingIntent.FLAG_UPDATE_CURRENT); Log.i("numeroAlarm", numeroAlarm + ""); Calendar calendar = Calendar.getInstance(); if( (calendar.get(Calendar.HOUR

unbindDrawables at PagerAdapter Android Lollipop don't work

纵饮孤独 提交于 2019-12-12 02:40:01
问题 I am trying to make Double View Pager and I override destroyItem function from my PagerAdapter just like in code bellow: @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView((View) object); unbindDrawables((View) object); System.gc(); object = null; } protected void unbindDrawables(View view) { if (view instanceof ImageView) { Drawable drawable = ((ImageView) view).getDrawable(); if (drawable instanceof BitmapDrawable) { BitmapDrawable

Unknown permission android.permission.ACCESS_SUPERUSER in package com.powervr.PVRHub

梦想的初衷 提交于 2019-12-12 01:54:09
问题 While trying to utilise PVRHub Imagination tool for OpenGL ES tracing I meet a problems dealing with it. First APK launch gives warning about unknown permission android.permission.ACCESS_SUPERUSER and notification message about disabling to get root access (see details below): Logcat outputs related to the issue: W/PackageManager( 1083): Unknown permission android.permission.ACCESS_SUPERUSER in package com.powervr.PVRHub ... E/PVRHub (18453): Your device does not have a Superuser.apk. E

Open other application in startLockTask mode using setLockTaskPackages() string array params in Android 5.0 (Lollipop) is not working

爱⌒轻易说出口 提交于 2019-12-11 15:06:43
问题 Motive: Building a KIOSK App for 5.0 & 6.0+ devices Method followed: adb to run the “dpm set-device-owner” command. By using startLockTask(); my app entered into authorised pin mode successfully. I had other challenge which is, I have to open other of my installed application from KIOSK app. I achieved this by constructing array of string packages and set it to DPM's setLockTaskPackages below is the code sample mDevicePolicyManager.setLockTaskPackages(mAdminComponentName, getKioskApps());

Failure [INSTALL_FAILED_OLDER_SDK] error from Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version L

拥有回忆 提交于 2019-12-11 14:54:56
问题 Recently I was receiving this error. Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version L So I changed it to minSdkVersion 'L' And then I got this error Failure [INSTALL_FAILED_OLDER_SDK] So I guess I did not resolve the first error correctly. I'm not exactly sure what to do. I've been following this: Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version L declared in library com.android.support:appcompat-v7:21.0.0-rc1 Manifest merger

Can't use Lollipop specific classes in Android Studio

三世轮回 提交于 2019-12-11 14:06:06
问题 I'm having problems with Lollipop specific classes in a minSdk 21 project. This is my gradle.build android { compileSdkVersion 21 buildToolsVersion "21.1.0" defaultConfig { applicationId "com.mypackage" minSdkVersion 21 targetSdkVersion 21 versionCode 1 versionName "1.0" } When I try to use UsageStatsManager I get a 'Cannot resolve symbol UsageStatsManager' error from Android Studio . Or if I use Context.JOB_SCHEDULER_SERVICE / Context.USAGE_STATS_SERVICE the constant isn't found. This is an

Android Notification with BigPicture style and BigText style

*爱你&永不变心* 提交于 2019-12-11 13:56:52
问题 Does anyone can help me out here.How to implement BigPictureStyle notification with multiline summary text in android.I am able to do by reducing text size which I don't want to.Please help me out on this. Can we combine two types of notification like big picture and big text style?Does any one know about this? 回答1: From your requirement i can figured out that you have to create custom layout for notification because basically you can not combine both BigPicture and BitText style so you have

Android Spinner Adapters and Lollipop

≡放荡痞女 提交于 2019-12-11 13:16:23
问题 Like many others, I'm using Parse.com in my android application. When I use a ParseQueryAdapter in a fragment to retrieve data and pass it to a spinner a java.lang.IllegalArgumentException: Spinner adapter view type count must be 1 and the application crash. I have searched for a fix and I know that this is a problem that parse.com and not me have to resolve. But, I really want to make my app looks Material Design and if my app targetSdkVersion 19 the status bar is always black. There is an

device with android lollipop crash after update to fcm

旧街凉风 提交于 2019-12-11 11:35:15
问题 recently I have updated from GCM to FCM in my android project, and after that the app start to crash on android note3 with lollipop OS this is what found on the log W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found. I/DynamiteModule: Considering local module com.google.android.gms.crash:0 and remote module com.google.android.gms.crash:215 does anyone face a problem like this and be able to solve it ? EDIT I am using firebase version 12.0.1 EDIT2 ext

check if charged setAlarmClock of AlarmManager

江枫思渺然 提交于 2019-12-11 11:27:04
问题 The Lollipop API represents setAlarmClock method to charge an intent. to start in I can use this code: am.setAlarmClock(new AlarmManager.AlarmClockInfo(nexttime,pi), pi); to cancel: am.cancel(PendingIntent.getService(ctx, 0, intentS, 0)); but how to check whether it was already charged? In common case I can use this: boolean alarmUp = (PendingIntent.getBroadcast(ctx, 0, intent, PendingIntent.FLAG_NO_CREATE) != null); but what about this new method? Does it works properly for setAlarmClock on