android-4.2-jelly-bean

java.lang.SecurityException: Requires VIBRATE permission on Jelly Bean 4.2

前提是你 提交于 2019-11-26 20:07:52
问题 Since yesterday I have an issue on Android 4.2 when I receive push notifications it requires the permission even if i don't set it to vibrate Notification notification = new Notification(icon, notificationItem.message, when); notification.setLatestEventInfo(context, "App", notificationItem.message, PendingIntent.getActivity(context, 0, intent, 0)); notification.flags |= Notification.FLAG_AUTO_CANCEL; notification.defaults |= Notification.DEFAULT_SOUND; NotificationManager nm =

AccessibilityService is started but does not receive AccessibilityEvents on JellyBean

断了今生、忘了曾经 提交于 2019-11-26 19:38:25
问题 I have a AccessibilityService that shall read out any incoming notification. It does work fine with ICS and below, but stopped working with JB. Below are the Manifest and the code: <service android:name=".Services.InstantMessengerJb" android:enabled="@bool/is_post_jb" android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE" tools:ignore="ExportedService" > <meta-data android:name="android.accessibilityservice" android:resource="@xml/accessibility_service_config" /> <intent-filter>

INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device

烂漫一生 提交于 2019-11-26 18:21:44
I've compiled Trebuchet launcher from CyanogenMod 9, and trying to install it with adb: $ adb install out/target/product/generic/system/app/Trebuchet.apk 3986 KB/s (7870141 bytes in 1.928s) pkg: /data/local/tmp/Trebuchet.apk Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] I tried on Nexus S with CM9 and Galaxy Nexus with stock JB. Why I'm getting this error? EDIT: In my case I've tried to reinstall system package with package manager. That's not supported, so I've got this error. Source of the error may differ in your case. it means the application which you want to install is already installed.

Can't connect Nexus 4 to adb: unauthorized

丶灬走出姿态 提交于 2019-11-26 17:57:30
问题 I have a Nexus 4 with Android 4.3 and I am trying to connect the device to a computer with Windows 7 64bit. I installed the latest drivers and the latest adb version. I think I tried almost everything and I still get the following message: C:\Program Files (x86)\Android\sdk\platform-tools>adb devices List of devices attached 007667324ccb229b unauthorized What can be the reason for this error? 回答1: I had similar situation. Here is what I did: Try to check and uncheck the USB Debugging option

Android 4.2 on Nexus 7: canvas.drawText() not working correctly

最后都变了- 提交于 2019-11-26 17:48:16
问题 I'm facing a serious issue with my Application, published on Google Play and apparently working fine on all versions of Android except for > 4.0. This is a screenshoot from my Android 4.0 HTC phone: And this is what I get on Nexus 7, Android 4.2.1 (same behaviour in the emulator): I see the same behaviour for each text drawn using canvas.drawText() the Paint used to draw text is: paint = new Paint(); paint.setAntiAlias(true); paint.setColor(color); //some color paint.setTextSize(size); //some

Change Actionbar height on Android JellyBean

荒凉一梦 提交于 2019-11-26 17:41:31
问题 I've been recently developing an Android app, in which i need to have a custom layout and dimension for the tab bar. The way that i did it until now is by using Jake Wharton's ActionBarSherlock library to support pre-HoneyComb Android versions, and by applying a style to the app in which i edit the actionBarSize style item. Now, I've been testing the app on the Galaxy S3 (with Jellybean on it), and the tab bar height doesn't change anymore according to the actionBarSize value. So I've started

How to encode Bitmaps into a video using MediaCodec?

本秂侑毒 提交于 2019-11-26 15:17:18
问题 I would like to encode a set of Bitmaps that I have into an h264. Is this possible via MediaEncoder? I have written some code in order to do it, but the output cannot be played in any media player I have tried. Here's some of the code that I primarily borrowed from other sources that I found on Stackoverflow. mMediaCodec = MediaCodec.createEncoderByType("video/avc"); mMediaFormat = MediaFormat.createVideoFormat("video/avc", 320, 240); mMediaFormat.setInteger(MediaFormat.KEY_BIT_RATE, 125000);

Android 4.2.1 wrong character kerning (spacing)

倾然丶 夕夏残阳落幕 提交于 2019-11-26 14:16:37
问题 When using Canvas and drawText() method I see a different rendering on Android 4.2.1. Below 4.2: For Android 4.2.1 (Nexux 7) I get: As you can see the text Consumption is very tight. Seems to be a kerning problem introduced in 4.2.1. The Paint used to draw text is nothing special: titlePaint = new Paint(); titlePaint.setAntiAlias(true); titlePaint.setColor(0xffffffff); titlePaint.setTextSize(0.125f); titlePaint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); titlePaint.setTextAlign

How to open camera directly in panorama/photosphere mode?

狂风中的少年 提交于 2019-11-26 13:46:44
问题 I am stuck in a problem in Android 4.2 Jelly Bean. How can I open camera from my application, by default in panorama/360 photosphere mode? I have searched a lot in grepcode and also Camera.Parameters, but nothing seems to help. Does anybody have any clues to open camera in panorama mode apart from video and image? 回答1: there is no standard way to do it. AFAIK Panorama, Photoshere are proprietary features of Gallery3d (provided by Google) package com.google.android.gallery3d. It's depends on

Android WebView JellyBean -> Should not happen: no rect-based-test nodes found

元气小坏坏 提交于 2019-11-26 12:53:44
问题 My application is using a lot of webviews which are lying in fragments which are hold by a ViewPager. Whenever i swipe through the app on my Galaxy Nexus with Jellybean on it i get the following console message again and again: 08-23 13:44:03.374: E/webcoreglue(21690): Should not happen: no rect-based-test nodes found Can anyone explain to me what is going wrong here so that i might be able to fix the issue? 回答1: The issue occurs because in some scenarios WebView fails to notice that its