Android :: Way To Test Rotating Device / Emulator?
Jun 9, 2009
I'm using the 1.5 SDK. I read in 1.0 that rotating the device would cause onCreate() to be called in our apps (possibly recreating the entire app?). Is there a way to test rotating the device in the emulator? I just want to see what happens, I don't have a device to test this. Will the behavior be the same for 1.5 as it was in 1.0?
View 3 Replies
Sep 24, 2010
I'm writing an Android JUnit test and want to copy/reset a test fixture file (it's an SQLite database file.) If I were within the main application, I know I could just place the file in the assets directory and use getResources().getAssets().open(sourceFile).However, this API appears to be unavailable from the ActivityInstrumentationTestCase2 class.Is there an easy way to copy a file over from the testing PC, or should I just keep a fresh copy of a test fixture on the device and copy it over a temporary file?
View 2 Replies
View Related
Aug 13, 2010
My first activity is creating a second activity within its onCreate:
CODE:............
The second activity has EditText views for the username and password along with submit and cancel buttons. When either button is pushed, the text from username and password is sent back to activity one (via onActivityResult), which connects to a server to see if the username is available. While connecting to the server showDialog is used to show a ProgressDialog. When the server responds, the ProgressDialog is dismissed and an AlertDialog is shown. This works fine as long as the device is not rotated.
Here's the problem: if the user rotates the device from within the second activity and pushes submit, the first activity re-invokes its onCreate, which ends up launching the second activity again since the username and password are still null.
Does anyone have any suggestions to get around this?
Is there a method that could be used to pass data from activity-2 to activity-1's onCreate? I wouldn't want to use a database in this case, as that seems like overkill.
I've thought about containing the server communication and dialogs to activity 2, but then I'd have duplicate server code in activity 1 and activity 2 (activity 1 connects to the server for other things too). Another issue I'd have with this approach is that the user has an option to cancel creating the password, in which case I want the app to finish. If I called finish from activity 2, activity 1 would appear and I don't want that to show unless a username and password have been created.
It just occurred to me - if I could replace activity 2 with a dialog it might make things simpler. The dialog view needs to have 2 EditTexts and 2 buttons. Can I create something like this and use the showDialog method?
View 1 Replies
View Related
Mar 4, 2010
I want to test a compass app on the emulator. Is this possible or do i have to use a real device. Also I do not want to use gps.
View 2 Replies
View Related
Feb 10, 2010
My web application runs in localhost server. In my emulator the URL is http://localhost:8080/myaction
Is it possible to retrieve the informaion from the server?
View 1 Replies
View Related
Jan 27, 2010
Was wondering if there's any way to test Gestures (eg: Fling) on the Emulator.
I saw a project on google code that lets people simulate the accelerometer, but none of Gestures.
View 2 Replies
View Related
May 25, 2010
Is it possible to test the new Backup api in the emulator?
I wrote a simple BackupAgent, but it never seems to be called...
http://developer.android.com/reference/android/app/backup/package-sum...
View 3 Replies
View Related
May 1, 2010
I make a simple call to Vibrator.vibrate(long time);, but in the logcat I don't see anything related to it. How can I test if the vibration works using the emulator?
View 3 Replies
View Related
Nov 27, 2009
Has anyone successfully compiled the android kernel and tested it in the Android emulator, and if so is there anything that special that needs to be done? Documentation for the SDK is excellent, however documentation for compiling the kernel and setting up a custom machine in the emulator has been hard for me to find.
View 5 Replies
View Related
Oct 7, 2010
I'm trying to use multi-touch in an Android 2.0 app. How can I simulate this with an emulator using Eclipse? I can only seem to get the mouse to do one touch at a time.
View 2 Replies
View Related
Mar 23, 2010
I am developing an application which requires to add Calendar event. I have written the code for inserting event to the calendar. But whenever i run my application, everytime i get error that "Fail to find provider info for Calendar" and it also throws me NullPointerException error. So, what it means and i found that emulator doesn't provide Calendar application in-built.I think if the Android Emulator doesn't have Calender API, so, naturally, it will not have any database URI in the emulator whereas the Contact has URI --"content://contacts/people". I also found the URI for Calendar as "content://calendar/calendars" but it doesn't work and it means that it gives me error cause of missing Calendar application.Can anybody clarify me, with suggestions regarding Calendar Event?
View 4 Replies
View Related
Oct 17, 2010
I have made a pedometer application. i wanted to know how to test this application on an emulator as i am not having an android device
View 1 Replies
View Related
Jan 17, 2010
I recently discovered that the Android 2.0 SDK supports multitouch through new functions in the MotionEvent class. You can specify a pointer index when retrieving touch properties, and in cases where multiple fingers are on the screen there should be multiple pointers provided.
Unfortunately, I only have a G1 to test on and it's running Android 1.5 and not 2.0.
Is there any way to test multitouch without a 2.0 device? In the iPhone simulator, you can hold down option and shift option to perform two fingered pinch and two fingered drag, respectively. Is there any similar functionality in the Android emulator? Is it something I should expect to see in the future, or should I just suck it up and buy a new test phone?
View 5 Replies
View Related
Feb 2, 2010
I wanted to test a sample Bluetooth application in android emulator, then i come to know that the android emulator does not have bluetooth support.I read some thing connect external USB Bluetooth dongle to the Mechine and bridge that dongle to android emulator.But they didn't provided the steps.Now i plugged the USB Bluetooth dongle to my System and i do not how to bridge that with android emulator.Is there any way to do this?.
View 5 Replies
View Related
Jun 28, 2010
I don't have an Android phone now, but I really want to test Multi-touch or Shake feature. How can I do this on Emulator?
View 1 Replies
View Related
Jul 6, 2010
I am playing around with C2DM service. What I am concerned about is that I cannot test my device-side application from Android 2.2 emulator. The application was built more or less according to http://code.google.com/android/c2dm/index.html doc, but when register intent is sent from application, Logcat shows this: Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) }: not found I also tried to run chrometophone and jumpnote applications and the result is the same when registring device. Any ideas? Is it possible to test C2DM service from Android emulator?
View 9 Replies
View Related
Oct 26, 2010
Let's say I want to perform a quick HTTP post to a website within my android app. If I were to set up the http client and send the post all in the onCreate method of the main screen (inside the UI thread) just for testing purposes, what would I use to quickly see what the response is to the post? I tried something quick and dirty below inside the onCreate method when the app first opens and nothing really happens, is there something more I need to do/obviously my toast idea is just bad.
HttpClient httpClient = new DefaultHttpClient();
HttpPost post = new HttpPost("http://forecast.weather.gov/zipcity.php?inputstring=04419");
HttpResponse httpResp;
try {
httpResp = httpClient.execute(post);
StatusLine status = httpResp.getStatusLine();
Toast.makeText(getApplicationContext(), (CharSequence) status, Toast.LENGTH_SHORT).show();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();}
View 1 Replies
View Related
Nov 4, 2010
Problem Event Name: APPCRASH
Application Name: emulator.exe
Application Version: 0.0.0.0
Application Timestamp: 4c79ab54
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7600.16559
Fault Module Timestamp: 4ba9b21e
Exception Code: c0000005...................
i am running in eclipse gallileo for the 2.0 sdk, though i have tried others
View 1 Replies
View Related
Dec 1, 2009
My application makes use of cell tower info, specifically the CID for GSM. I'm able to test this on my G1, but I don't have access to a Droid phone to test the same functionality, baseStationId, for CDMA. How can I test this in the emulator so that I can support Droid phones?
View 2 Replies
View Related
May 13, 2010
Can multitouch events be tested on Android Emulator ? Or is there any way to test this without actual device ? I am using 2.0 sdk and want to test zoom-in zoom-out on by two fingers.
Is there a way out ?
View 4 Replies
View Related
Apr 16, 2009
How can I test the video recording functionality in the new emulator in 1.5 android preview SDK?
View 4 Replies
View Related
Jun 6, 2010
I have developed and tested my app on the emulator, and now want to install it on my HTC device. the apk installs successfully, however my database is not going with it. I have created my database using sqliteman browser b/c I have to insert a bulk data before the app starts. I have four tables in my db and call each in different activities and created all on the sqliteman. after the data is inserted I pull back the db onto the data folder of the emulator. it works perfect on the emulator but failed on the device. when I try to pull my db on the real device, it shows access denied problem
View 2 Replies
View Related
Jun 24, 2010
i am working on android CTS test, i am getting API check time out error whenever i start test plan CTS, i followed the below steps for CTS test and also i mentioned my doubts.
CTS test steps :
1. Please download and install the Android 1.6 SDK on your machine.
2. Your phone should be running a user build (Android 1.6 and later) from source.android.com
3. Please refer to this link on the Android developer site and set up your device accordingly.
4. Make sure that your device has been flashed with a user build (Android 1.6 and later) before you run CTS.
5. You need to download the TTS files via Settings > Speech synthesis > Install voice data before running CTS tests. (Note that this assumes you have Android Market installed on the device, if not you will need to install the files manually via adb)
6. It is advisable to log in to the device with a test Google account, not an account that you actually use.
7. Make sure the device has a SD card plugged in and the card is empty. Warning: CTS may modify/erase data on the SD card plugged in to the device.
8. Do a factory data reset on the device (Settings > SD Card & phone storage > Factory data reset). Warning: This will erase all user data from the phone.
9. Make sure no lock pattern is set on the device (Settings > Security & location > Require Pattern should be unchecked.Google Confidential
10. Make sure the "Screen Timeout" is set to "Never Timeout" (Settings > Sound & Display > Screen Timeout should be set to "Never Timeout".
11. Make sure the "Stay Awake" development option is checked (Settings > Applications > Development > Stay awake).
12. Make sure Settings > Application > Development > Allow mock locations is set to true.
13. Make sure the device is at the home screen at the start of CTS (Press the home button).
14. While a device is running tests, it must not be used for any other tasks.
15. Do not press any keys on the device while CTS is running. Pressing keys or touching the screen of a test device will interfere with the running tests and may lead to test failures.
Doubts :
1) is it necessary to follow all the steps ?
2) for step 5, i copied the voice data to the SD card and if i follow step 8 it will erase all contents of SD card so how can i follow both step 5 and step 8 at a time...?
error message while doing CTS test on Device :
pvteam@pvteam-desktop:~/Desktop/android-cts/tools$ ./startcts
Android CTS version 2.1_pre_r1
Device(HT9A4LV00787) connected
cts_host > start --plan CTS
cts_host > There are 3 existing session(s) for plan CTS.
[code]...
the Device restart took place three times then i stoped the CTS test.
View 5 Replies
View Related
Jan 9, 2010
After following some instructions on Diego Torres blog I am able to test my classes using the regular Eclipse JUnit test-runner, however I also want to be able to run my unit tests from within the emulated android environment. For now this should make no real difference since the classes I am working on do very basic numerical or networking tasks, but obviously anything which involves the UI or Android API specific functions can only ever be tested on the emulator.
I set up a new run configuration of type AndroidJUnitTest wich uses the ndroid.test.InstrumentationTestRunner, however whenever I fire up the test I get the following error in the console:
[2010-01-09 00:45:23 - Pal1]Uploading Pal1.apk onto device 'emulator-5556'....................
View 1 Replies
View Related
Jul 9, 2010
We are currently working on an instrumentation test suite which runs on our build server, but while the tests pass on a dev machine using a normal Android emulator, the builds fail on the build server since there we only run a headless emulator with the -no-window flag.The failure occurs when trying to invoke the InstrumentationTestCase.sendKeys() method to programatically open the options menu.We also tried to let the instrumentation test app and the app under test share the same Linux user ID using android:sharedUserId and run in the same process (android:process -- we weren't sure if that was already the case), but still no luck. Does this mean it's currently impossible to run instrumentations which contain key events on a headless emulator, or are we missing something?
View 2 Replies
View Related
Jun 6, 2009
I've just start to study Android. But I have no linux PC & Android phone. I just using Emulator on Windows OS.
Now, I wanna try to use Sql lite & Contents provider on Android. Can I test sample code on Emulator without Linux? Some people say that I should build Android on Linux ad make Image for Emulator. Then test on Emulator on windows. Is it right? or Can emulator works alone?
View 3 Replies
View Related
Jul 13, 2012
I guess it is possible to test custom roms on emulator. But is it possible to test every custom rom on emulator ? I want to modify ROMs and test it on the PC first before flashing because I m not very good at ROM mods atm. Is there some other way also to test custom roms on PC.
View 1 Replies
View Related
Jan 18, 2010
Is there a way to test the application on the real device without publishing to android market?
View 2 Replies
View Related
Oct 29, 2010
I'm trying to test a test app I developed on android 2.2 sdk on my htc phone with Froyo on it (2.2). In the emulator it works fine, when I export as unsigned app and try to install on the phone, it doesn't allow me, just telling me 'application non installed'. The phone has the settings to accept installation of non android application, so I'm not sure why I can't test on it. Is it because it's not signed?
View 2 Replies
View Related
Nov 15, 2010
I would like to start doing some Android development, and would like a cheap device to deploy apps to, just for testing and demo purposes. Is it possible to deploy apps to, for instance, an Archos 28? I don't know much about Android development yet, and haven't found a good answer to this question elsewhere.
View 1 Replies
View Related