android-4.2-jelly-bean

READ_LOGS permission on Jelly Bean (api 16)

£可爱£侵袭症+ 提交于 2019-11-26 11:45:20
Since Android Jelly Bean doesn't support the logs reading permission (according to this google io 2012 video and this one too ) , i would like to know if it's possible for rooted devices (or non-rooted devices) to be able to bypass this restriction and be able to read the logs. How do i do that? Do i really need to make the app a system app, or is rooting enough? You can obtain the permission on a rooted device by executing the pm grant command from your app. Probably you will have to restart the app after that for the change to take effect, though: String pname = getPackageName(); String[]

is it possible to hide the system bar

☆樱花仙子☆ 提交于 2019-11-26 08:19:34
问题 I created a launcher, to use it in an internal application. for some security reasons i would like to hide the system bar (the acces to the parameter an ordrer to the acces to installed application). But i have no idea how to do this. Tablet that will be used are not rooted. Can you help me please? 回答1: You can't hide it but you can disable it, except home. For that you can give your application as home category and let the user choose. <category android:name="android.intent.category.HOME" />

INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device

北战南征 提交于 2019-11-26 05:16:09
问题 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

Check for navigation bar

馋奶兔 提交于 2019-11-26 04:40:05
问题 I am trying to check to see whether the android navigation bar is present on load so that I can adjust a layout accordingly, does anyone have any suggestions? This is the navigation bar I am trying to detect: P.S. All I have found so far are \'bad\' ways to try and remove the bar, which I dont want to do. 回答1: Took me some time but I've found a more reliable way than relying on hasPermanentMenuKey() which doesn't work for newer phones like the HTC One which have no menu key but do have home &

READ_LOGS permission on Jelly Bean (api 16)

跟風遠走 提交于 2019-11-26 02:34:55
问题 Since Android Jelly Bean doesn\'t support the logs reading permission (according to this google io 2012 video and this one too ) , i would like to know if it\'s possible for rooted devices (or non-rooted devices) to be able to bypass this restriction and be able to read the logs. How do i do that? Do i really need to make the app a system app, or is rooting enough? 回答1: You can obtain the permission on a rooted device by executing the pm grant command from your app. Probably you will have to

Jelly Bean DatePickerDialog — is there a way to cancel?

梦想与她 提交于 2019-11-26 02:16:02
问题 --- Note to moderators: Today (July 15), I\'ve noticed that someone already faced this problem here. But I\'m not sure if it\'s appropriate to close this as a duplicate, since i think I provided a much better explanation of the issue. I\'m not sure if I should edit the other question and paste this content there, but I\'m not comfortable changing someone else\'s question too much. --- I have something weird here. I don\'t think the problem depends on which SDK you build against. The device OS

How to change the background color of Action Bar&#39;s Option Menu in Android 4.2?

徘徊边缘 提交于 2019-11-26 00:22:21
问题 I\'d like to change the background color of the option (overflow) menu in Android 4.2. I have tried all the methods but it is still showing the default color set by the theme. I used the following code & XML configs. MainActivity.java public class MainActivity extends Activity { @SuppressLint(\"NewApi\") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getActionBar().setIcon(R.drawable.ic_launcher);

Android Speech Recognition as a service on Android 4.1 & 4.2

≯℡__Kan透↙ 提交于 2019-11-26 00:00:02
问题 I have managed to get continuous speech recognition working (using the SpeechRecognizer class) as a service on all Android versions up to 4.1. My question concerns getting it working on versions 4.1 and 4.2 as it is known there is a problem in that the API doesn\'t do as documented in that a few seconds after voice recognition is started, if no voice input has been detected then it\'s as if the speech recogniser dies silently. (http://code.google.com/p/android/issues/detail?id=37883) I have