android-emulator

showing dialog while loading layout by setContentView in background

走远了吗. 提交于 2019-12-23 00:48:31
问题 I am using below code where , i want to show dialog in front and loading content in background but not able to do the same . Please advise. dialog = ProgressDialog.show(this, "", "Loading. Please wait...", true); runOnUiThread(new Runnable(){ public void run() { setContentView(R.layout.main_layout); dialog.dismiss(); } }); 回答1: I got solution by reading below link and implemented code as below: http://developer.android.com/guide/appendix/faq/commontasks.html#threading int glb=0,glbtotal=3;

Impossible to use ART on android emulator

烂漫一生 提交于 2019-12-22 18:49:23
问题 I just wanted to try ART of android 4.4 on my emulator. What I did was create an emulator with selecting device as "Nexus 7" and target as "Android 4.4" and RAM "512". Then I started emulator and it loaded. Then I went to Developer Options and selected runtime as ART. After that setting emulator started to reboot and kept on booting screen for a long time(around 1hr) and couldn't finish launching. Can anybody explain me the reason for this issue. 回答1: There is a bug in the emulator image. See

Android Emulator running into loading problems

旧街凉风 提交于 2019-12-22 17:37:15
问题 Up until 2 days ago, everything has been working fine and perfect. I was using the Nexus 5x and 4 emulators with no issues apart from a few crashes on the 5x due to virtual memory. Now everytime I try to load any of my emulators, I am greeted with a "GPU driver issue" error box and the emulator I'm working on loads but is very laggy and virtual unusable and the UI of the app I'm testing keeps bugging out. I tried updating my driver, in fact this is the error message I got after updating to

How to create an Android AVD for Pixel device, from command line?

心已入冬 提交于 2019-12-22 17:05:25
问题 I'd like to use only the command-line tools to create a new virtual Android device. I want to create a virtual Pixel. I'm able to create a new AVD but unfortunately I can't figure out how to correctly set the skin and the correct device screen resolution. This is what I've tried thus far: C:\Users\*******\AppData\Local\Android\Sdk\tools>bin\avdmanager create avd -n MyPixel2 -k "system-images;android-25;google_apis;x86" --device 17 When I run that AVD via the emulator , I see a low-res device

Android TCP communication over the internet(not LAN).

 ̄綄美尐妖づ 提交于 2019-12-22 16:37:13
问题 I'm creating an app to establish communication between two android mobiles through the internet using TCP sockets. So, I'll primarily be using ip addresses of the two mobiles with my fancy app port no. Is this possible? To create custom TCP ports and communicate over the internet like in a LAN? So far i'm able to successfully communicate between two emulators in a LAN . But it's not possible to do the same thorugh the internet in case of emultors cos usually the host machine is behind a

Android TCP communication over the internet(not LAN).

南笙酒味 提交于 2019-12-22 16:37:13
问题 I'm creating an app to establish communication between two android mobiles through the internet using TCP sockets. So, I'll primarily be using ip addresses of the two mobiles with my fancy app port no. Is this possible? To create custom TCP ports and communicate over the internet like in a LAN? So far i'm able to successfully communicate between two emulators in a LAN . But it's not possible to do the same thorugh the internet in case of emultors cos usually the host machine is behind a

How my android app will run on multiple screen resolution devices?

妖精的绣舞 提交于 2019-12-22 14:58:47
问题 I have developed an android application and run it on an HVGA emulator. It's running successfully on any HVGA device i.e. mdpi. But if I try to run on small screen resolution devices i.e QVGA then my buttons are looking as if they go down and dont fit onto the small screen... So how can I run my android application on multiple screen resolution successfully? 回答1: follow these instructions create a folder in yourAppFolder/res/ named layout-small (*more on this subject later) insert in this

Emulate an incoming call on physical device via PC (Eclipse)

微笑、不失礼 提交于 2019-12-22 12:54:07
问题 I am working on an android project, and I want to be able to test my app on a physical device. The only way I can test my app is to receive incoming text messages and calls. I know I can simulate texts and calls on the emulator either via telnet or via DDMS in Eclipse. Is this possible to do the same thing without having to keep texting myself or calling myself from another device as its going to cost. I'd much prefer to do it on a device as it is much quicker than on the emulator. Thanks for

lastKnownLocation is always returning null when gps is off

喜夏-厌秋 提交于 2019-12-22 12:19:52
问题 I am using Google Service API , LocationServices.FusedLocationApi to find user's current and then updated Location. I have tested on emulator as well as on actual device and I have found that if I turn off GPS LocationServices.FusedLocationApi.getLastLocation() always returns null, however I get a valid value if I turn on the GPS. Here is the code which I am using: private GoogleApiClient mGoogleApiClient; private Location mLastKnownLocation; mLastKnownLocation = LocationServices

emulator: ERROR: A snapshot operation for 'Nexus_4_API_27' is pending and timeout has expired. Exiting

橙三吉。 提交于 2019-12-22 11:21:55
问题 emulator: ERROR: A snapshot operation for 'Nexus_4_API_27' is pending and timeout has expired. Exiting... I am getting this error when I am trying to open emulator from command-line with this bellow command. anjan@anjan-HP-Laptop-15-bs0xx:~/Android/Sdk/emulator$ ./emulator -avd Nexus_4_API_27 How to solve this problem? 回答1: I had this error in ubuntu and the fix was to change the owner of my $HOME/.android folder into my current user. ie. sudo chown -R [username] $HOME/.android 回答2: Open a