android-emulator

Get file name and extension of any file in android

て烟熏妆下的殇ゞ 提交于 2020-01-30 04:04:51
问题 The issue I have, is that i can't extract the file exetension from files choosen on a smartphone with Android 9. The problem doesn't appear on devices with Android 8 or less. When the user has choosen any kind of file the onActivityResult gets called. In this method I call getPath from FileUtils class, so I can extract the file extension. @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { Uri uri = new Uri.Builder().build(); if (resultCode == RESULT_OK)

Android list view setOnItemClickListener not working

馋奶兔 提交于 2020-01-29 13:23:53
问题 I want to hide the edit text and button field initially in list view and show that edit text and button for a particular raw in list view when that raw is clicked.So I tried to set the height to 0 in layout xml and then set it to some other value when user clicks on a raw, but it is not working I think my list view click event is not working. In the Android layout that I have list view there are Image view as a button, edit text field and list view also. Like follows <RelativeLayout xmlns

Android list view setOnItemClickListener not working

不问归期 提交于 2020-01-29 13:22:45
问题 I want to hide the edit text and button field initially in list view and show that edit text and button for a particular raw in list view when that raw is clicked.So I tried to set the height to 0 in layout xml and then set it to some other value when user clicks on a raw, but it is not working I think my list view click event is not working. In the Android layout that I have list view there are Image view as a button, edit text field and list view also. Like follows <RelativeLayout xmlns

“emulator: warning: opening audio input failed” displayed in the console while AVD is launching

给你一囗甜甜゛ 提交于 2020-01-28 10:30:29
问题 "emulator: warning: opening audio input failed" The above message is displayed in the console everytime an AVD is launching , and then no sound is coming out from the emulator. I have tried to delete the AVD and have created a new one again and again, but it didn't help with the problem. I have also searched on Google for many time, but I find nothing useful. It is really interesting that people tend to suggest to just ignore the problem because the AVD is still working fine without sound.

RuntimeException: Unable to instantiate application

浪子不回头ぞ 提交于 2020-01-28 09:40:07
问题 When I run my application, everytime I am getting the below exception in my logcat: 04-14 09:29:53.965: W/dalvikvm(1020): threadid=1: thread exiting with uncaught exception (group=0x409c01f8) 04-14 09:29:53.985: E/AndroidRuntime(1020): FATAL EXCEPTION: main 04-14 09:29:53.985: E/AndroidRuntime(1020): java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.NullPointerException 04-14 09:29:53.985: E/AndroidRuntime(1020): at android.app.LoadedApk

RuntimeException: Unable to instantiate application

二次信任 提交于 2020-01-28 09:38:25
问题 When I run my application, everytime I am getting the below exception in my logcat: 04-14 09:29:53.965: W/dalvikvm(1020): threadid=1: thread exiting with uncaught exception (group=0x409c01f8) 04-14 09:29:53.985: E/AndroidRuntime(1020): FATAL EXCEPTION: main 04-14 09:29:53.985: E/AndroidRuntime(1020): java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.NullPointerException 04-14 09:29:53.985: E/AndroidRuntime(1020): at android.app.LoadedApk

Launching app and executing some test cases with Robotium

放肆的年华 提交于 2020-01-25 11:35:39
问题 I am new to Robotium and tried to execute following code to launch an app and perform some functions. An example would be, launch messaging app on android emulator and send a text message "Hi" to a user "test". package com.example.android.test; import com.example.android.NewUserActivity; import com.jayway.android.robotium.solo.Solo; import android.test.ActivityInstrumentationTestCase2; public class NewUserActivityTest extends ActivityInstrumentationTestCase2<NewUserActivity> { private Solo

Launching app and executing some test cases with Robotium

此生再无相见时 提交于 2020-01-25 11:34:28
问题 I am new to Robotium and tried to execute following code to launch an app and perform some functions. An example would be, launch messaging app on android emulator and send a text message "Hi" to a user "test". package com.example.android.test; import com.example.android.NewUserActivity; import com.jayway.android.robotium.solo.Solo; import android.test.ActivityInstrumentationTestCase2; public class NewUserActivityTest extends ActivityInstrumentationTestCase2<NewUserActivity> { private Solo

Geo Fix not working in Android SDK 2.2

戏子无情 提交于 2020-01-24 18:15:08
问题 I am trying to test an Android application. I need to send mock location to test this. I have registered for requestlocation updates(..)method (as follows) locationManager.requestLocationUpdates(bestProvider, 20000, 0, this); Tried sending mock locations through Eclipse DDMS tab as well as telnet-ing from command prompt. telnet commands as follows telnet localhost 5554 geo fix 1 1 The application works fine (i.e. receives the location changed event) if I run using AVD Emulator using 1.6 to 2

Geo Fix not working in Android SDK 2.2

混江龙づ霸主 提交于 2020-01-24 18:14:25
问题 I am trying to test an Android application. I need to send mock location to test this. I have registered for requestlocation updates(..)method (as follows) locationManager.requestLocationUpdates(bestProvider, 20000, 0, this); Tried sending mock locations through Eclipse DDMS tab as well as telnet-ing from command prompt. telnet commands as follows telnet localhost 5554 geo fix 1 1 The application works fine (i.e. receives the location changed event) if I run using AVD Emulator using 1.6 to 2