android-emulator

Android:Got NumberFormatExxception while getting data from EditText field

别等时光非礼了梦想. 提交于 2019-12-12 06:51:01
问题 java.lang.RuntimeException: Unable to start activity ComponentInfo { com.project/com.project.simple} : java.lang.NumberFormatException EditText et1,et2,et3; Button b1, b2; Float two,three,four; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.can); et1 = (EditText) findViewById(R.id.editText1); two = Float.valueOf(et1.getText().toString()); et2 = (EditText) findViewById(R.id.editText2)

Android Wear Round Emulator inflating Square Layout

一笑奈何 提交于 2019-12-12 06:04:48
问题 I first want to say that I know there are already questions like this one on here, but none of them fixed this issue I am using the Round Android Wear Emulator (Android 5.0.1 and x86) on Ubuntu. The screen appears round, and all other features on the emulator (set watch face, cards) appear as they would on a round watch. However in my app, I am using a WatchViewStub, and the round emulator is inflating the square layout despite me specifying the following in the layout: app:rectLayout="

Error with HTTP POST Connection

巧了我就是萌 提交于 2019-12-12 05:49:21
问题 I am using a class to use HTTP POST & getting data from a data base via php/json and converting it to a string. The problem is that I am getting "Error in http connection android.os.NetworkOnMainThreadException" in LogCat. I'm testing this on the emulator and I am using the correct port address. I know this because the port works fine in other parts of the application(loading HTML from Localhost). If I run the php file in a desktop browser, it runs fine. I also know that the permissions are

why i cannot create android virtual device?

拟墨画扇 提交于 2019-12-12 05:38:20
问题 this issue is a bit similar to Cannot Create Android Virtual Device, the difference is that i am trying to create AVD on windows rather than ubuntu, one more difference is that i can create android 2.2 and 2.3 AVD without error, but failed to create ADV 4.x , why? i have sdk and api installed for 4.x, anyhow . [2012-09-26 13:01:40 - SDK Manager] Warning: Ignoring add-on 'google_apis-10_r02': Unable to find base platform with API level '10' [2012-09-26 13:01:40 - SDK Manager] Warning: Ignoring

Android - Get Current location of user on emulator

微笑、不失礼 提交于 2019-12-12 05:18:06
问题 Is it possible to show our current posotion on Android emulator? If yes how? Thank You. 回答1: You need to set the latitude and longitude in case of emulator because emulator do not have gps detection hardrware to get current location. telnet localhost 5554 geo fix <longitude value> <latitude value> For ex: geo fix 68.54546 37.5117579 回答2: You can fake GPS location data on emulator using DDMS which is explained here: http://developer.android.com/tools/debugging/ddms.html#ops-location and here:

How to update time every second in Java emulator? [duplicate]

时间秒杀一切 提交于 2019-12-12 04:52:51
问题 This question already has answers here : Update time every second (3 answers) Closed 5 years ago . I have been working on a code for an app but I cannot get the time to update in the emulator when I run the code. The code works in the compiler but not the emulator. Any helpful suggestions would be greatly appreciated. The timer is a countdown to Christmas day. Here is my code: Calendar today = Calendar.getInstance(); Calendar thatDay = Calendar.getInstance(); thatDay.set(Calendar.DAY_OF_MONTH

Android Building Your First App Basics

爷,独闯天下 提交于 2019-12-12 04:38:35
问题 I'm having a difficult time getting the results that should be displayed as described in the second step of the First App project on the android developer website: developer.android.com/training/basics/firstapp/starting-activity.html#receivetheintent I've created the first intent and copied all other code however upon running the project I receive a blank android screen with no input elements. Here's what the emulator looks like: http://s1278.beta.photobucket.com/user/cetmrw791346/media/1

Background Audio for a Call in Progress - Possible?

放肆的年华 提交于 2019-12-12 04:36:51
问题 I am writing a android app which is supposed to play back a audio file when a call is in progress coming from a specific number .. I tried many approaches.. but all went in vein Separate Thread Listener on Telephone service starting a service in parallel can any one please help me how to proceed regarding this ? Update : I am able to play a mp3 file on call recieve and i am able to play it load on speaker.. but how ever loud i play the calling party is not able to listen to it.... is there

android studio - emulator doesn't work and genymotion doesn't get recognized

十年热恋 提交于 2019-12-12 04:34:40
问题 I'm building an app in Android Studio (beta) 0.8.9, though I can't seem to get emulators running. I've made a Nexus 4 and 5 emulator through the options, but I can't seem to get them started. It shows this in the Run App tab. Waiting for device. "C:\Program Files (x86)\Android\android-studio\sdk\tools\emulator.exe" -avd smallEmulator -netspeed full -netdelay none So either it's not starting up, or I'm just an impatient SOB. I've also downloaded Genymotion and started up an emulator through

Why isn't my Android app working when I test it on a real device?

送分小仙女□ 提交于 2019-12-12 04:19:08
问题 I'm building an Android app with Ionic Framework, and am trying to run it on a real device with USB debugging, like in these tutorials: http://www.neilberry.com/how-to-run-your-ionic-app-on-real-devices/?s=2015-08-24-how-to-run-your-ionic-app-on-real-devices http://junerockwell.com/how-to-run-ionic-on-real-devices/ Step-1 $ ionic platform add android $ ionic build android After adding the Android platform and building an APK with the above commands, it works correctly with no error. So, I try