android-4.2-jelly-bean

In Android (on JB), how can I add an action to a custom rich notification?

回眸只為那壹抹淺笑 提交于 2019-12-12 10:53:56
问题 I've been playing with the new rich notificaitons in Jelly Bean, and everything works as expected when I set up a new notificaiton using the templates Notification.BigPictureStyle , Notification.BigTextStyle , or Notification.InboxStyle . I can use the Notification.Builder.addAction() method, and the action buttons show up at the bottom of the extended notification. But when I try to create a cutsom notification using Notification.bigContentView, the action buttons never show up. Just to

Wrong dpi value for Nexus 7". Bug in the platform, or are we doing something wrong?

心已入冬 提交于 2019-12-12 00:51:41
问题 This code: activity.getWindowManager().getDefaultDisplay().getMetrics(dm); is reporting landscape xdpi = 195.38461 on the new Nexus 7. My tape measure says the screen is 1/16" shy of 6" wide, and at 1280 pixels, that works out to 215.57894. And yes, our Android.xml says: <uses-sdk android:minSdkVersion="16"/> Is this just a bug, or are we doing something wrong? 回答1: From this response from Dianne Hackborn: Sorry you just can't use them. Nothing in the platform makes use of them. They need to

Differences between WifiConfiguration status

吃可爱长大的小学妹 提交于 2019-12-11 19:52:46
问题 What is the difference between WifiConfiguration.Status = CURRENT and ENABLED? I can figure for DISABLED but the difference between CURRENT and ENABLED is not obvious to me. Also, for a given connected network, 4.0.3 doesn't give me the save status as 4.0.4 and 4.2.2 give me. The former gives me ENABLED while the later give me CURRENT. Someone knows why? Thanks! 回答1: From the Javadoc for the Status class: /** this is the network we are currently connected to */ public static final int CURRENT

JellyBean external display not found with MediaRouter or DisplayManager

人盡茶涼 提交于 2019-12-11 19:17:57
问题 I am trying to use Presenter feature in JellyBean to show custom graphics on additional large screen. I am connected with MHL compliant HDMI adapter (microUSB -> HDMI). Piece of my code trying to detect external display is below. For some reason - I do get output on my external monitor but DisplayManager won't detect external display. I wonder if this has to do with adapter or it would be the case if I connected phone to external display with HDMI cable directly? My logcat: http://postimg.org

Urdu font rendering issue in android 4.1

烂漫一生 提交于 2019-12-11 13:52:52
问题 One of my letters does not render properly in android 4.1 : The same renders fine on 4.2 and 4.3 : I would like to fix this if possible, any ideas how? 回答1: The bad rendering of "heh" in that example is due to a mistake in the Droid Arabic Naskh font. It was fixed by an update in October 2012. (See report here — https://android.googlesource.com/platform/frameworks/base/+/cd31db60ee6df6dd84bce9925e96b6cccbdf522d) The relevant changes is: Fixed shaping of U+06C1 HEH GOAL. This explains why it

Android error with sqlcipher on version android 4.2.2

会有一股神秘感。 提交于 2019-12-11 09:43:14
问题 I have a problem when i try to launch my project on Android 4.2.2. Here is the stacktrace : 08-06 11:00:50.041: E/AndroidRuntime(10606): Caused by: net.sqlcipher.database.SQLiteException: not an error 08-06 11:00:50.041: E/AndroidRuntime(10606): at net.sqlcipher.database.SQLiteDatabase.dbopen(Native Method) 08-06 11:00:50.041: E/AndroidRuntime(10606): at net.sqlcipher.database.SQLiteDatabase.<init>(SQLiteDatabase.java:1951) 08-06 11:00:50.041: E/AndroidRuntime(10606): at de.greenrobot.dao

ActivityNotFoundException exception on Jelly Bean for Gmail composer

雨燕双飞 提交于 2019-12-11 04:17:23
问题 This class works fine on ICS, but fails with ActivityNotFoundException on Jelly Bean. Do you guys know why? Thank you. public class EmailSender { public static Intent getSendEmailIntent(Context context, String email, String subject, String body, File fileName, String chooserTitle) { final Intent emailIntent = new Intent( android.content.Intent.ACTION_SEND); //Explicitly only use Gmail to send emailIntent.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail");

Android CalendarView text size too small on 4.1

做~自己de王妃 提交于 2019-12-11 02:57:15
问题 It looks like there is a bug with Jelly Bean 4.1 that causes the text size of dates in CalendarView to be disproportionally small on hi-res devices. Appears that it is fixed in 4.2, but is there any workaround to make it look sensible on 4.1 devices? I tried something like this: <CalendarView android:dateTextAppearance="@android:style/TextAppearance.Medium" /> but no change. Screenshot jellybean 4.1 http://android.googlecode.com/issues/attachment?aid=349320000000&name=date_too_small_gn.png

How does garbage collection work in Android 4.2 Jelly bean Dalvik VM?

不羁岁月 提交于 2019-12-11 02:06:42
问题 Edit : Is this statement "So in android 2.3 concurrent mark and sweep is used for stack related objects treating everything as pointer and copying garbage collection is used for the objects in the heap" correct ? Any one can explain ? garbage collector in android 2.3 I know the subject of Garbage Collection in Android has been discussed, but I can't find a clear and detailed explanation of how it works and specially in the last version of Android which is Jelly Bean 4.2 . In addition to the

Video player not working on Jelly Bean device :android.content.ActivityNotFoundException

泄露秘密 提交于 2019-12-11 01:10:02
问题 I recently tried to run my application on JellyBean device and was surprised to see that the video player is not working and throws error: ??-?? ??:??:??.???: INFO/<unknown>(<unknown>): FATAL EXCEPTION: main ??-?? ??:??:??.???: INFO/<unknown>(<unknown>): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=/storage/sdcard0/Android/data/com.packagename.pkg/files/Movies/505c5bea-af51-4100-b95a-e2e87e6126c4.mp4 typ=video/* } The same