[android-beginners] Sending Unicode characters in unit tests?

2010-01-27 Thread Yasser
Hi,

I have been using InstrumentaionTestCase.sendKeys(String) for typing
text into text boxes in our app.
This works fine for english charaters but now I need to type Chinese
(unicode) characters which does not work. It just skips the unicode
charaters.

If I use the chinese keyboard on Emulator, then also it sends only
english characters and I have to select chinese from the suggestions.
Is there a way to simply type chinese like sendKeys() works for
english?

Thanks
Yasser

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Setting volume to max?

2009-12-09 Thread Yasser
Hi,

I am using the following code to play an audio file.
MediaPlayer mp = new MediaPlayer();
mp.setDataSource("sdcard/Music/test.amr");
mp.prepare();
mp.setVolume(1.0f, 1.0f);
mp.start();

This plays the file but at the same media volume that's set on the
device. mp.setVolume(1.0f, 1.0f) doesn't seem to work.
Since I am testing speech simulation in my app, I need the file to
play at the maximum volume always. Or Is there another way I can set
the media volume to max programatically?

Thanks
Yasser

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Separate AndroidManifest for tests?

2009-10-18 Thread Yasser

Hi,

Currently in our app, the unit tests
(ActivityInstrumentationTestCase2) and the app code both share the
same AndroidManifest.xml.

Is it possible to have a separate manifest file which the tests can
use i.e. having 2 manifest files in a package?

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Simulate speech on emulator?

2009-09-15 Thread Yasser

Thanks Natalya.
I think these are basically for playing audio in the emulator.
My task is to feed audio into the microphone just like a person would
normally speak into it.

On Sep 14, 9:53 pm, Natalya Dobry  wrote:
> On Tue, Sep 15, 2009 at 6:48 AM, Yasser  wrote:
>
> > Hi,
>
> I saw that emulator has the followin options
>  -audio                use specific audio backend
>  -audio-in             use specific audio input backend
>  -audio-out            use specific audio output backend
>
> You can see this from coman line do emulator -help .
>
> Regards.
>
>
>
> > My application records the audio data coming from Microphone, saves it
> > to an AMR file and then sends it to the server for results.
>
> > Is there a way I can change the AudioSource from microphone to some
> > audio file? This way I would be able to simulate the speech
> > functionality. OR in some way if I can feed audio file into the mike it
> > will solve my purpose.
>
> > Thanks
> > Yasser- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Simulate speech on emulator?

2009-09-14 Thread Yasser

Hi,

My application records the audio data coming from Microphone, saves it
to an AMR file and then sends it to the server for results.

Is there a way I can change the AudioSource from microphone to some
audio file? This way I would be able to simulate the speech
functionality. OR in some way if I can feed audio into the mike it
will solve my purpose.

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Finishing all the running activities?

2009-09-11 Thread Yasser

Hi,

I want to completely exit my application under test in my test code
(ActivityInstrumentationTestCase) before launching each test.

Since there is no exit in an android app. Is there a way I can
traverse through all the activities of an app so that I call Finish()
on each i.e. finish all the activities that have been started.

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to send uppercase letter using InstrumentationTestCase.sendKeys() ?

2009-09-02 Thread Yasser

Thanks Balwinder. Passing the character after SHIFT_LEFT or
SHIFT_RIGHT did the job.

Isn't there any single method which can be used to send any character
type including special? something like sendKeys("@Abc")

On Sep 2, 8:23 am, "Balwinder Kaur (T-Mobile USA)"  wrote:
> Did you try KEYCODE_SHIFT_LEFT or KEYCODE_SHIFT_RIGHT ?
>
> Balwinder Kaur
> Open Source Development Center
> ·T· · ·Mobile· stick together
>
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Sep 1, 7:57 pm, Yasser  wrote:
>
>
>
> > Hi,
>
> > Using the sendKeys() function I am able to send small letters like
> > sendKeys("A B C").
> > How to send capital letters? I didn't find any key event for them in
> > KeyEvent class.
>
> > Is there any separate event that I have to send prior to sending a
> > letter, in order to make it uppercase?
>
> > Thanks
> > Yasser- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to send uppercase letter using InstrumentationTestCase.sendKeys() ?

2009-09-01 Thread Yasser

Hi,

Using the sendKeys() function I am able to send small letters like
sendKeys("A B C").
How to send capital letters? I didn't find any key event for them in
KeyEvent class.

Is there any separate event that I have to send prior to sending a
letter, in order to make it uppercase?

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Install app on a device?

2009-08-28 Thread Yasser

Thanks a lot Carmen and Michael.
I am not able to find this app, there is no download link on this:
http://androidandme.com/2009/08/news/email-android-apps-with-apkatcher/


On Aug 25, 7:10 pm, Michael Leung  wrote:
> That is good, AppsInstall is only from SD card. Therefore, I need to connect
> phone by USB.
>
> On Wed, Aug 26, 2009 at 11:23 AM, Carmen Delessio
> wrote:
>
>
>
>
>
> >  Apkatcher also works. Send your APK to gmail & open with apkatcher
> > Carmen
>
> > On Aug 25, 2009, at 9:02 PM, Michael Leung 
> > wrote:
>
> >   Yes, that is an  app calls AppsInstaller in the Android Market. It can
> > do the job you want.
> > I have written some instructions about this issue in my blog.
>
> >http://www.itblogs.info/index.php/2009/07/23/install-android-apps-fro...
>
> > On Wed, Aug 26, 2009 at 10:08 AM, Yasser  wrote:
>
> >> Hi,
>
> >> I have HTC Magic and I want to install an android app (APK) on it.
> >> I did the following:
> >> 1. connected phone to PC and then used HTC sync to synchronize with
> >> windows
> >> 2. run adb install command
>
> >> For this I had to install and setup android SDK and HTC sync. Is there
> >> any simple way of installing an app for a normal user, like copying it
> >> to SD card and then selecting it to install?
>
> >> Thanks
> >> Yasser
>
> > --
> > Regards,
> > Michael Leung
> >http://www.itblogs.info
> >http://www.michaelleung.info
>
> --
> Regards,
> Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info- Hide quoted 
> text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Install app on a device?

2009-08-25 Thread Yasser

Hi,

I have HTC Magic and I want to install an android app (APK) on it.
I did the following:
1. connected phone to PC and then used HTC sync to synchronize with
windows
2. run adb install command

For this I had to install and setup android SDK and HTC sync. Is there
any simple way of installing an app for a normal user, like copying it
to SD card and then selecting it to install?

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to unlock screen through code?

2009-07-30 Thread Yasser

I want to unlock the emulator screen before running the tests,
otherwise they are stuck till i manually clcik on menu to unlock the
screen.
tried this but it doesn't do anything.
sendKeys(KeyEvent.KEYCODE_HOME);

Thanks
yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to wait for an activity under test to launch?

2009-07-28 Thread Yasser

Hi,

I am writing tests using the Android test framework
"ActivityInstrumentationTestCase2". In this after launching an
activity I want to wait till it gets fully launched and then proceed.

I tried these but none of them work.
1. getInstrumentation().waitForIdleSync();
2. while (!getActivity().isFinishing())
  Thread.sleep(100);


As a result my test code and the application under test are not in
sync.

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to run instrumentation?

2009-07-24 Thread Yasser

Thanks.

How can I run the instrumentation from within the eclipse IDE?

On Jul 22, 8:50 pm, Brett Chabot  wrote:
> I think you will need to launch it with the following command:
> adb shell am instrument -w /
>
>
>
> On Wed, Jul 22, 2009 at 7:24 PM,Yasser wrote:
>
> > Hi,
>
> > In the instrumentation class description it's given "When running with
> > instrumentation turned on, this class will be instantiated for you
> > before any of the application code"
>
> > I included an instrumentation component in our application/package
> > code and also added it in the manifest file.
> > But when I run the app, the instrumentation is not launched, how to
> > turn it on?
>
> > Thanks
> >Yasser- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to run instrumentation?

2009-07-22 Thread Yasser

Hi,

In the instrumentation class description it's given "When running with
instrumentation turned on, this class will be instantiated for you
before any of the application code"

I included an instrumentation component in our application/package
code and also added it in the manifest file.
But when I run the app, the instrumentation is not launched, how to
turn it on?

Thanks
Yasser

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to test activity integration using the test framework?

2009-07-20 Thread Yasser

Hi,

My application under test has multiple activities.
Example Scenario:
- The first activity has a text box and a search button.
- After entering some text and clicking the search button, the results
are displayed on a separate activity.

With ActivityInstrumentationTestCase for the first activity, I can
launch that but on clicking the search button nothing happens because
that's a different activity.

So I cannot verify the results, How to test such an integration?


Thanks
yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Communication API/mechanism to talk between emulator<->desktop?

2009-07-16 Thread Yasser

Hi,

Is there is any way to send a message from device/emulator to the
desktop. Any API available in Android for this?

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to log test results in a file? - logcat error

2009-07-15 Thread Yasser

Thanks Brett, that helped..

The log messages I write in the test code are not included in the
output using -r option? to get those i need to run logcat.

Also is there a mechanism to send messages from the emulator to
desktop?

-Yasser

On Jul 14, 8:48 pm, Brett Chabot  wrote:
> If this helps, you can run the instrumentation from the command line
> with the "-r" option specified. ie adb shell am instrument -w -r
> .android.test.InstrumentationTestRunner
>
> This will output the test results in a format that is intended to be
> parseable. This is how the Android plugin to Eclipse retrieves the
> test results. There is existing code in python
> (development/testrunner/am_instrument_parser) and java
> (development/tools/ddmlib/.../testrunner) in the Android open source
> project which can parse the instrumentation raw mode results.
>
> Brett.
>
>
>
> On Mon, Jul 13, 2009 at 6:27 PM, Yasser wrote:
>
> > The test results are just visible in the Eclipse IDE. Actually I need
> > to create an automated report after the run parsing the test results.
>
> > On Jul 13, 6:06 pm, Brett Chabot  wrote:
> >> Try piping the output to a file: "adb logcat > "
>
> >> But I'm curious why you need to do this rather than just using Eclipse
> >> with the Android plugins to run your tests and obtain the test
> >> results.
>
> >> Brett.
>
> >> On Mon, Jul 13, 2009 at 4:13 PM, Yasser wrote:
>
> >> > I am getting log messages by logcat command but when I try to use "adb
> >> > logcat -f ", it gives "could't open output file: read-only
> >> > file system" error.
>
> >> > On Jul 13, 2:36 pm, Yasser  wrote:
> >> >> I can't find the resultinglogfile, where does it get created?
>
> >> >> On Jul 13, 1:55 pm, Radzell  wrote:
>
> >> >> > use thelog.i() method
>
> >> >> > On Jul 13, 4:37 pm, Yasser  wrote:
>
> >> >> > > Hi,
>
> >> >> > > I am using assert methods of JUnit's Assert class on passing/failing
> >> >> > > of a test case.
>
> >> >> > > How can Ilogthese messages in a file on the desktop so that I can
> >> >> > > parse them to know the testresults?
>
> >> >> > > Thanks
> >> >> > > Yasser- Hide quoted text -
>
> >> >> > - Show quoted text -- Hide quoted text -
>
> >> >> - Show quoted text -- Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to log test results in a file? - logcat error

2009-07-13 Thread Yasser

The test results are just visible in the Eclipse IDE. Actually I need
to create an automated report after the run parsing the test results.

On Jul 13, 6:06 pm, Brett Chabot  wrote:
> Try piping the output to a file: "adb logcat > "
>
> But I'm curious why you need to do this rather than just using Eclipse
> with the Android plugins to run your tests and obtain the test
> results.
>
> Brett.
>
>
>
> On Mon, Jul 13, 2009 at 4:13 PM, Yasser wrote:
>
> > I am getting log messages by logcat command but when I try to use "adb
> > logcat -f ", it gives "could't open output file: read-only
> > file system" error.
>
> > On Jul 13, 2:36 pm, Yasser  wrote:
> >> I can't find the resultinglogfile, where does it get created?
>
> >> On Jul 13, 1:55 pm, Radzell  wrote:
>
> >> > use thelog.i() method
>
> >> > On Jul 13, 4:37 pm, Yasser  wrote:
>
> >> > > Hi,
>
> >> > > I am using assert methods of JUnit's Assert class on passing/failing
> >> > > of a test case.
>
> >> > > How can Ilogthese messages in a file on the desktop so that I can
> >> > > parse them to know the testresults?
>
> >> > > Thanks
> >> > > Yasser- Hide quoted text -
>
> >> > - Show quoted text -- Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to log test results in a file? - logcat error

2009-07-13 Thread Yasser

I am getting log messages by logcat command but when I try to use "adb
logcat -f ", it gives "could't open output file: read-only
file system" error.

On Jul 13, 2:36 pm, Yasser  wrote:
> I can't find the resultinglogfile, where does it get created?
>
> On Jul 13, 1:55 pm, Radzell  wrote:
>
>
>
> > use thelog.i() method
>
> > On Jul 13, 4:37 pm, Yasser  wrote:
>
> > > Hi,
>
> > > I am using assert methods of JUnit's Assert class on passing/failing
> > > of a test case.
>
> > > How can Ilogthese messages in a file on the desktop so that I can
> > > parse them to know the testresults?
>
> > > Thanks
> > > Yasser- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to log test results in a file?

2009-07-13 Thread Yasser

I can't find the resulting log file, where does it get created?

On Jul 13, 1:55 pm, Radzell  wrote:
> use the log.i() method
>
> On Jul 13, 4:37 pm, Yasser  wrote:
>
>
>
> > Hi,
>
> > I am using assert methods of JUnit's Assert class on passing/failing
> > of a test case.
>
> > How can I log these messages in a file on the desktop so that I can
> > parse them to know the test results?
>
> > Thanks
> > Yasser- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to log test results in a file?

2009-07-13 Thread Yasser

Hi,

I am using assert methods of JUnit's Assert class on passing/failing
of a test case.

How can I log these messages in a file on the desktop so that I can
parse them to know the test results?

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to install and run applications from within another application?

2009-07-10 Thread Yasser

For getLaunchIntentForPackage(), it says it is undefined for type
PackageManager and hence code cannot compile?
i can see the other methods when I put . after getPackageManager()
except this one.

Thanks
Yasser

On Jul 6, 10:39 am, "Justin (Google Employee)" 
wrote:
> > > How does the process for retrieving system rights look like?
>
> Its a matter of signatures. Whoever signs the system is also going to
> need to sign any app that wants system privileges.
>
> > I suppose this problem
> > shouldn't exist if I was able to save the .apk file in the private
> > directory of my application and then invoke the system install UI on
> > the file.
>
> Well, no, you can't have your cake and eat it to. The package manager
> needs to be able to read the APK file to install the app. In order to
> do this you need to place the APK in a world-readable location because
> you can't have the same UID or GID as the package manager. No matter
> what you do, if you want to allow the package manager to read the
> file, everyone can. Now, if you put the file in your private directory
> and set the mode to MODE_WORLD_READABLE, the package manager may be
> able to read the file, I think it should be able to. Everyone else
> can, but they would have to know the exact path because I don't
> believe they can list the directory in which the file resides.
>
> Now, regardless of where the APK is placed, you should probably delete
> it after installation, otherwise you're at least doubling storage
> space required per application. If you delete the APK after its
> installed, you also fix your "install only to device downloaded on".
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Jul 2, 3:48 am, calleandersson  wrote:
>
>
>
> > I have been testing with the 'file://' prefix and got the following
> > results:
>
> > When saving an .apk file in the private directory of my application
> > and trying to invoke the system installation UI, an parse error
> > occured due to permission issues:
> >   07-02 07:15:27.826: WARN/zipro(726): Unable to open zip '/data/data/
> > test.calle.helloworld/files/AndroidHelloWorld.apk': Permission denied
> >   07-02 07:15:27.826: DEBUG/asset(726): failed to open Zip archive '/
> > data/data/test.calle.helloworld/files/AndroidHelloWorld.apk'
> >   07-02 07:15:27.846: WARN/PackageParser(726): Unable to read
> > AndroidManifest.xml of /data/data/test.calle.helloworld/files/
> > AndroidHelloWorld.apk
> >   07-02 07:15:27.846: WARN/PackageParser(726):
> > java.io.FileNotFoundException: AndroidManifest.xml
> >    ...
> >   07-02 07:15:27.856: WARN/PackageInstaller(726): Parse error when
> > parsing manifest. Discontinuing installation
>
> > When I saved the .apk file on the SD card, everything went as supposed
> > and the system installation UI was displayed.
>
> > So far so good. However, I only want a downloaded .apk file to be
> > installed on the same phone which downloaded it. If the application is
> > placed on the SD card, wouldn't it be possible to use the same SD card
> > in another phone (or copy the .apk file to another SD card used by
> > another phone) and install the application on that phone too? Am I
> > correct in these assumtions?
>
> > With regards to what I wrote above, is it somehow possible to restrict
> > an application file from beeing installed on any other phone except
> > the very same phone which downloaded the .apk file (using my
> > application)? Is system rights needed? I suppose this problem
> > shouldn't exist if I was able to save the .apk file in the private
> > directory of my application and then invoke the system install UI on
> > the file.
>
> > Regards,
> > Calle
>
> > On 1 Juli, 18:22, calleandersson  wrote:
>
> > > Hi Justin,
>
> > > Thanks for the tips about the 'file://' prefix and SD card, I will
> > > look into that tomorrow.
>
> > > How does the process for retrieving system rights look like? Is it the
> > > manufacturer of an Android device which decides if an application
> > > should have system rights? I suppose that that kind of clients must be
> > > installed/included in the device before it is released or am I wrong?
>
> > > Is there somehow possible to simulate that an application has system
> > > rights in the Emulator?
>
> > > By the way, I was thinking of using the same Intent code to start an
> > > already installed application but, currently, I'm using the following
> > > code which s

[android-beginners] Re: How to programatically launch an installed app?

2009-07-10 Thread Yasser

Thanks a lot Mark, that clarified my doubts.

On Jul 10, 4:05 pm, Mark Murphy  wrote:
> Yasser wrote:
> > To know the intent for an activity in order to launch it, do I need to
> > have access to the app source code?
>
> Ideally, you have documentation telling you "hey, it is perfectly
> acceptable to use this Intent to launch my application: ...".
>
> Now, you can find out possible Intents other ways -- use PackageManager,
> watch messages in LogCat, examine the source code -- but any of those
> techniques may result in you creating something that will be unsupported
> over time.
>
> So, no, you do not necessarily need the source code, though it helps.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to programatically launch an installed app?

2009-07-10 Thread Yasser

To know the intent for an activity in order to launch it, do I need to
have access to the app source code?


On Jul 10, 1:23 pm, Mark Murphy  wrote:
> Yasser wrote:
> > I want to launch/start an already installed application like
> > Calculator on Android and then send some keystrokes to it.
>
> You cannot send keystrokes to other applications.
>
> > Is there a way to programatically launch an app without having access
> > to its code?
>
> If you can find out an Intent that launches it, you use startActivity()
> like you would any other activity. Finding the proper Intent can be a
> bit tricky, though there are methods on the PackageManager class that
> may help you identify what is launchable.
>
> Bear in mind, though, that unless those Intents are publicly documented,
> they are likely to break in future releases of Android (or of whatever
> 3rd party app you attempt to launch).
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Need help for your Android OSS project?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How to programatically launch an installed app?

2009-07-10 Thread Yasser

Hi,

I want to launch/start an already installed application like
Calculator on Android and then send some keystrokes to it.

Is there a way to programatically launch an app without having access
to its code?

Thanks
Yasser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: GUI test tool/framework for Android?

2009-07-07 Thread Yasser

Thanks Mark.
I will look more into the instrumentation framework.

Questions:
- Can I use this framework for UI operations without having access to
the app source code?
- So it means there is no way in Android for querying controls and
then performing actions on them?

Thanks
Yasser

On Jul 7, 3:49 pm, Mark Murphy  wrote:
> Yasser wrote:
> > I am running my app on the android emulator.
> > I am looking for a tool through which I can programatically perform
> > (simulate) user actions on the app's GUI. A tool like WinRunner or QTE
> > (may be not that advanced) which can interact with the GUI. Actually I
> > need this to develop test automation for my app.
>
> The instrumentation framework, which you dismissed earlier, is the answer.
>
> >>> There is an "Android Instrumentation Framework" (part of SDK) but
> >>> that's more for API or Unit testing not for functional testing.
>
> That is incorrect. Use android.test.ActivityInstrumentationTestCase2 and
> sendKeys() to simulate user input. Admittedly, this only works for
> keyboard/trackball events (not touch events, AFAIK), but it is better
> than nothing.
>
> More importantly, short of improving the instrumentation framework, you
> have no other real option for black-box GUI testing, due to Android's
> security measures.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: GUI test tool/framework for Android?

2009-07-07 Thread Yasser

I am running my app on the android emulator.
I am looking for a tool through which I can programatically perform
(simulate) user actions on the app's GUI. A tool like WinRunner or QTE
(may be not that advanced) which can interact with the GUI. Actually I
need this to develop test automation for my app.

On Jul 7, 1:25 pm, Gabriel Branch  wrote:
> If you are using eclipse to dev then you know the emulator is all part of
> what you are looking for.
> If you are not using eclipse then you should probably start using it.
>
> Go tohttp://eclipsesource.com/en/yoxos/yoxos-ondemand/and roll your own
> eclipse install with all the android, svn, jUnit stuff or whatever you like
> and you should be good to go.
>
> g
>
>
>
> On Mon, Jul 6, 2009 at 6:37 PM, Yasser  wrote:
>
> > I need to interact with my Android application through its GUI in
> > order to test it.
>
> > Is there any tool/framework available which can be used to perform
> > various user actions on the UI elements/controls like a button click,
> > read/write some text into a textbox etc.?
>
> > There is an "Android Instrumentation Framework" (part of SDK) but
> > that's more for API or Unit testing not for functional testing.
>
> > Thanks
> > Yasser- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] GUI test tool/framework for Android?

2009-07-07 Thread Yasser

I need to interact with my Android application through its GUI in
order to test it.

Is there any tool/framework available which can be used to perform
various user actions on the UI elements/controls like a button click,
read/write some text into a textbox etc.?

There is an "Android Instrumentation Framework" (part of SDK) but
that's more for API or Unit testing not for functional testing.


Thanks
Yasser


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] GUI test tool/framework for Android?

2009-07-07 Thread Yasser

Hi All,

I need to interact with my Android application through its GUI in
order to test it.

Is there any tool/framework available which can be used to perform
various user actions on the UI elements/controls like a button click,
read/write some text into a textbox etc.?

There is an "Android Instrumentation Framework" (part of SDK) but
that's more for API or Unit testing not for functional testing.


Thanks
Yasser

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---