android-4.2-jelly-bean

Android 4.2 developer settings still unavailable

拈花ヽ惹草 提交于 2019-12-01 15:45:13
How do you access Android 4.2's developer settings when the method prescribed on their developer site does not work? I followed the directions on a Nexus 7 tablet. I went to Settings > About tablet , scrolled to the bottom of the screen, and clicked the Build Number 7 times. I was greeted with the message "Congratulations, you're now a developer." But apparently, I'm still not one. I checked Settings and scrolled all the way down to the bottom, but no Developer options were available. I reset the tablet and restarted it, with no result. When I click on Build Number again, it says "No need, you

Android 4.2 developer settings still unavailable

坚强是说给别人听的谎言 提交于 2019-12-01 14:38:35
问题 How do you access Android 4.2's developer settings when the method prescribed on their developer site does not work? I followed the directions on a Nexus 7 tablet. I went to Settings > About tablet , scrolled to the bottom of the screen, and clicked the Build Number 7 times. I was greeted with the message "Congratulations, you're now a developer." But apparently, I'm still not one. I checked Settings and scrolled all the way down to the bottom, but no Developer options were available. I reset

Jelly Bean Google Voice text-to-speech API?

我的未来我决定 提交于 2019-12-01 05:27:27
问题 Is there a way I can use the text-to-speech from the new Google Voice? In Jelly Bean the pronunciation is really smooth so I was thinking may be there is some kind of API for access to that service? Thanks! 回答1: Yes, it is possible to access the Google Now voice using the Android TTS APIs. You need to use "KEY_FEATURE_NETWORK_SYNTHESIS" in the "params" parameter for the TextToSpeech.speak() call. See http://developer.android.com/reference/android/speech/tts/TextToSpeech.Engine.html#KEY

Android 4.2 with 4 MediaPlayers = “Can't play this video”

倾然丶 夕夏残阳落幕 提交于 2019-12-01 03:59:34
Whenever I'm trying to load at least 4 mediaPlayers, one of them will corrupt the video it's trying to load and trigger an Android OS message "Can't play this video" Other information: For 3 mediaPlayers everything works fine. On other Android versions, different from 4.2, the same code with the same 4 video works. The 4 video can be played independently on the device. There is no format problem. After starting the program and getting the "Can't play this video" message, the video can no longer be played in any other application unless I reset the device. I tried this both with VideoViews or

Select a music file to play with MediaPlayer

梦想的初衷 提交于 2019-12-01 00:37:27
I'm new in android programming and now i get a problem with my app. I intend to code a MediaPlayer application with feature: select a file from storage using intent then start playing that file. I use "MediaPlayer.create(context, uri)" method but currently i got error protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //openFile(); Button openFile = (Button) this.findViewById(R.id.ButtonOpen); openFile.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent chooseFile; Intent intent;

Android: Programatically trigger text selection mode in a WebView on Jelly Bean

纵饮孤独 提交于 2019-11-30 20:33:31
I need to programatically trigger text selection mode in a WebView, but the code I have used does not work on Jelly Bean? I have been using the following code but it no longer works on Android 4.1 (Jelly Bean) because WebView.selectText, emulateShiftHeld, and the key dispatch are no longer supported on Jelly Bean. Following code that works on all versions up to ICS is based on: How to enable the default highlight menus in android webview? public void selectAndCopyText() { try { // ICS WebView.class.getMethod("selectText").invoke(this); } catch (Exception e1) { try { Method m = WebView.class

Select a music file to play with MediaPlayer

☆樱花仙子☆ 提交于 2019-11-30 19:09:54
问题 I'm new in android programming and now i get a problem with my app. I intend to code a MediaPlayer application with feature: select a file from storage using intent then start playing that file. I use "MediaPlayer.create(context, uri)" method but currently i got error protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //openFile(); Button openFile = (Button) this.findViewById(R.id.ButtonOpen); openFile

Gson 2.2.2 causing a stackoverflow on 4.2.1 only

僤鯓⒐⒋嵵緔 提交于 2019-11-30 18:40:41
I am developing an app for android which downloads points of interest from a server using JSON strings. Everything was working fine but since I have started testing on 4.2.1, I have been getting the following error: 01-28 15:32:14.167: E/AndroidRuntime(31174): FATAL EXCEPTION: AsyncTask #1 01-28 15:32:14.167: E/AndroidRuntime(31174): java.lang.RuntimeException: An error occured while executing doInBackground() 01-28 15:32:14.167: E/AndroidRuntime(31174): at android.os.AsyncTask$3.done(AsyncTask.java:299) 01-28 15:32:14.167: E/AndroidRuntime(31174): at java.util.concurrent.FutureTask

Accessing assets of other Android app on Jelly Bean

和自甴很熟 提交于 2019-11-30 15:55:28
问题 I have a pair of Android apps. One is a free 'reader' app and the other is a paid for 'Data' app with a text file in a sub directory of its assets. The reader app uses the following code to access the data app's text file: Intent myIntent = new Intent("myintent"); List<ResolveInfo> dataPacks = packageManager.queryIntentActivities(myIntent, 0); String packageName = dataPacks.get(0).activityInfo.packageName Resources res = packageManager.getResourcesForApplication(packageName); AssetManager

Accessing assets of other Android app on Jelly Bean

好久不见. 提交于 2019-11-30 15:31:55
I have a pair of Android apps. One is a free 'reader' app and the other is a paid for 'Data' app with a text file in a sub directory of its assets. The reader app uses the following code to access the data app's text file: Intent myIntent = new Intent("myintent"); List<ResolveInfo> dataPacks = packageManager.queryIntentActivities(myIntent, 0); String packageName = dataPacks.get(0).activityInfo.packageName Resources res = packageManager.getResourcesForApplication(packageName); AssetManager assets = res.getAssets(); String[] dataFiles = assets.list("Data"); This has been working fine but apps