android-emulator

define Action bar overflow items

吃可爱长大的小学妹 提交于 2019-12-05 08:48:57
If I define the following items for my action bar: res/menu/action_menu.xml : <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:title="label"/> <item android:title="label1"/> <item android:title="label2"/> <item android:title="label3"/> <item android:title="label4"/> </menu> In my Activity: @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.action_menu, menu); return true; } Is there anyway to allow me define certain items move to action overflow part ?

How to restrict an APK not to get installed in Android Emulator/Simulator but in real device?

拥有回忆 提交于 2019-12-05 08:14:32
Hope you know that an application which is installed in an android device can be backed up and stored as an installable file(as an APK file) with the help of apps like Astro file manager. The same apk can be installed in the android simulator as well. So there is a chance that other can easily dig into the installed app's files like DB, shared preference, etc.. Is there any way to permit installing only in real device and not in simulators??? I know that if it is ROOTED device, we can access the app's data same like in the simulator. Even though i would like to know whether we can restrict

Unsupported virtual sd card in android emulator

本秂侑毒 提交于 2019-12-05 08:04:31
I don't know why the virtual SD card isn't working anymore. Someone got any leads or why could that happen? I'm using Android emulator with API 26 (Android O) To solve this problem use sd card size >= 512 MB in emulator . Android studio 2.3.3 created 100 MB sd card by default. The commit on the AOSP source code for Android Oreo states that a 512-megabyte file is created and mounted as a virtual disk for the system to use as an SD card. I faced the same problem too. Like others have mentioned, AVDs which have SD cards that are less than 512 MB do not detect the card after the upgrade to Android

cocos2d-x v 2.0.4 FATAL EXCEPTION GLThread when run on Android emulator

你。 提交于 2019-12-05 07:33:00
I create cocos2d-x app I'm using cocos2d-2.0-x-2.0.4 I've got error when trying to run app from Eclipse on Android emulator. 12-04 08:03:13.792: E/AndroidRuntime(1081): FATAL EXCEPTION: GLThread 105 12-04 08:03:13.792: E/AndroidRuntime(1081): java.lang.IllegalArgumentException: No config chosen 12-04 08:03:13.792: E/AndroidRuntime(1081): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:874) 12-04 08:03:13.792: E/AndroidRuntime(1081): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024) 12-04 08:03:13.792: E/AndroidRuntime(1081): at android

How to bind any image with the captured Camera image before saving it? [duplicate]

雨燕双飞 提交于 2019-12-05 07:28:34
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Android: How to overlay-a-bitmap/draw-over a bitmap? I have implement the android Camera functionality in amy application. Now i want to combine any transperent image with that captured camera Image before to save that image in to gallery, then how it can be done ?? Any code will be realy appereciated. Thanks. Edit: I am using this Code to captured and Save the Image So, How shoud i have to Implement Such things

Android Studio 3.0.1 Shows Emulator: Process finished with exit code 1

跟風遠走 提交于 2019-12-05 07:20:49
I'm new to Linux. Recently I installed Android Studio 3.0.1. When I try to create new AVD that time it shows me this error. Please, someone, help me to fix it. 7:02 PM Emulator: emulator: ERROR: Unknown AVD name [New_Device_API_26], use -list-avds to see valid list. 7:02 PM Emulator: Process finished with exit code 1 7:10 PM Emulator: emulator: ERROR: Unknown AVD name [New_Device_API_26], use -list-avds to see valid list. 7:10 PM Emulator: Process finished with exit code 1 7:10 PM Emulator: emulator: ERROR: Unknown AVD name [New_Device_API_26], use -list-avds to see valid list. 7:10 PM

Insert Contact to SIM from Android

丶灬走出姿态 提交于 2019-12-05 07:19:52
I have an issue while I try to copy a contact which exists in the android contacts application to the SIM card. Following is the code: ContentValues cv = new ContentValues(); cv.put("tag", cName); cv.put("number", cNumber); Uri uri = context.getContentResolver().insert(SIM_CONTENT_URI, cv); Log.d(TAG_LOG, "URI is : " + uri); I have values inside cName and cNumber variables. But when I print the log to see the value of the uri variable: it is null. Can anyone please let me know if I have gone wrong somewhere in the code above for inserting to SIM? I just have implemented a simple code to insert

Android Studio Running app is too late

Deadly 提交于 2019-12-05 06:54:44
问题 i have a problem when i am trying to run my app with a emulator that its 2 hours and it didn't started until now and this message was printed emulator: device fd:892 HAXM is not working and emulator runs in emulation mode emulator: The memory needed by this AVD exceeds the max specified in your HAXM configuration. emulator: AVD RAM size = 1536 MB emulator: HAXM max RAM size = 512 MB emulator: You might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode.

Keyboard stopped working on Intel x86 Android emulator after upgrading to ADT 20

℡╲_俬逩灬. 提交于 2019-12-05 06:27:59
I mean I can't type from my laptop keyboard into android emulator anymore. Virtual and on-screen keyboards are working fine. I had the same problem after upgrading to Tools version 20. I had to Edit the AVD to add an option as follows: From Eclipse, Go to AVD Mananger. Select the particular AVD and click on Edit Go to the Hardware section, click on New. Select the Property Name : Keyboard Support By default, it is added with a value of 'no'. Just click on the value column and change it to 'yes'. Click on Edit AVD again. This will add a property hw.keyboard=yes in config.ini file for the AVD.

How to do a case-insensitive string replacement

倖福魔咒の 提交于 2019-12-05 06:16:59
Hi friends I'm creating an app. I want to find a particular word in an ArrayList and I have to replace it with another word. I used the code below. It works case sensitive, but I'd like to get it working case insensitive. FillintheBlank.class: public class FillintheBlank extends Activity { static ArrayList<String> multiword=new ArrayList<String>(); static ArrayList<String> multimeaning=new ArrayList<String>(); public void setNoTitle() { requestWindowFeature(Window.FEATURE_NO_TITLE); } float screenHeight,screenWidth,screendensity; @Override protected void onCreate(Bundle savedInstanceState) {