[android-developers] Re: How to resolve Fail to find an AVD compatible with target 'Android 1.5' ?

2009-05-21 Thread Raphael

What does android list avds gives you on the command line?
If using Eclipse with ADT 0.9.1 you can use Windows  AVD Manager to
list your avds
R/

On Tue, May 19, 2009 at 2:07 AM, rogerhood rogerh...@gmail.com wrote:

 hi, all:
     My Eclipse is equiped with Cupcake SDK and I created an AVD in /
 tools/ folder.
     I run my program, then the console appear Fail to find an AVD
 compatible with target 'Android 1.5' .
     How to resolve it?
     Thanks!!

 Roger

 


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



[android-developers] Re: Speed: Divide by two or multiply by .5? - I wrote a little FPS performance tester to find out.

2009-05-21 Thread Al Sutton

Ahhh... those were the days bitshifting instead of multiplication  
dividing XORing a value by itself being quicker than setting it to zero 
(see http://en.wikipedia.org/wiki/Bitwise_operation#XOR if you think I'm making 
this one up, it was certainly true on a Motorola 68000 embedded system I worked 
on).

Nowadays this is all normally done automatically by the compiler as an 
optimisation, so you may not see any benefit doing it explicitly in the code 
except for making new coders go wtf is that about? :).

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 

-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Jason Proctor
Sent: 20 May 2009 23:30
To: android-developers@googlegroups.com
Subject: [android-developers] Speed: Divide by two or multiply by .5? - I wrote 
a little FPS performance tester to find out.


maybe i'm missing the point here, but dividing by a power of 2 can be 
done very fast by right-shifting. hard to beat that.



Romain - The idea was to see which is faster to cut an int in half -
multiplying by a float (.5) or dividing by two.  I've read that
divides are terribly slow but apparently not as bad as floating point
multiplications w/ a cast back to an int.



-- 
jason.software.particle



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



[android-developers] Re: How to solve G1/HTC Magic not recognized by ADB under Windows

2009-05-21 Thread Al Sutton

I think http://support.microsoft.com/kb/241257 describes the easiest way to 
make sure you get rid of all the android related devices in device manager.

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 


-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of John Burton
Sent: 20 May 2009 12:51
To: Android Developers
Subject: [android-developers] Re: How to solve G1/HTC Magic not recognized by 
ADB under Windows




Al Sutton wrote:
 This doesn't seem to fix the problem I have on Vista 32 bit.


I had exactly the same problem on vista, it's not possible to delete
the keys.
What I did was open the device manager in control panel and then turn
on show all devices or something like that. I don't have vista handy
so can't fine the exact option but it's on one of the menus.

Then I uninstalled any devices that looked like it belonged to the
phone. I had tried this before but without the option to show
everything turned on and likely missed some. Uninstalling the device
removes the entries in the registry so you can see when it has worked.
Clearly uninstalling random devices isn't the best idea so be careful.



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



[android-developers] Re: Android DOM implementation issues

2009-05-21 Thread Mariano Kamp
So what is it you're asking for DOM or SAX?
Android uses standard classes for both cases. Maybe you should run your
samples on a standard sdk  just for comparison?

startElement() is SAX, not DOM.

I also don't get the major issue. In XML attributes cannot have children. So
you probably mean something else, but I didn't get that.

On Thu, May 21, 2009 at 1:59 AM, Jason Proctor ja...@particularplace.comwrote:


 i'm porting some code which talks to the org.w3c.dom.* classes to
 Android, and i'm hitting some issues.

 i'm using javax.xml.parsers.SAXParser as my parser, then getting an
 XMLReader and setting myself up as a DefaultHandler to get notified
 of SAX events.

 first issue (minor) -- in startElement(), the tag name comes through
 in the localName parameter rather than the qName parameter. this is a
 departure from all the DOM implementations i've used so far.

 second issue (major) -- the Android DOM doesn't allow me to add a
 Text node as a child of an Attr. attribute values are conventionally
 held as child nodes. setAttribute() isn't good enough, as i need to
 be able to mix Text and EntityReference as siblings under Attr.

 if the Android DOM is just storing attribute values as strings, and
 doesn't allow manipulation of the attribute's children (or maybe
 there aren't any), then that's a fairly serious incompatibility IMHO.

 thanks for any help with this one
 --
 jason.software.particle

 


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



[android-developers] remove drop icon in expandablelist

2009-05-21 Thread sleith

hi,
is there anyway to remove the default drop down icon on
ExpandableList?

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



[android-developers] Re: How to solve G1/HTC Magic not recognized by ADB under Windows

2009-05-21 Thread Al Sutton

Oh my snakes on a plane... it's working... it's actually working!

OK, here are the things I did;

1) With the g1 *not* connected, I used the MS knowledgebase article 
(http://support.microsoft.com/kb/241257) to remove the device and selected the 
Remove drivers for this device checkbox for the ADB bridge driver.

2) Turned off auto driver updates (Right click on my computer, select 
properties, then System protection (on the left), then the hardware tab, then 
the Windows Update Driver Settings button, then selected Ask me each time I 
connect a new device before checking for drivers, the Click OK).

3) Fired up the G1, made sure the USB debugging was on and Stay away was on 
as well.

4) While the screen was still active (i.e. not gone into lock or sleep), 
connected the G1.

5) Hey presto... the device is now there :) :) :).

Thanks to everyone who helped fix this.

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 


-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of John Burton
Sent: 20 May 2009 12:51
To: Android Developers
Subject: [android-developers] Re: How to solve G1/HTC Magic not recognized by 
ADB under Windows




Al Sutton wrote:
 This doesn't seem to fix the problem I have on Vista 32 bit.


I had exactly the same problem on vista, it's not possible to delete
the keys.
What I did was open the device manager in control panel and then turn
on show all devices or something like that. I don't have vista handy
so can't fine the exact option but it's on one of the menus.

Then I uninstalled any devices that looked like it belonged to the
phone. I had tried this before but without the option to show
everything turned on and likely missed some. Uninstalling the device
removes the entries in the registry so you can see when it has worked.
Clearly uninstalling random devices isn't the best idea so be careful.



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



[android-developers] Android DOM implementation issues

2009-05-21 Thread Jason Proctor

thanks for the response.

i use the standard (javax.xml.parser.*) SAX parser. it tells me when 
things happen so i can build a DOM tree. so in a sense, i'm using 
both.

Android might use standard *interfaces* for the parser and DOM 
classes, but the actual implementations are different.

i developed my application against various DOM implementations, right 
now with JDK 1.5 on MacOS X. this is how i know that the Android ones 
are different.

in the DOM, attribute values are implemented as child Nodes of Attr. 
this is standard DOM behaviour.

another issue i'm seeing is that the Document class, at least, does 
not allow its child nodes to be removed.

and another issue i'm seeing is that the error messages on DOM errors 
are nonexistent - i have to compare DOMException.code against each 
possible value to find out what happened. other implementations give 
me chapter and verse.

which DOM implementation is Android using?

thanks
j


So what is it you're asking for DOM or SAX?

Android uses standard classes for both cases. Maybe you should run 
your samples on a standard sdk  just for comparison?

startElement() is SAX, not DOM.

I also don't get the major issue. In XML attributes cannot have 
children. So you probably mean something else, but I didn't get that.

On Thu, May 21, 2009 at 1:59 AM, Jason Proctor 
mailto:ja...@particularplace.comja...@particularplace.com wrote:


i'm porting some code which talks to the org.w3c.dom.* classes to
Android, and i'm hitting some issues.

i'm using javax.xml.parsers.SAXParser as my parser, then getting an
XMLReader and setting myself up as a DefaultHandler to get notified
of SAX events.

first issue (minor) -- in startElement(), the tag name comes through
in the localName parameter rather than the qName parameter. this is a
departure from all the DOM implementations i've used so far.

second issue (major) -- the Android DOM doesn't allow me to add a
Text node as a child of an Attr. attribute values are conventionally
held as child nodes. setAttribute() isn't good enough, as i need to
be able to mix Text and EntityReference as siblings under Attr.

if the Android DOM is just storing attribute values as strings, and
doesn't allow manipulation of the attribute's children (or maybe
there aren't any), then that's a fairly serious incompatibility IMHO.

thanks for any help with this one
--
jason.software.particle





-- 
jason.software.particle

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



[android-developers] Re: Android DOM implementation issues

2009-05-21 Thread Mariano Kamp
A DOM parser uses SAX to built up the tree, but you don't have to do that
yourself.


DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = dbf.newDocumentBuilder();

Document d = builder.parse(new InputSource(Your Input Stream /
Reader / Whatever goes here));

Depends on what you're asking for. Mostly the apache stuff.

On Thu, May 21, 2009 at 9:24 AM, Jason Proctor ja...@particularplace.comwrote:


 thanks for the response.

 i use the standard (javax.xml.parser.*) SAX parser. it tells me when
 things happen so i can build a DOM tree. so in a sense, i'm using
 both.

 Android might use standard *interfaces* for the parser and DOM
 classes, but the actual implementations are different.

 i developed my application against various DOM implementations, right
 now with JDK 1.5 on MacOS X. this is how i know that the Android ones
 are different.

 in the DOM, attribute values are implemented as child Nodes of Attr.
 this is standard DOM behaviour.

 another issue i'm seeing is that the Document class, at least, does
 not allow its child nodes to be removed.

 and another issue i'm seeing is that the error messages on DOM errors
 are nonexistent - i have to compare DOMException.code against each
 possible value to find out what happened. other implementations give
 me chapter and verse.

 which DOM implementation is Android using?

 thanks
 j


 So what is it you're asking for DOM or SAX?
 
 Android uses standard classes for both cases. Maybe you should run
 your samples on a standard sdk  just for comparison?
 
 startElement() is SAX, not DOM.
 
 I also don't get the major issue. In XML attributes cannot have
 children. So you probably mean something else, but I didn't get that.
 
 On Thu, May 21, 2009 at 1:59 AM, Jason Proctor
 mailto:ja...@particularplace.comja...@particularplace.com wrote:
 
 
 i'm porting some code which talks to the org.w3c.dom.* classes to
 Android, and i'm hitting some issues.
 
 i'm using javax.xml.parsers.SAXParser as my parser, then getting an
 XMLReader and setting myself up as a DefaultHandler to get notified
 of SAX events.
 
 first issue (minor) -- in startElement(), the tag name comes through
 in the localName parameter rather than the qName parameter. this is a
 departure from all the DOM implementations i've used so far.
 
 second issue (major) -- the Android DOM doesn't allow me to add a
 Text node as a child of an Attr. attribute values are conventionally
 held as child nodes. setAttribute() isn't good enough, as i need to
 be able to mix Text and EntityReference as siblings under Attr.
 
 if the Android DOM is just storing attribute values as strings, and
 doesn't allow manipulation of the attribute's children (or maybe
 there aren't any), then that's a fairly serious incompatibility IMHO.
 
 thanks for any help with this one
 --
 jason.software.particle
 
 
 
 

 --
 jason.software.particle

 


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



[android-developers] Android DOM implementation issues

2009-05-21 Thread Jason Proctor

i would say it that a SAX parser uses DOM to build the tree :-)

i'm doing it the long way round largely because i want to do some 
preprocessing on the text before i make Text nodes. but the tree that 
i make and the tree that the document builder makes should be 
essentially the same.

however, some of the differences are with DOM behaviour after the 
tree is built, eg Document throwing if i try to remove one of its 
children.

Android uses Xerces? that's what i'm using with the Mac JDK, so i 
would expect the behaviour to be the same. but it isn't, strangely. 
can you provide more detail?

thanks,
j



A DOM parser uses SAX to built up the tree, but you don't have to do 
that yourself.




 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();


 DocumentBuilder builder = dbf.newDocumentBuilder();



 Document d = builder.parse(new InputSource(Your Input Stream / 
Reader / Whatever goes here));



Depends on what you're asking for. Mostly the apache stuff.

On Thu, May 21, 2009 at 9:24 AM, Jason Proctor 
mailto:ja...@particularplace.comja...@particularplace.com wrote:


thanks for the response.

i use the standard (javax.xml.parser.*) SAX parser. it tells me when
things happen so i can build a DOM tree. so in a sense, i'm using
both.

Android might use standard *interfaces* for the parser and DOM
classes, but the actual implementations are different.

i developed my application against various DOM implementations, right
now with JDK 1.5 on MacOS X. this is how i know that the Android ones
are different.

in the DOM, attribute values are implemented as child Nodes of Attr.
this is standard DOM behaviour.

another issue i'm seeing is that the Document class, at least, does
not allow its child nodes to be removed.

and another issue i'm seeing is that the error messages on DOM errors
are nonexistent - i have to compare DOMException.code against each
possible value to find out what happened. other implementations give
me chapter and verse.

which DOM implementation is Android using?

thanks
j



So what is it you're asking for DOM or SAX?

Android uses standard classes for both cases. Maybe you should run
your samples on a standard sdk  just for comparison?

startElement() is SAX, not DOM.

I also don't get the major issue. In XML attributes cannot have
children. So you probably mean something else, but I didn't get that.

On Thu, May 21, 2009 at 1:59 AM, Jason Proctor

  
 mailto:mailto:ja...@particularplace.comja...@particularplace.commailto:ja...@particularplace.comja...@particularplace.com
  
wrote:


i'm porting some code which talks to the org.w3c.dom.* classes to
Android, and i'm hitting some issues.

i'm using javax.xml.parsers.SAXParser as my parser, then getting an
XMLReader and setting myself up as a DefaultHandler to get notified
of SAX events.

first issue (minor) -- in startElement(), the tag name comes through
in the localName parameter rather than the qName parameter. this is a
departure from all the DOM implementations i've used so far.

second issue (major) -- the Android DOM doesn't allow me to add a
Text node as a child of an Attr. attribute values are conventionally
held as child nodes. setAttribute() isn't good enough, as i need to
be able to mix Text and EntityReference as siblings under Attr.

if the Android DOM is just storing attribute values as strings, and
doesn't allow manipulation of the attribute's children (or maybe
there aren't any), then that's a fairly serious incompatibility IMHO.

thanks for any help with this one
--
jason.software.particle





--
jason.software.particle





-- 
jason.software.particle

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



[android-developers] Re: Puzzled by soft keyboard

2009-05-21 Thread blindfold

Thank you, Dianne. I must admit that I find this an utterly confusing
paradigm. So now we have a *software* keyboard that makes a (novel!)
distinction between what *it* considers physical keys and non-
physical keys? All those digit and letter keys were physical enough
on my ADP slide-out keyboard, and my EditText onKey() example works
perfectly fine there with both digits *and* letters. As a physicist I
am lost here. The user sees either a (truly) physical keyboard or an
on-screen keyboard that gets physically touched, and why must there be
a further split in key types for application programmers? This
artificial split does not even match the non-Qwerty numeric keyboard
of basic phones, because for instance the '#' hash/pound key also
fails to raise a key event with the soft keyboard. In short, it all
looks like a design oversight to me.

To be concrete:

With the ADP slide-out keyboard, pressing '7' gives keyCode 14, and
pressing 'a' gives keyCode 29 in my example code. However, with the
ADP soft keyboard, pressing '7' gives keyCode 14, but pressing 'a'
gives... nothing, zilch, no key event at all.

I may be naive but I find this an undesirable complication. IMO I
should not have to add any special InputConnection code to recover
proper default behavior here?

Thanks


On May 21, 3:55 am, Dianne Hackborn hack...@android.com wrote:
 Most text isn't delivered through key events, since key events represent
 physical keys and not Unicode characters.  The IME sends most of its text
 through the editing with the InputConnection interface.

 On Wed, May 20, 2009 at 11:34 AM, blindfold seeingwithso...@gmail.comwrote:





  Hi,

  I have a regular EditText that nicely pops up the soft keyboard when
  the hardware keyboard is closed. Entering data also works fine and
  gets preserved by my app. However, when I try to track individual key
  presses using the following code,

    EditText myedit;

    // Only gets number keys??
    myedit.setOnKeyListener(new EditText.OnKeyListener() {
      �...@override
       public boolean onKey(View v, int keyCode, KeyEvent event) {
          Log.i(OIC,keycode +keyCode);
          KeyCharacterMap kmap = KeyCharacterMap.load(event.getDeviceId
  ());
          if (kmap.isPrintingKey(keyCode)  event.getAction() ==
  KeyEvent.ACTION_DOWN) {
             // Blah, blah
          }
          return false;
       }
    });

  no key presses show up in LogCat *except* for number key presses
  (0-9). No letters, punctuation, or anything other than numeric digits
  and a few special keys such as Del and Return. Is this a bug or a
  feature? In this particular case I am only interested in individual
  alphabetic key presses, but the listener fails to report them. What's
  wrong?

  I'm using the official Android 1.5 on my ADP.

  Thanks

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

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



[android-developers] Re: Android DOM implementation issues

2009-05-21 Thread Mariano Kamp
No, not Xerces.I don't remember exactly, I think there is
org.apache.harmony.something stuff and kxml.

Yeah, I could dig it up, but you could probably too. You are at your
machine? Try
someNodeOrWhateverRelevantInstanceYouHaveInYourHand.getClass().getName().

On Thu, May 21, 2009 at 9:43 AM, Jason Proctor ja...@particularplace.comwrote:


 i would say it that a SAX parser uses DOM to build the tree :-)

 i'm doing it the long way round largely because i want to do some
 preprocessing on the text before i make Text nodes. but the tree that
 i make and the tree that the document builder makes should be
 essentially the same.

 however, some of the differences are with DOM behaviour after the
 tree is built, eg Document throwing if i try to remove one of its
 children.

 Android uses Xerces? that's what i'm using with the Mac JDK, so i
 would expect the behaviour to be the same. but it isn't, strangely.
 can you provide more detail?

 thanks,
 j



 A DOM parser uses SAX to built up the tree, but you don't have to do
 that yourself.
 
 
 
 
  DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
 
 
  DocumentBuilder builder = dbf.newDocumentBuilder();
 
 
 
  Document d = builder.parse(new InputSource(Your Input Stream /
 Reader / Whatever goes here));
 
 
 
 Depends on what you're asking for. Mostly the apache stuff.
 
 On Thu, May 21, 2009 at 9:24 AM, Jason Proctor
 mailto:ja...@particularplace.comja...@particularplace.com wrote:
 
 
 thanks for the response.
 
 i use the standard (javax.xml.parser.*) SAX parser. it tells me when
 things happen so i can build a DOM tree. so in a sense, i'm using
 both.
 
 Android might use standard *interfaces* for the parser and DOM
 classes, but the actual implementations are different.
 
 i developed my application against various DOM implementations, right
 now with JDK 1.5 on MacOS X. this is how i know that the Android ones
 are different.
 
 in the DOM, attribute values are implemented as child Nodes of Attr.
 this is standard DOM behaviour.
 
 another issue i'm seeing is that the Document class, at least, does
 not allow its child nodes to be removed.
 
 and another issue i'm seeing is that the error messages on DOM errors
 are nonexistent - i have to compare DOMException.code against each
 possible value to find out what happened. other implementations give
 me chapter and verse.
 
 which DOM implementation is Android using?
 
 thanks
 j
 
 
 
 So what is it you're asking for DOM or SAX?
 
 Android uses standard classes for both cases. Maybe you should run
 your samples on a standard sdk  just for comparison?
 
 startElement() is SAX, not DOM.
 
 I also don't get the major issue. In XML attributes cannot have
 children. So you probably mean something else, but I didn't get that.
 
 On Thu, May 21, 2009 at 1:59 AM, Jason Proctor
 
   mailto:mailto:ja...@particularplace.comja...@particularplace.com
 mailto:ja...@particularplace.comja...@particularplace.com
 wrote:
 
 
 i'm porting some code which talks to the org.w3c.dom.* classes to
 Android, and i'm hitting some issues.
 
 i'm using javax.xml.parsers.SAXParser as my parser, then getting an
 XMLReader and setting myself up as a DefaultHandler to get notified
 of SAX events.
 
 first issue (minor) -- in startElement(), the tag name comes through
 in the localName parameter rather than the qName parameter. this is a
 departure from all the DOM implementations i've used so far.
 
 second issue (major) -- the Android DOM doesn't allow me to add a
 Text node as a child of an Attr. attribute values are conventionally
 held as child nodes. setAttribute() isn't good enough, as i need to
 be able to mix Text and EntityReference as siblings under Attr.
 
 if the Android DOM is just storing attribute values as strings, and
 doesn't allow manipulation of the attribute's children (or maybe
 there aren't any), then that's a fairly serious incompatibility IMHO.
 
 thanks for any help with this one
 --
 jason.software.particle
 
 
 
 
 
 --
 jason.software.particle
 
 
 
 

 --
 jason.software.particle

 


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



[android-developers] Messaging between 2 threads

2009-05-21 Thread Latha Shivanna
Hi All

I am writing an application in which i need to handle messages between the
main thread(the deafult UI related thread) and the user created Gamethread.

The requirement is like this.

An activity(say Activity_X) is setting the view by setContentView(some
View_Y). In Activity_X i have implemeted onCreateOptionsMenu() and
onOptionsItemSelected() fucntions for creating menus  a switch case for
action to be taken on selecting those menus.Menu has items like
resume/pause/zoom/ .


All action to be take on selecting these menus are implemented in View_Y
in a separate Gamethread by extending Thread class.

So whenever a menu is selected in Activity_X i need to send a message to
View_Y. And on receiving this ,a particular action/method should be called
in View_Y(GameThread).

How can i achieve this using Handlers?Is there any other way of doing this?
Please do share with me some code snippets for these.
Your advises are highly appreciable. Thank you for your time.

-Latha

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



[android-developers] play sound issue

2009-05-21 Thread Sukitha Udugamasooriya

Hi,

In my application i'm playing a 1 second sound clip when the user
clicks on a button. after that a mall thread sleep then i have
assigned a small animation to the particular button. (500ms
duration).
Animation works fine without sound. But when I put sound the animation
is not consistent.

Why is that?

mp = MediaPlayer.create(this, R.raw.over);
try {
mp.prepare();
} catch (IOException e) {
Log.w(EXCEPTION, IO);
e.printStackTrace();
}

Do i need to start sound on  a different thread?
Is there anything to concern regarding this?

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



[android-developers] Messaging between 2 threads

2009-05-21 Thread latha...@gmail.com

Hi All

I am writing an application in which i need to handle messages between
the main thread(the deafult UI related thread) and the user created
Gamethread.

The requirement is like this.

An activity(say Activity_X) is setting the view by setContentView
(some View_Y). In Activity_X i have implemeted
onCreateOptionsMenu() and onOptionsItemSelected() fucntions for
creating menus  a switch case for action to be taken on selecting
those menus.Menu has items like resume/pause/zoom/ .


All action to be take on selecting these menus are implemented in
View_Y in a separate Gamethread by extending Thread class.

So whenever a menu is selected in Activity_X i need to send a
message to View_Y. And on receiving this ,a particular action/method
should be called in View_Y(GameThread).

How can i achieve this using Handlers?Is there any other way of doing
this? Please do share with me some code snippets for these.
Your advises are highly appreciable. Thank you for your time.

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



[android-developers] Update View after OnTouch, does not work?!?

2009-05-21 Thread guruk

Hi, hope you can help:

I have :

1. private static class SampleView extends View implements
OnGestureListener { //init variables }
2. public SampleView(Context context) { super(context); buildPoints
();}
3. @Overrideprotected void onDraw(Canvas canvas) {  paintchart
(canvas,param); }
4. public void paintchart(Canvas canvaschart, int param) { // drawing
my chart }

my GestureListener Methods:
- public boolean onTouchEvent(MotionEvent me) {
- public boolean onScroll(MotionEvent e1, MotionEvent e2, float
distanceX, float distanceY) {
- public boolean dispatchTouchEvent(MotionEvent me) {

It works fine for all calculations. When I scroll I even get the right
data in my PainChart(canvas)
But the Display come NOT updated?? Why.

When I call the paintchart from OnDraw() with different Params it
works fine.
But when it come called from onScroll or even direct just for test in
onTouchEvent, it does not update
my View... ??

Any Ideas

Thanks and wish you all the best
Chris

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



[android-developers] Android DOM implementation issues

2009-05-21 Thread Jason Proctor

my dev environment is at work. i'll have to dig into it more in the morning.

thanks for the responses.

j


No, not Xerces.
I don't remember exactly, I think there is 
org.apache.harmony.something stuff and kxml.


Yeah, I could dig it up, but you could probably too. You are at your 
machine? Try 
someNodeOrWhateverRelevantInstanceYouHaveInYourHand.getClass().getName().





-- 
jason.software.particle

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



[android-developers] Re: Update View after OnTouch, does not work?!?

2009-05-21 Thread Romain Guy

Because you cannot call the draw methods directly. You must call
invalidate(), this will cause onDraw() to be executed.

On Thu, May 21, 2009 at 12:54 AM, guruk ilovesi...@gmail.com wrote:

 Hi, hope you can help:

 I have :

 1. private static class SampleView extends View implements
 OnGestureListener { //init variables }
 2. public SampleView(Context context) { super(context); buildPoints
 ();}
 3. @Override    protected void onDraw(Canvas canvas) {  paintchart
 (canvas,param); }
 4. public void paintchart(Canvas canvaschart, int param) { // drawing
 my chart }

 my GestureListener Methods:
 - public boolean onTouchEvent(MotionEvent me) {
 - public boolean onScroll(MotionEvent e1, MotionEvent e2, float
 distanceX, float distanceY) {
 - public boolean dispatchTouchEvent(MotionEvent me) {

 It works fine for all calculations. When I scroll I even get the right
 data in my PainChart(canvas)
 But the Display come NOT updated?? Why.

 When I call the paintchart from OnDraw() with different Params it
 works fine.
 But when it come called from onScroll or even direct just for test in
 onTouchEvent, it does not update
 my View... ??

 Any Ideas

 Thanks and wish you all the best
 Chris

 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] Re: Android DOM implementation issues

2009-05-21 Thread Mariano Kamp
same here ;-)

On Thu, May 21, 2009 at 9:56 AM, Jason Proctor ja...@particularplace.comwrote:


 my dev environment is at work. i'll have to dig into it more in the
 morning.

 thanks for the responses.

 j


 No, not Xerces.
 I don't remember exactly, I think there is
 org.apache.harmony.something stuff and kxml.
 
 
 Yeah, I could dig it up, but you could probably too. You are at your
 machine? Try
 someNodeOrWhateverRelevantInstanceYouHaveInYourHand.getClass().getName().





 --
 jason.software.particle

 


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



[android-developers] Re: Update View after OnTouch, does not work?!?

2009-05-21 Thread guruk

Dear Romain,

thanks, that was the reason.. did not know about!

Greets
Chris


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



[android-developers] Alarm issue.

2009-05-21 Thread Gavin

Hi, all

  I want to know how many alarms can be set in one application?
what is the length for every interval time  that I can set?
 I need many alarms and at least 1 month interval time in my
application. it is possible?
 Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Running exclusively SmallTests

2009-05-21 Thread Gavin Aiken
Hey,

Just wondering if anyone has found a way to pass the command line parameter
'-e size small' to the Android JUnit test runner as configured through
eclipse. I'd rather work within eclipse than on the command line if
possible.

Cheers,

Gav

On Sat, Apr 11, 2009 at 11:21 PM, Gavin Aiken gavin.ai...@imperial.ac.ukwrote:

 Hi all,

 To build a test suite containing only small tests I looked at the source
 examples and found 
 SmallTests.javahttp://www.google.co.in/codesearch/p?hl=en#SS2by_AKaLs/tests/src/com/android/email/SmallTests.javaq=android%20package:git://android.git.kernel.org%20SmallTestsin
  the email app test source. I assumed that I would need to add a
 Predicate to such a class as this seems not to distinguish test sizes
 (Unless the test runner infers this from the name of the suite?).

 I could then add the predicate to a TestSuiteBuilder via 'addRequirements'
 but I couldn't work out how to build a predicate based on the annotation
 class SmallTest.

 Eventually I found the 
 InstrumentationTestRunnerhttp://developer.android.com/reference/android/test/InstrumentationTestRunner.htmldocumentation
  and it seems that the command;

 adb shell am instrument -w -e size small
 com.android.foo/android.test.InstrumentationTestRunner

 Does the trick.

 I post this information for reference but also to ask if the former option
 is possible, i.e. if there is a simple predicate that I could create to
 isolate SmallTest annotated tests?

 Just for interests' sake :)

 Gav


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



[android-developers] Re: Alarm issue.

2009-05-21 Thread Gavin

  I need every alarm  have different interval time and start time.

On May 21, 4:30 pm, Gavin fjm...@gmail.com wrote:
 Hi, all

   I want to know how many alarms can be set in one application?
 what is the length for every interval time  that I can set?
  I need many alarms and at least 1 month interval time in my
 application. it is possible?
  Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Puzzled by soft keyboard

2009-05-21 Thread Dianne Hackborn
It's not a software keyboard, it is an IME with a rich editing interface
back to the text editor, including things like showing candidates,
performing replacement, etc.  For example, as you enter a word, each key you
enter is actually the IME delivering to the editor a  new candidate text
string to replace the one currently displayed.  This is actually a pretty
typical IME interface.

It is certainly not a design oversight...  though you can simply not give
the IME an InputConnection, in which case it falls back on delivering raw
key events (when it can...  for some characters it simply won't be able to)
and gives the user a crummy editing experience.

On Thu, May 21, 2009 at 12:46 AM, blindfold seeingwithso...@gmail.comwrote:


 Thank you, Dianne. I must admit that I find this an utterly confusing
 paradigm. So now we have a *software* keyboard that makes a (novel!)
 distinction between what *it* considers physical keys and non-
 physical keys? All those digit and letter keys were physical enough
 on my ADP slide-out keyboard, and my EditText onKey() example works
 perfectly fine there with both digits *and* letters. As a physicist I
 am lost here. The user sees either a (truly) physical keyboard or an
 on-screen keyboard that gets physically touched, and why must there be
 a further split in key types for application programmers? This
 artificial split does not even match the non-Qwerty numeric keyboard
 of basic phones, because for instance the '#' hash/pound key also
 fails to raise a key event with the soft keyboard. In short, it all
 looks like a design oversight to me.

 To be concrete:

 With the ADP slide-out keyboard, pressing '7' gives keyCode 14, and
 pressing 'a' gives keyCode 29 in my example code. However, with the
 ADP soft keyboard, pressing '7' gives keyCode 14, but pressing 'a'
 gives... nothing, zilch, no key event at all.

 I may be naive but I find this an undesirable complication. IMO I
 should not have to add any special InputConnection code to recover
 proper default behavior here?

 Thanks


 On May 21, 3:55 am, Dianne Hackborn hack...@android.com wrote:
  Most text isn't delivered through key events, since key events represent
  physical keys and not Unicode characters.  The IME sends most of its text
  through the editing with the InputConnection interface.
 
  On Wed, May 20, 2009 at 11:34 AM, blindfold seeingwithso...@gmail.com
 wrote:
 
 
 
 
 
   Hi,
 
   I have a regular EditText that nicely pops up the soft keyboard when
   the hardware keyboard is closed. Entering data also works fine and
   gets preserved by my app. However, when I try to track individual key
   presses using the following code,
 
 EditText myedit;
 
 // Only gets number keys??
 myedit.setOnKeyListener(new EditText.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
   Log.i(OIC,keycode +keyCode);
   KeyCharacterMap kmap = KeyCharacterMap.load(event.getDeviceId
   ());
   if (kmap.isPrintingKey(keyCode)  event.getAction() ==
   KeyEvent.ACTION_DOWN) {
  // Blah, blah
   }
   return false;
}
 });
 
   no key presses show up in LogCat *except* for number key presses
   (0-9). No letters, punctuation, or anything other than numeric digits
   and a few special keys such as Del and Return. Is this a bug or a
   feature? In this particular case I am only interested in individual
   alphabetic key presses, but the listener fails to report them. What's
   wrong?
 
   I'm using the official Android 1.5 on my ADP.
 
   Thanks
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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



[android-developers] Camera preview zoom?

2009-05-21 Thread moa

Currently the camera performs previews of the shot at 480x320 allowing
for real time processing.

Is it possible define what part of full 1536x2024 camera image is used
for the smaller preview image? Basically some kind of zoom?

I am trying to get a more detailed part of the image, without have to
do a full camera acquire and crop that.


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



[android-developers] Re: Very strange StackOverflow exception

2009-05-21 Thread Vince

Hi fadden,

Here is the stack trace:

05-21 08:38:08.050: ERROR/AndroidRuntime(952): Uncaught handler:
thread main exiting due to uncaught exception
05-21 08:38:08.098: ERROR/AndroidRuntime(952):
java.lang.StackOverflowError
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.text.StaticLayout.init(StaticLayout.java:97)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.text.StaticLayout.init(StaticLayout.java:54)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.text.StaticLayout.init(StaticLayout.java:45)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.widget.TextView.makeNewLayout(TextView.java:4769)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.widget.TextView.assumeLayout(TextView.java:4669)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.widget.TextView.onDraw(TextView.java:3753)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.View.draw(View.java:5838)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.View.draw(View.java:5944)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.View.buildDrawingCache(View.java:5617)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.View.getDrawingCache(View.java:5458)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1422)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.View.draw(View.java:5841)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.View.draw(View.java:5841)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.view.View.draw(View.java:5841)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
05-21 08:38:08.098: ERROR/AndroidRuntime(952): at
com.android.internal.policy.impl.PhoneWindow$DecorView.draw
(PhoneWindow.java:1847)
05-21 08:38:08.098: 

[android-developers] Re: Alarm issue.

2009-05-21 Thread Mark Murphy

   I need every alarm  have different interval time and start time.

AlarmManager can handle that.

   I want to know how many alarms can be set in one application?

How much memory do you have?

  I need many alarms and at least 1 month interval time in my
 application.

No you don't.

You need one periodic alarm for every 24 hours. You then need zero or more
other alarms to cover the specific events that need to fire at specific
times within the current day.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-developers] Re: Converting bitmap to grayscale

2009-05-21 Thread moa

Actually figured it out in the end! :)


Bitmap bm = Bitmap.createBitmap(500, 500,
Bitmap.Config.RGB_565);
Canvas c = new Canvas(bm);
Paint paint = new Paint();
ColorMatrix cm = new ColorMatrix();
cm.setSaturation(0);
ColorMatrixColorFilter f = new ColorMatrixColorFilter
(cm);
paint.setColorFilter(f);
int xo = (w-500)/2;
int yo = (h-500)/2;
c.drawBitmap(bmp, -xo, -yo, paint);
bmp.recycle();

Cheers.

On May 20, 12:07 pm, moa mich...@jixel.com wrote:
 I would like to convert a Bitmap to a grayscale array of bytes (one
 byte per pixel). At the same time I want to just crop at section from
 the middle. Having looked though the various api's it is not clear to
 me what the best way would be.

 The best way I have found in se java is as below;

 BufferedImage image = new BufferedImage(cropWidth, cropHeight,
 BufferedImage.TYPE_BYTE_GRAY);
 Graphics g = image.getGraphics();
 g.drawImage(colorImage, cropOffsetX, cropOffsetY, null);
 g.dispose();

 Leaving me with a graysale image of the right section;

 What is the equivalent method with android api's. I am guessing it is
 along these lines

                 Bitmap bm = Bitmap.createBitmap(500, 500,
 Bitmap.Config.ALPHA_8); // ALPHA_8?
                 Canvas c = new Canvas(bm);
                 Paint paint = new Paint(); // should something be set
 here to get grayscale?
                 c.drawBitmap(bm, 200, 200, paint);
                 bm..getPixels(...); // I want byte/pixel not int/
 pixel ??

 However, I have two questions;

 1) What is ALPHA_8? is that grayscale?

 I have a feeling that the grayscale effect should be done via some
 saturation on the paint object, right?

 2) once I have the Bitmap in grayscale and the right size, what is the
 best way to get that to a byte[] of pixels (one byte per pixel) ?

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



[android-developers] showDialog and dismissDialog behave strangely when changing orientation

2009-05-21 Thread idev

Hi
I am using the showDialog and dismissDialog methods to show progress
dialogs in my app. Moved from creating the dialog and calling show()
on it to using this in order to save state when changing orientation.
But when I change the orientation from portrait-landscape-portrait,
the dismissDialog method call no longer dismisses the dialog. The
dialog stay there all the time and I need to press the back button for
it to disappear.
To overcome this issue, I tried adding a removeDialog in onDestroy so
that the dialog is not created/displayed twice and before orientation
change, the dialog is removed. Tried adding log statements and this is
what happens
05-21 12:35:14.064: DEBUG/MyClass(193): *callingShowDialog
05-21 12:35:14.064: DEBUG/MyClass(193): *onCreareDialog

05-21 12:35:15.385: DEBUG/MyClass(193):
*onSaveInstanceState
05-21 12:35:15.415: DEBUG/MyClass(193): *onDestroy

05-21 12:35:15.585: DEBUG/MyClass(193): *callingShowDialog
05-21 12:35:15.585: DEBUG/MyClass(193): *onCreareDialog
05-21 12:35:15.715: DEBUG/MyClass(193): *onCreareDialog
05-21 12:35:17.214: DEBUG/MyClass(193):
*onSaveInstanceState
05-21 12:35:17.214: DEBUG/MyClass(193): *onDestroy

05-21 12:35:17.275: ERROR/WindowManager(193):
android.view.WindowLeaked: Activity com.android.MyClass has leaked
window com.android.internal.policy.impl.phonewindow$decorv...@43362088
that was originally added here
Some error statements
05-21 12:35:17.395: DEBUG/MyClass(193): *callingShowDialog
05-21 12:35:17.395: DEBUG/MyClass(193): *onCreareDialog
05-21 12:35:17.475: DEBUG/MyClass(193): *onCreareDialog

Initially when the activity is displayed, the onCreateDialog is called
once and on changing the orientation, onSaveInstanceState and
onDestroy are called.
But after that, onCreateDialog is called twice (once by a call to
showDialog which I make, but why the 2nd time?) and this happens every
time I change the orientation hence forth.
Any idea why that happens?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to display list of images in ListView in android?

2009-05-21 Thread Vincent Tsao

i would be retrieving values from sqlite database and have to display
it in a list view...So how should i pass the images out from the
database into the list view(in fact, i only save the image uri in
db).. I am able to save and retrieve images individually and display
it on the screen.But how do i pass a bitmap and display it in a list
view. can you help me with some sample codes please...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] onTouchEvent dont start onScroll!?

2009-05-21 Thread guruk

Hi again :)

I have a GestureListener and while it works perfect in another app of
mine within an extends Activity
I have problem now within an extends View.

public boolean onTouchEvent(MotionEvent me) {   return
gestureScanner.onTouchEvent(me);}
@Override   public boolean dispatchTouchEvent(MotionEvent me) {
gestureScanner.onTouchEvent(me);return super.dispatchTouchEvent(me);}
@Override public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {  /* some calculation here */
return false;}

It jumps first in the dispatchTouchEvent, than onTouchEvent .. but
never in onScroll?!

Only when I make explicit return true in onTouchEvent. But that
brings other mess, because onScroll comes now to often called.

What could be the Problem (as it works fine that way in my app in
extends Activity?

Thanks always for your help...

Chris


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



[android-developers] Conference cal

2009-05-21 Thread suvasish

Is there any way to get information about the participants of a
conference call?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Puzzled by soft keyboard

2009-05-21 Thread blindfold

OK Dianne, thank you for highlighting that the soft keyboard is not a
software keyboard. For me that is a novel insight, as I had hoped and
expected that the IME was (also, at the very least) meant to simply
emulate a software keyboard. Apparently it acts more like a newly
defined virtual input peripheral then. Indeed a paradigm shift for me,
as I simply want to keep on responding to individual key presses and
nothing else.

It would be absolutely fabulous to find some minimal example code of
how to do just that - and only that - with the IME. The soft keyboard
SDK sample is rather intimidating with its hundreds of lines of code
for a rich editing interface, making it hard to extract minimum code
as needed for just capturing individual key presses. I think other
developers would also appreciate this.

Thanks!


On May 21, 10:43 am, Dianne Hackborn hack...@android.com wrote:
 It's not a software keyboard, it is an IME with a rich editing interface
 back to the text editor, including things like showing candidates,
 performing replacement, etc.  For example, as you enter a word, each key you
 enter is actually the IME delivering to the editor a  new candidate text
 string to replace the one currently displayed.  This is actually a pretty
 typical IME interface.

 It is certainly not a design oversight...  though you can simply not give
 the IME an InputConnection, in which case it falls back on delivering raw
 key events (when it can...  for some characters it simply won't be able to)
 and gives the user a crummy editing experience.

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



[android-developers] Re: Alarm issue.

2009-05-21 Thread Gavin

great.

On May 21, 4:51 pm, Mark Murphy mmur...@commonsware.com wrote:
I need every alarm  have different interval time and start time.

 AlarmManager can handle that.

I want to know how many alarms can be set in one application?

 How much memory do you have?

   I need many alarms and at least 1 month interval time in my
  application.

 No you don't.

 You need one periodic alarm for every 24 hours. You then need zero or more
 other alarms to cover the specific events that need to fire at specific
 times within the current day.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Conference Call

2009-05-21 Thread suvasish

Is there any way to get information about the participants of a
conference call?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Block list view item

2009-05-21 Thread Muthu Kumar K.

Hi All,
I have the list view which is having 10 Items. I want to block few
items (Disable). How do i do this? Can any one help me?

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



[android-developers] Re: Puzzled by soft keyboard

2009-05-21 Thread Mark Murphy

 as I simply want to keep on responding to individual key presses and
 nothing else.

At the risk of sounding impertinent: why?

I can see wanting to handle key events outside an EditText, but inside an
EditText, there may be better ways of achieving your application goals
than detecting individual key events.

Part of the problem is that you have given us a very narrow view on what
you are trying to achieve. What sorts of key events are you trying to trap
and what behavior are you trying to do when those events are raised?
Perhaps by giving people a broader perspective on what you are aiming for,
you can get answers that meet your user experience objectives while also
integrate well with the IMEs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-developers] Example of Dataset Observers

2009-05-21 Thread Makeable

Could someone please point me in the direction of utilizing an
observer to update a cursor when I make an update to the database. I'm
a bit confused as to how they work :)

Thank you,

Kind Regards,

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



[android-developers] Re: Block list view item

2009-05-21 Thread for android
http://developer.android.com/reference/android/widget/BaseAdapter.html#isEnabled(int)

On Thu, May 21, 2009 at 2:41 PM, Muthu Kumar K. muthum...@gmail.com wrote:


 Hi All,
 I have the list view which is having 10 Items. I want to block few
 items (Disable). How do i do this? Can any one help me?

 Thanks in Advance,
 Muthu Kumar K.
 


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



[android-developers] Re: How to track down: java.lang.IllegalArgumentException: View not attached to window manager

2009-05-21 Thread Mariano Kamp
Hey Alex,
  thanks for showing an interest ;-)

  I don't have a reference to the dialog. I just use managed dialogs
(showDialog/dimissDialog).

  I guess the solution is to make my error reporter ignore this exception.
It's a bit lame though.

  Also I have half a dozen different stacktraces that show errors where my
app's code is not part of the stacktrace. And it's really hard to debug that
as I have the feeling that also for Cupcake I can't be sure from what
sources the release is built and the line numbers in the stacktrace aren't
that helpful then.

  It doesn't help that some of the stacktraces just show up on Cupcake
builds ;-(

Cheers,
Mariano

On Wed, May 20, 2009 at 7:35 PM, Alexey Krasnoriadtsev 
ale...@agilefusion.com wrote:


 Before calling Dialog.dismiss() try checking whether it is shown,
 isShown();


 On May 19, 10:22 pm, Mariano Kamp mariano.k...@gmail.com wrote:
  Exactly my original point. That's the reason I originally asked this: I
 am
  wondering how to track down this IAE? It doesn't mention my code
  (com.newsrob.*) in the stack trace.
Is there anymore information that I can automatically gather and
 include
  in the bug reports to get a better understanding why this happens?
 
  I just have the stack traces and wonder how to go from there.
 
  Mariano
 
  On Wed, May 20, 2009 at 7:10 AM, Romain Guy romain...@google.com
 wrote:
 
Since Cupcake I have a couple of those issues where I don't see my
 code
   in
the stack trace.
 
   That doesn't mean it's not your code at fault. For instance in this
   case what are you doing with the dialogs and their parent activities?
 
   --
   Romain Guy
   Android framework engineer
   romain...@android.com
 
   Note: please don't send private questions to me, as I don't have time
   to provide private support.  All such questions should be posted on
   public forums, where I and others can see and answer them
 
 
 


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



[android-developers] WMA Streaming.

2009-05-21 Thread Zhubham

Hi Experts,

Can you please give me some idea for changes/modification reqd in
existing Android setup for WMA streaming.

Kindly assist.

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



[android-developers] Re: Puzzled by soft keyboard

2009-05-21 Thread blindfold

Hi Mark,

 At the risk of sounding impertinent: why?

My app is aimed at blind users, and individual key presses form a
basic means to quickly change operating mode during mobile use, such
as to select a color filter by pressing the first character of the
color name, or toggle the color identifier, while also speaking the
pressed key name for confirmation. Works fine with the G1 hardware
keyboard. One does not want to enter complete strings for such quick
mode changes, nor navigate a menu (too slow, too inconvenient). Touch
gestures might make an alternative, but for consistency, and because I
already use touch for other input functions, I just want to emulate
the functionality of phones that have a hardware keyboard, and thus
respond to individual key presses on the soft keyboard. I now added a
dummy EditText to my app's main screen as a means for the blind user
to pop up the soft keyboard and perform a key press, but was next
baffled to find that the soft keyboard functioned as a software
keyboard for digits, but not for letters, thus breaking my app on
phones that lack a hardware keyboard. Moreover, even when entering
strings, the blind user needs speech feedback for each character
pressed, to be notified of typos. I hope this clarifies why I am
seeking a simple way to pop up the soft keyboard and get events with
individual key presses for all the keys that show up on the screen,
including all digits and letters. Hopefully such basic functionality
is possible without adding a lot of dedicated IME code? Indeed I would
not mind using a touch event to pop up the soft keyboard instead of
using an EditText, as long as I can next get those individual key
presses.

Thanks

On May 21, 11:31 am, Mark Murphy mmur...@commonsware.com wrote:
  as I simply want to keep on responding to individual key presses and
  nothing else.

 At the risk of sounding impertinent: why?

 I can see wanting to handle key events outside an EditText, but inside an
 EditText, there may be better ways of achieving your application goals
 than detecting individual key events.

 Part of the problem is that you have given us a very narrow view on what
 you are trying to achieve. What sorts of key events are you trying to trap
 and what behavior are you trying to do when those events are raised?
 Perhaps by giving people a broader perspective on what you are aiming for,
 you can get answers that meet your user experience objectives while also
 integrate well with the IMEs.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] why 480*320 png doesn't fit on landscape full screen

2009-05-21 Thread zeeshan

Hi Experts,

i am trying to display 480*320 image in fill_parent width and height
but it doesn't fit on full screen.
image seems a bit smaller in width.

do i need to change resolution or something else, please advise


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



[android-developers] Re: PNG Color Issue

2009-05-21 Thread Tony Wu

Dear Romain Guy,
I had tried to make a pre-dithering image by Photoshop tools save for
web and device and specify PNG-8 128 Dithered to my image, but it
still didn't work.
Can you show me the guideline how to make a proper image by Photoshop
for Android??

Thank you very much!

On 5月20日, 上午4時34分, Romain Guy romain...@google.com wrote:
 This happens because Android renders images using a 16 bits color
 depth, which causes banding in your case. You can reduce banding by
 enabling dithering on your drawing or better yet, by pre-dithering the
 image using Photoshop or any graphics editor that can do that.



 On Tue, May 19, 2009 at 2:25 AM, Tony Wu supe...@gmail.com wrote:

  Once I want to put the pictures in my application, I meet this
  problem.
  The color presented by Android device or emulator was different from
  the original png files.
  I made a simple application to present the two pictures in one page
  and I fetch the picture as the following link:

 http://picasaweb.google.com/lh/photo/Rj5L_x_Z1IJGfGLmZV2B7g?feat=dire...

  And the following two links were the original png files:

 http://picasaweb.google.com/lh/photo/WJahLJ7uMRk2dA9GhYjs-Q?feat=dire...
 http://picasaweb.google.com/lh/photo/0ddqAeWxd957SAVelwu_jA?feat=dire...

  Can anyone explain it for me why it presented in different color??

  By the way, the picture was made in 32bit colors png format.

  Thanks  Regards

  Tony

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to let users send bug reports

2009-05-21 Thread Michael Bollmann

I guess most of you know the problem.
Some user got a problem and posts it at comment with no change to
reply or reach them for details.

So i wrote a class to send bug reports from within my android
application directly to my bugtracking account at http://lighthouseapp.com/.

Using it is pretty straightforward:
TicketSender.init(APIToken,AccountName,ProjectID);
TicketSender.i().send(f...@bar.com,got a problem,your app is force
closing);
TicketSender.i().deinit();

This creates a new issue that contains the users email in it's title.
APIToken can be generated at lighthouseapp.com and is used for
authentication.

If you don't know http://lighthouseapp.com/ they also got a free
account to try them.
They also integrate nicely with http://beanstalkapp.com/ for
subversion hosting which also offers a free account.

here is the source
http://pastebin.com/f36965d3a

Suggested improvements:
-make the HTTP Post request non-blocking
-attach recent logcat output to the bug report
-add an activity and make it an android library like ScoreNinja so
applications can send reports without the need of
android.permission.INTERNET

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



[android-developers] Re: How to let users send bug reports

2009-05-21 Thread Mariano Kamp
Very nice.
What would be really cool if the OS would provide this kind of functionality
*and* does this in a central way, so that all bugs go through a central
instance. It would be great if the framework developers would get a feel for
how often a bug occurs. And maybe that would also lead to better code, e.g.
more assertions checked.

On Thu, May 21, 2009 at 12:36 PM, Michael Bollmann 
michael.bollm...@googlemail.com wrote:


 I guess most of you know the problem.
 Some user got a problem and posts it at comment with no change to
 reply or reach them for details.

 So i wrote a class to send bug reports from within my android
 application directly to my bugtracking account at
 http://lighthouseapp.com/.

 Using it is pretty straightforward:
 TicketSender.init(APIToken,AccountName,ProjectID);
 TicketSender.i().send(f...@bar.com,got a problem,your app is force
 closing);
 TicketSender.i().deinit();

 This creates a new issue that contains the users email in it's title.
 APIToken can be generated at lighthouseapp.com and is used for
 authentication.

 If you don't know http://lighthouseapp.com/ they also got a free
 account to try them.
 They also integrate nicely with http://beanstalkapp.com/ for
 subversion hosting which also offers a free account.

 here is the source
 http://pastebin.com/f36965d3a

 Suggested improvements:
 -make the HTTP Post request non-blocking
 -attach recent logcat output to the bug report
 -add an activity and make it an android library like ScoreNinja so
 applications can send reports without the need of
 android.permission.INTERNET

 Hope you find it useful
 Michael
 


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



[android-developers] WebView.capturePicture() picture.writeToStream

2009-05-21 Thread otiasj

Hello,
I am trying to save a Picture that I got from webview.capturePicture
().

However from time to time for certain url the Picture saved is missing
some images...

I am saving/loading the Picture using writeToStream/createFromStream.

Is there any webview setting that I am missing?


here is the important part of the code :

@Override
public boolean onCreatePanelMenu(int featureId, Menu menu)
{
menu.add(Menu.NONE, 4545, 0, load Url);
menu.add(Menu.NONE, 4546, 1, direct display of the
picture); //works correctly
menu.add(Menu.NONE, 4547, 1, save pic);
menu.add(Menu.NONE, 4548, 1, load pic); //some images are
missing!
return true;
}

@Override
public boolean onMenuItemSelected(int featureId, MenuItem item)
{
int id = item.getItemId();
if (id == 4545)
{
webView.loadUrl(http://www.misterdonut.jp/misdoclub/
index.html);
return true;
}
if (id == 4546)
{
MyImageView img = (MyImageView)findViewById(R.id.ImageView);
Picture pic = webView.capturePicture();

//this will call canvas.drawPicture(pic) on the next ondraw
call
img.setPicture(pic);

return true;
}
if (id == 4547)
{
Picture pic = webView.capturePicture();

//save the picture to a file
OutputStream os;
try {
Log.e(WebClient,  Start saving);
os = this.openFileOutput(testPicture,
ontext.MODE_WORLD_READABLE);
pic.writeToStream(os);
os.flush();
os.close();
Log.e(WebClient, Finished saving);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return true;
}

if (id == 4548)
{
//load and display the picture from a file
MyImageView img = (MyImageView)findViewById(R.id.ImageView);
InputStream is;
try {
is = this.openFileInput(testPicture);
Picture pic2 = Picture.createFromStream(is);

//this will call canvas.drawPicture(pic) on the next 
ondraw
call
img.setPicture(pic2);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
return true;
}
}

Thank you for the help!!

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



[android-developers] Has the final android 1.5 sdk released?

2009-05-21 Thread Android Users
Hi all,
Has the final android 1.5 sdk released? I found in a post that the there was
a packaging bug related to Geocoding in android 1.5, so wanted to know
whether that issue has been fixed or not.

http://groups.google.com/group/android-developers/browse_thread/thread/79f94e31e647db60#

Appreciate a quick response.

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



[android-developers] Re: Removing/adding activities from/to an ActivityGroup

2009-05-21 Thread Android Users
Just a guess. Try destroying the activity B without destroying activity A.
This may resume the activity A as soon as the activity B is destroyed.

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



[android-developers] Main and three binder threads are running after application close

2009-05-21 Thread olko

My application starts a remote service and binds to it. If I close the
application with the back button there are still some threads
running (listed in the Debug View of Eclipse) - main thread, and three
Binder threads.
In onDestroy() I call unbindService(service_connection) - is there
something else to clean up?

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



[android-developers] Re: How to display list of images in ListView in android?

2009-05-21 Thread Vincent Tsao
nevermind, i have found the solution, here is a good example to bind the
SimpleCursorAdapter to a ListView :
 http://ambiguiti.es/2009/04/making-custom-rows-in-android-listviews/

On Thu, May 21, 2009 at 5:01 PM, Vincent Tsao caojunvinc...@gmail.comwrote:

 i'd like to create a new adapter which extends SimpleCursorAdapter, any
 sample code to help?


 On Thu, May 21, 2009 at 4:57 PM, Vincent Tsao caojunvinc...@gmail.comwrote:


 i would be retrieving values from sqlite database and have to display
 it in a list view...So how should i pass the images out from the
 database into the list view(in fact, i only save the image uri in
 db).. I am able to save and retrieve images individually and display
 it on the screen.But how do i pass a bitmap and display it in a list
 view. can you help me with some sample codes please...
 



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



[android-developers] Re: RESTful user authentication

2009-05-21 Thread Tom

Hi,

I would like to know if you had some answers to your question.
I'm developping an Android application wich uses a restFul webservice
too.
The schem of the application is pretty close to yours. Indeed Android
app ask a RestFul WS (in Java RestLet) in order to communicate some
datas...
Moreover, I use Json parsing between both applications.

Had you get some others helps?

Best regards
Tom


On 1 avr, 20:37, Wouter wouterg...@gmail.com wrote:
 Désolé, je n'ai jamais créé un service Web avant.
 Je ne veux utiliser ce service web maintenant à envoyer des requêtes HTTP 
 (HTTP
 HTTP POST et GET) dans mon application Google Android.
 Si un utilisateur de connexion à ma demande (avec nom d'utilisateur et mot de 
 passe) de la
 nom d'utilisateur et votre mot de passe sera envoyé à mes
 service web et vérifier si cela est juste? Mais comment puis-je faire en 
 premier?
 Chaque utilisateur doit d'abord créer un compte utilisateur
 et avec ce nom d'utilisateur, il peut se connecter à l'application. Et, pour 
 chaque
 spécifiques à l'utilisateur de données différentes pourraient être sauvées.

 Je vais expliquer ma demande plus en détail:
 Je développe une petite application réseau social où un utilisateur peut
 login et envoyer des photos et voir des photos sur cette carte (avec la 
 géolocalisation).
 Il peut également sauver sa propre situation et de faire des repères sur une 
 carte. Tous
 ces choses doivent être enregistrées dans une base de données. Et avec HTTP 
 GET i would
 demande toutes les données que je veux JSON ou XML et l'analyse de mon
 application.

 Pouvez-vous m'aider,

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



[android-developers] Re: How to solve G1/HTC Magic not recognized by ADB under Windows

2009-05-21 Thread Cédric Berger
On Thu, May 21, 2009 at 09:22, Al Sutton a...@funkyandroid.com wrote:

 5) Hey presto... the device is now there :) :) :).

 Thanks to everyone who helped fix this.

 Al.



cool.

I had asked HTC if they had drivers...

their answer :-( :


You recently wrote us about an issue that you have encountered with your htc
To clarify your issue, you stated that: you would like to install usb driver
in Google android SDK 1.5. – Unfortunately we do not do the developer
support and we are unable to answer your question. If the above steps do not
resolve your issue, we invite you to visit the support area on our Web site.
Please go to: http://www.htc.com/www/support.aspx 


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



[android-developers] HTC Magic not supporting Maps.

2009-05-21 Thread Android Users
Hi all,
HTC Magic that i have is not supporting Maps(no maps application also). I
checked in the ddms, and it does not contain maps.jar.
Is there any cupcake update which i can use to update the device to support
maps?

Wating for a quick response. Its urgent.
Thanks in advance.

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



[android-developers] Resources causing IndexOutOfBoundsException

2009-05-21 Thread Carter

Hi,

I've started seeing a lot of weird crashes from users' phones
regarding an IndexOutOfBoundsException around loading String
resources.  One example is reproduced below.  This began with Android
1.5, build 147201.

Any ideas what is going on?

Thanks,
Carter


java.lang.IndexOutOfBoundsException: setSpan (10 ... 16) ends beyond
length 13
at android.text.SpannableStringInternal.checkRange
(SpannableStringInternal.java:349)
at android.text.SpannableStringInternal.setSpan
(SpannableStringInternal.java:77)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at android.content.res.StringBlock.applyStyles(StringBlock.java:151)
at android.content.res.StringBlock.get(StringBlock.java:106)
at android.content.res.AssetManager.getResourceText(AssetManager.java:
142)
at android.content.res.Resources.getText(Resources.java:151)
at android.content.Context.getText(Context.java:138)
at edu.mit.locale.ui.activities.Locale$6.onMenuItemClick(Locale.java:
336)
at com.android.internal.view.menu.MenuItemImpl.invoke
(MenuItemImpl.java:133)
at com.android.internal.view.menu.MenuBuilder.performItemAction
(MenuBuilder.java:813)
at com.android.internal.view.menu.IconMenuView.invokeItem
(IconMenuView.java:519)
at com.android.internal.view.menu.IconMenuItemView.performClick
(IconMenuItemView.java:122)
at android.view.View.onTouchEvent(View.java:3828)
at android.widget.TextView.onTouchEvent(TextView.java:6291)
at android.view.View.dispatchTouchEvent(View.java:3368)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
at com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3948)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
at dalvik.system.NativeStart.main(Native Method)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Repeat Events in Calendar

2009-05-21 Thread farida

If we add a repeat event in the calendar, we are unable to get the end
day till when the event shall last. There is field duration in the
events table in the database which gives us an encoded format string
like P300S for repititive events. We are unable to decode as to what
this string will mean. Can any body help us with this Query?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: EMMA Code coverage and JUnit

2009-05-21 Thread Deeps

Felipe Ramos,

Did u end up somewhere..? I am not able to go ahead with this..

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



[android-developers] Re: Removing/adding activities from/to an ActivityGroup

2009-05-21 Thread Taísa Cristina
Didn't work... if I only start B and after destroy B without destryoing A,
nothing happens to A.
But looking at TabHost implementation I could see what I was forgetting:
requestFocus!

When I request focus for B, A is automatically paused. To resume it, I start
it again (as it's a single top activity).
\o/

Thanks a lot for the attention!

On Thu, May 21, 2009 at 8:48 AM, Android Users androidmai...@gmail.comwrote:

 Just a guess. Try destroying the activity B without destroying activity A.
 This may resume the activity A as soon as the activity B is destroyed.

 



-- 
Taísa Cristina Costa dos Santos
Computer Engineer
Brazil, SP

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



[android-developers] AppWidget Updates From Service - Not Pushed to UI

2009-05-21 Thread nEx.Software

So, I have an AppWidget that  am working on and am wondering if I am
expecting something it isn't supposed to do, or if I am doing
something wrong. Basically, I have an AppWidget that spawns a
background thread to retrieve data (a la Jeff Sharkey's Sky widget)
but what I am finding is that while the phone is in sleep mode (the
screen is off) I am not getting any UI updates on the default home
screen. I have logging in several parts of the update service and have
confirmed that the updates themselves are being run, but when I turn
the screen back on and go the the Widget on my home screen it still
has the old data. I've tried simply waiting a little, I've tried doing
other things and then going back the the Home screen, it never updates
despite continued requests from the background thread until I manually
refresh it. My manual refresh and update service run the exact same
functions.

In my update alarm I have the following:
AlarmManager alarmManager = (AlarmManager)getSystemService
(Context.ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP, (System.currentTimeMillis()
+ updateFrequency), pendingIntent);


Any help would be appreciated.

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



[android-developers] Re: Geocoder not returning results in 1.5 preview

2009-05-21 Thread Android Users
Any help on this as this is stopping our work. Searched in all android
forums, but no luck.. :(

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



[android-developers] Re-register AlarmManager events on upgrades

2009-05-21 Thread Michael Bollmann

Dianne Hackborn said the following a while ago:
Fwiw, cupcake will add a new field to PACKAGE_ADDED to tell you if this was
due to an update, and allow this broadcast to be received by the app to
restart itself.

But it still seems that the application that gets upgraded doesn't
receive this intent.

So the situation stays the same:
-you release an update
-it gets installed a few thousand time
-some users start the app manually some user do not and get mad
because the app seems not to work correctly anymore

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



[android-developers] Re: Geocoder not returning result

2009-05-21 Thread Android Users
Any help on this as this is stopping our work. Searched in all android
forums, but no luck.. [?]

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

inline: 323.png

[android-developers] Re: Problem installing application onto HTC Magic

2009-05-21 Thread Android Users
Any help on this as this is stopping our work. Searched in all android
forums, but no luck.. [?]

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

inline: 323.png

[android-developers] upgrade testing

2009-05-21 Thread AusR

does the command:
adb install -r appname.apk

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



[android-developers] Always-showing view among activities

2009-05-21 Thread Taísa Cristina
Hi all!

Is there a way to have a view always-showing between activities?
I say, I need a button to be always appearing on the bottom of the screen.

I could get it working with an ActivityGroup, but I got a problem. My
application can work with more than one level of activities, or rather,
Activity A can start acitivity B that can start Activity C, all them with
the button showing in the bottom. When I press Back, I need activity C to
finish and the focus to go back to B, but as I'm using an ActivityGroup, it
does not work.

Is there another way to do that?

Thanks,

Taísa

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



[android-developers] Re: problem when debugging android application with eclipse

2009-05-21 Thread Daliang Luo
Hi Raphael,
Can you hear me ...

2009/5/18 Daliang Luo luodali...@gmail.com


 Hi Raphael,
 I try what you have said tonight and it seems like eclipse has connected to
 emulator. And I can see the logs coming out, but eclipse still reminds me
 error:

 Exception in thread main java.lang.UnsatisfiedLinkError:
 android.os.process.setArgV0[Ljava/lang/String;]V
 at android.os.process.setArgV0(Native.Method)
 at android.app.Activity Thread.main(ActivityThread.java:3753)
 I guess this is not mistake about my source code but some thing about my
 debugging environment. Is there any thing I haven't concern with?

 Thanks again. :-)

 Nio

 2009/5/17 Raphael r...@android.com


 Are you talking about the DDMS perspective or the standalone DDMS?

 If you use eclipse, do not use the standalone DDMS program, use the
 DDMS perspective from within Eclipse.
 If you do that you do not need to manually select the program in the
 DDMS process list, the Eclipse plugin can automatically stop at
 breakpoints that you set in Eclipse. Just make sure you start your
 session using one of the Run  Debug option (if you select Run  Run,
 it won't stop on breakpoints.)

 R/

 On Thu, May 14, 2009 at 10:15 PM, Nio luodali...@gmail.com wrote:
 
  Hi there,
  I am trying to debug android source code with ecliplse. And I can see
  that eclipse has connect to emulator via ddms. And I can see the log
  coming out from eclipse, but when I select an process in DDMS, and
  trying to debug the process, process can't stop on the breakpoint I
  have set.
 
  I think there might be some thing incorrect somewhere. Can anybody
  give some advice?
  Thanks.
 
  Nio
  
 

 




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



[android-developers] Re: why 480*320 png doesn't fit on landscape full screen

2009-05-21 Thread Robert Green

It depends on your layout.  probably the parent container is what is
too small somehow.  If you try putting that image into an empty frame
or absolute layout, it'll probably fill it right up.

Check for margins, padding or other things that could make the
container in the layout be smaller than you want.  Posting the layout
would probably be helpful for us.

Thanks

On May 21, 5:20 am, zeeshan genx...@gmail.com wrote:
 Hi Experts,

 i am trying to display 480*320 image in fill_parent width and height
 but it doesn't fit on full screen.
 image seems a bit smaller in width.

 do i need to change resolution or something else, please advise

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



[android-developers] Re: Very strange StackOverflow exception

2009-05-21 Thread Streets Of Boston

But I'm confident I don't deal with so much levels.
I count about 30 draw() calls on either ViewGroup or FrameLayout in
the stack.
You are dealing with quite a number of levels... probably too many of
them.

On May 21, 4:44 am, Vince vincent.gann...@gmail.com wrote:
 Hi fadden,

 Here is the stack trace:

 05-21 08:38:08.050: ERROR/AndroidRuntime(952): Uncaught handler:
 thread main exiting due to uncaught exception
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):
 java.lang.StackOverflowError
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.text.StaticLayout.init(StaticLayout.java:97)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.text.StaticLayout.init(StaticLayout.java:54)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.text.StaticLayout.init(StaticLayout.java:45)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.widget.TextView.makeNewLayout(TextView.java:4769)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.widget.TextView.assumeLayout(TextView.java:4669)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.widget.TextView.onDraw(TextView.java:3753)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.View.draw(View.java:5838)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1486)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.View.draw(View.java:5944)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.widget.FrameLayout.draw(FrameLayout.java:352)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.View.buildDrawingCache(View.java:5617)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.View.getDrawingCache(View.java:5458)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1422)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.View.draw(View.java:5841)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.widget.FrameLayout.draw(FrameLayout.java:352)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1486)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1484)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.View.draw(View.java:5841)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.widget.FrameLayout.draw(FrameLayout.java:352)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.drawChild(ViewGroup.java:1486)
 05-21 08:38:08.098: ERROR/AndroidRuntime(952):     at
 android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
 05-21 

[android-developers] Re: showDialog and dismissDialog behave strangely when changing orientation

2009-05-21 Thread Streets Of Boston

Where do you call the showDialog()? In the onCreate?

(Note that there is a known issue with the onPrepareDialog that is not
called properly when a configuration change has occurred in your app.)

On May 21, 4:53 am, idev ideveloper...@gmail.com wrote:
 Hi
 I am using the showDialog and dismissDialog methods to show progress
 dialogs in my app. Moved from creating the dialog and calling show()
 on it to using this in order to save state when changing orientation.
 But when I change the orientation from portrait-landscape-portrait,
 the dismissDialog method call no longer dismisses the dialog. The
 dialog stay there all the time and I need to press the back button for
 it to disappear.
 To overcome this issue, I tried adding a removeDialog in onDestroy so
 that the dialog is not created/displayed twice and before orientation
 change, the dialog is removed. Tried adding log statements and this is
 what happens
 05-21 12:35:14.064: DEBUG/MyClass(193): *callingShowDialog
 05-21 12:35:14.064: DEBUG/MyClass(193): *onCreareDialog

 05-21 12:35:15.385: DEBUG/MyClass(193):
 *onSaveInstanceState
 05-21 12:35:15.415: DEBUG/MyClass(193): *onDestroy

 05-21 12:35:15.585: DEBUG/MyClass(193): *callingShowDialog
 05-21 12:35:15.585: DEBUG/MyClass(193): *onCreareDialog
 05-21 12:35:15.715: DEBUG/MyClass(193): *onCreareDialog
 05-21 12:35:17.214: DEBUG/MyClass(193):
 *onSaveInstanceState
 05-21 12:35:17.214: DEBUG/MyClass(193): *onDestroy

 05-21 12:35:17.275: ERROR/WindowManager(193):
 android.view.WindowLeaked: Activity com.android.MyClass has leaked
 window com.android.internal.policy.impl.phonewindow$decorv...@43362088
 that was originally added here
 Some error statements
 05-21 12:35:17.395: DEBUG/MyClass(193): *callingShowDialog
 05-21 12:35:17.395: DEBUG/MyClass(193): *onCreareDialog
 05-21 12:35:17.475: DEBUG/MyClass(193): *onCreareDialog

 Initially when the activity is displayed, the onCreateDialog is called
 once and on changing the orientation, onSaveInstanceState and
 onDestroy are called.
 But after that, onCreateDialog is called twice (once by a call to
 showDialog which I make, but why the 2nd time?) and this happens every
 time I change the orientation hence forth.
 Any idea why that happens?
 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Messaging between 2 threads

2009-05-21 Thread Streets Of Boston

Take a look at the OpenGL API Demo source examples. I think it's
called Kube or someting.
It provides a Game-thread that is set up to receive messages which
then can be executed synchronously on the game-thread (posting
Runnables on a queue that is managed by the Game-thread).


On May 21, 3:54 am, latha...@gmail.com latha...@gmail.com wrote:
 Hi All

 I am writing an application in which i need to handle messages between
 the main thread(the deafult UI related thread) and the user created
 Gamethread.

 The requirement is like this.

 An activity(say Activity_X) is setting the view by setContentView
 (some View_Y). In Activity_X i have implemeted
 onCreateOptionsMenu() and onOptionsItemSelected() fucntions for
 creating menus  a switch case for action to be taken on selecting
 those menus.Menu has items like resume/pause/zoom/ .

 All action to be take on selecting these menus are implemented in
 View_Y in a separate Gamethread by extending Thread class.

 So whenever a menu is selected in Activity_X i need to send a
 message to View_Y. And on receiving this ,a particular action/method
 should be called in View_Y(GameThread).

 How can i achieve this using Handlers?Is there any other way of doing
 this? Please do share with me some code snippets for these.
 Your advises are highly appreciable. Thank you for your time.

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



[android-developers] Re: why 480*320 png doesn't fit on landscape full screen

2009-05-21 Thread zeeshan

well, i am not using any margin or padding.
please take a look on my code below:

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android

android:layout_width=fill_parent
android:layout_height=fill_parent


ImageView android:id=@+id/Image
android:layout_width=fill_parent
android:layout_height=fill_parent

/

/LinearLayout

ImageView imageView;
 imageView=(ImageView)findViewById(R.id.Image);
InputStream is;
try {
is = getAssets().open(cover.png);

Bitmap bm = BitmapFactory.decodeStream(is);
imageView.setImageBitmap(bm);


} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

///

image size is 480*320




On May 21, 2:42 pm, Robert Green rbgrn@gmail.com wrote:
 It depends on your layout.  probably the parent container is what is
 too small somehow.  If you try putting that image into an empty frame
 or absolute layout, it'll probably fill it right up.

 Check for margins, padding or other things that could make the
 container in the layout be smaller than you want.  Posting the layout
 would probably be helpful for us.

 Thanks

 On May 21, 5:20 am, zeeshan genx...@gmail.com wrote:

  Hi Experts,

  i am trying to display 480*320 image in fill_parent width and height
  but it doesn't fit on full screen.
  image seems a bit smaller in width.

  do i need to change resolution or something else, please advise

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



[android-developers] Re: Redirecting to market search URL doesn't work

2009-05-21 Thread Streets Of Boston

Have you tried this?:
market://search/?q=pname:com.yourapppackage.something

On May 19, 4:38 pm, orangechicken therealdave.my...@gmail.com wrote:
 To pretty up the URL we have on our site a URL /get/g1. It redirects
 to our market.android.com/search URL, 
 eghttp://market.android.com/search?q=pname:ourappname.

 However, going to that link in the G1 browser results in a 404 instead
 of opening the Market to our app.

 Questions:
 1. Is this a known issue?
 2. Does the browser preprocess links on the page but not intercept
 them in a redirect?

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



[android-developers] Floating View

2009-05-21 Thread skyman

Hello,

Im trying to create Custom Dialog/Activity looking simmilar to Maps-
Directions.
I've tried to make it like in the Browsers find dialog but I've always
Dialog's title (or empty space) and border.
I also want to place AutoCompleteTextView in this Dialog/Activity. How
can I force list with suggested input to be shown over the EditText?

Thanks in advance.

Skyman

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



[android-developers] TimerTask and Views

2009-05-21 Thread Mooncat

Is it a no-no to try to update a View from a TimerTask? My initial
experiments indicate it doesn't work. Is there a way to make it work?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how can i put 15MB images in my App?

2009-05-21 Thread zeeshan

Hi,

i am afraid if Max space for android App is 14MB , how can i put 15MB
images in my App.
my application includes more than 500 PNG images which are
confidentials and cann't be put on sd card. i need to put them in my
assets.

is it something that can not be achieved in android?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] emulator: warning: opening audio output failed

2009-05-21 Thread David Baum
I'm using Linux Ubuntu.
When opening the emulator I get this message.

My sound output is done through ALSA Mixer.

Any solutions?

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



[android-developers] Re: showDialog and dismissDialog behave strangely when changing orientation

2009-05-21 Thread iDeveloper

Not in the onCreate implementation. I am calling it on a button's  
click event. And the button is sort of a refresh button. So it might  
be pressed multiple times.



On 21-May-09, at 7:57 PM, Streets Of Boston wrote:


 Where do you call the showDialog()? In the onCreate?

 (Note that there is a known issue with the onPrepareDialog that is not
 called properly when a configuration change has occurred in your app.)

 On May 21, 4:53 am, idev ideveloper...@gmail.com wrote:
 Hi
 I am using the showDialog and dismissDialog methods to show progress
 dialogs in my app. Moved from creating the dialog and calling show()
 on it to using this in order to save state when changing orientation.
 But when I change the orientation from portrait-landscape-portrait,
 the dismissDialog method call no longer dismisses the dialog. The
 dialog stay there all the time and I need to press the back button  
 for
 it to disappear.
 To overcome this issue, I tried adding a removeDialog in onDestroy so
 that the dialog is not created/displayed twice and before orientation
 change, the dialog is removed. Tried adding log statements and this  
 is
 what happens
 05-21 12:35:14.064: DEBUG/MyClass(193):  
 *callingShowDialog
 05-21 12:35:14.064: DEBUG/MyClass(193): *onCreareDialog

 05-21 12:35:15.385: DEBUG/MyClass(193):
 *onSaveInstanceState
 05-21 12:35:15.415: DEBUG/MyClass(193): *onDestroy

 05-21 12:35:15.585: DEBUG/MyClass(193):  
 *callingShowDialog
 05-21 12:35:15.585: DEBUG/MyClass(193): *onCreareDialog
 05-21 12:35:15.715: DEBUG/MyClass(193): *onCreareDialog
 05-21 12:35:17.214: DEBUG/MyClass(193):
 *onSaveInstanceState
 05-21 12:35:17.214: DEBUG/MyClass(193): *onDestroy

 05-21 12:35:17.275: ERROR/WindowManager(193):
 android.view.WindowLeaked: Activity com.android.MyClass has leaked
 window com.android.internal.policy.impl.PhoneWindow 
 $decorv...@43362088
 that was originally added here
 Some error statements
 05-21 12:35:17.395: DEBUG/MyClass(193):  
 *callingShowDialog
 05-21 12:35:17.395: DEBUG/MyClass(193): *onCreareDialog
 05-21 12:35:17.475: DEBUG/MyClass(193): *onCreareDialog

 Initially when the activity is displayed, the onCreateDialog is  
 called
 once and on changing the orientation, onSaveInstanceState and
 onDestroy are called.
 But after that, onCreateDialog is called twice (once by a call to
 showDialog which I make, but why the 2nd time?) and this happens  
 every
 time I change the orientation hence forth.
 Any idea why that happens?
 Thanks
 


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



[android-developers] Re: why 480*320 png doesn't fit on landscape full screen

2009-05-21 Thread bwilliam...@gmail.com

Do you have a title bar?  That takes up space.  So does the status bar
(the one that shows time, signal, battery life, notifications, etc).

On May 21, 6:20 am, zeeshan genx...@gmail.com wrote:
 Hi Experts,

 i am trying to display 480*320 image in fill_parent width and height
 but it doesn't fit on full screen.
 image seems a bit smaller in width.

 do i need to change resolution or something else, please advise

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



[android-developers] Re: play sound issue

2009-05-21 Thread Dave Sparks

I can't tell from your code snippet what you are trying to do.
However, I suggest you try using SoundPool. It's designed for this
kind of use.

On May 21, 12:53 am, Sukitha Udugamasooriya suk...@gmail.com wrote:
 Hi,

 In my application i'm playing a 1 second sound clip when the user
 clicks on a button. after that a mall thread sleep then i have
 assigned a small animation to the particular button. (500ms
 duration).
 Animation works fine without sound. But when I put sound the animation
 is not consistent.

 Why is that?

                 mp = MediaPlayer.create(this, R.raw.over);
                 try {
                         mp.prepare();
                 } catch (IOException e) {
                         Log.w(EXCEPTION, IO);
                         e.printStackTrace();
                 }

 Do i need to start sound on  a different thread?
 Is there anything to concern regarding this?

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



[android-developers] Re: TimerTask and Views

2009-05-21 Thread Streets Of Boston

If i'm not mistaken, TimerTasks run on a thread encapsulated in a
Timer object.
Since you can't reliably call most (if not all) UI/View related
methods from any other thread than the main gui-thread, you have to
post back (using a handler) back to the main gui-thread.

I've never tried this using TimerTask, but it may work :=) :
- Create your TimerTask subclass that has access to Handler or to your
View.
- In the 'public void run' method, call post on this handler or view
to do what you want.

@Override
protected void onCreate(Bundle b) {
  ...
  ...
  final Handler handler = new Handler();
  final Runnable doUpdateView = new Runnable() {
public void run() {
  ... do something with your view ...
}
  }

  TimerTask myTimerTask = new TimerTask() {
public void run() {
handler.post(doUpdateView);
}
  }

  ...
  mTimer.scheduleAtFixedRate(myTimerTask, 0, 1000);
  ...

}

On May 21, 10:38 am, Mooncat sunns...@gmail.com wrote:
 Is it a no-no to try to update a View from a TimerTask? My initial
 experiments indicate it doesn't work. Is there a way to make it work?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: remove drop icon in expandablelist

2009-05-21 Thread Marco Nelissen
ExpandableListView.setGroupIndicator() ?


On Thu, May 21, 2009 at 12:06 AM, sleith raysle...@gmail.com wrote:


 hi,
 is there anyway to remove the default drop down icon on
 ExpandableList?

 thx
 


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



[android-developers] Re: EMMA Code coverage and JUnit

2009-05-21 Thread Felipe Ramos

Hi deeps,

I'm stuck on the point where I need to run the instrumented tests on
the emulator. I could not find a way yet to make the emulator believe
that the emma.jar is already installed on it.

Also, I don't know if there is a way of enabling EMMA instrumentation
using the SDK. I have not tried that yet. I'm using the android full
source, compiling it from scratch. I think I'm close, at least to run
it on the emulator, but on this past week I was too busy and could not
investigate more about this issue. I'm planning to put everything I
know on a blog or something like that, at least to help the other
developers that are trying to make EMMA work on Android, since I could
not find relevant references on this matter from the Google guys.

I'll send later a step by step of what I made up to now... I'm
currently at my job, so I don't have much time to write right now.

BR

Felipe

On May 21, 10:00 am, Deeps l.prade...@gmail.com wrote:
 Felipe Ramos,

 Did u end up somewhere..? I am not able to go ahead with this..

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



[android-developers] Re: Very strange StackOverflow exception

2009-05-21 Thread Vince

Indeed, you're right. Which does not explain why a single character
can cause the all app to crash :-(

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



[android-developers] Re: how can i put 15MB images in my App?

2009-05-21 Thread Dianne Hackborn
You can put them in your .apk without restriction, just don't load them all
at the same time.

On Thu, May 21, 2009 at 7:59 AM, zeeshan genx...@gmail.com wrote:


 Hi,

 i am afraid if Max space for android App is 14MB , how can i put 15MB
 images in my App.
 my application includes more than 500 PNG images which are
 confidentials and cann't be put on sd card. i need to put them in my
 assets.

 is it something that can not be achieved in android?
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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



[android-developers] Re: Puzzled by soft keyboard

2009-05-21 Thread Dianne Hackborn
If you are having this text put into an EditText, there are all kinds of
APIs on that to get callbacks when the text is modified.  I would strongly
recommend using those instead of any kind of raw event interception: keep in
mind that there will be future devices with all kinds of keyboard
configurations, using various key sequences to generate the actual
characters (think 12 kit, 1/2 qwerty, etc) so unless you are using the full
key character map class you likely not work there either.

If you leave your UI without an EditText in focus, the user can long press
on the MENU key to force the soft keyboard to be displayed (or you can call
the API to show it yourself), and then you are in the situation I already
described: no InputConnection, so text coming from the IME is turned into
raw key events, with lower fidelity support of IME features, but
compatibility with existing apps that are looking for key events.

On Thu, May 21, 2009 at 3:15 AM, blindfold seeingwithso...@gmail.comwrote:


 Hi Mark,

  At the risk of sounding impertinent: why?

 My app is aimed at blind users, and individual key presses form a
 basic means to quickly change operating mode during mobile use, such
 as to select a color filter by pressing the first character of the
 color name, or toggle the color identifier, while also speaking the
 pressed key name for confirmation. Works fine with the G1 hardware
 keyboard. One does not want to enter complete strings for such quick
 mode changes, nor navigate a menu (too slow, too inconvenient). Touch
 gestures might make an alternative, but for consistency, and because I
 already use touch for other input functions, I just want to emulate
 the functionality of phones that have a hardware keyboard, and thus
 respond to individual key presses on the soft keyboard. I now added a
 dummy EditText to my app's main screen as a means for the blind user
 to pop up the soft keyboard and perform a key press, but was next
 baffled to find that the soft keyboard functioned as a software
 keyboard for digits, but not for letters, thus breaking my app on
 phones that lack a hardware keyboard. Moreover, even when entering
 strings, the blind user needs speech feedback for each character
 pressed, to be notified of typos. I hope this clarifies why I am
 seeking a simple way to pop up the soft keyboard and get events with
 individual key presses for all the keys that show up on the screen,
 including all digits and letters. Hopefully such basic functionality
 is possible without adding a lot of dedicated IME code? Indeed I would
 not mind using a touch event to pop up the soft keyboard instead of
 using an EditText, as long as I can next get those individual key
 presses.

 Thanks

 On May 21, 11:31 am, Mark Murphy mmur...@commonsware.com wrote:
   as I simply want to keep on responding to individual key presses and
   nothing else.
 
  At the risk of sounding impertinent: why?
 
  I can see wanting to handle key events outside an EditText, but inside an
  EditText, there may be better ways of achieving your application goals
  than detecting individual key events.
 
  Part of the problem is that you have given us a very narrow view on what
  you are trying to achieve. What sorts of key events are you trying to
 trap
  and what behavior are you trying to do when those events are raised?
  Perhaps by giving people a broader perspective on what you are aiming
 for,
  you can get answers that meet your user experience objectives while also
  integrate well with the IMEs.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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



[android-developers] Re: Very strange StackOverflow exception

2009-05-21 Thread fadden

On May 21, 9:30 am, Vince vincent.gann...@gmail.com wrote:
 Indeed, you're right. Which does not explain why a single character
 can cause the all app to crash :-(

 Any guess?

It could be that the additional StringBuilder operations for the
string concatenation affected something.  Could be that the different
text caused the layout code to behave differently.  It's likely that
you went from just barely under to just barely over.

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



[android-developers] Re: how can i put 15MB images in my App?

2009-05-21 Thread Streets Of Boston

There may be no restriction on any apk, but i wouldn't put them all in
one apk anyway.

Giving the fact that you can only install your app on phone-memory
(not on your SD-card), it's likely that users see the more than
15MByte size of your app and decide not to install/buy it.

Is downloading these images an option?

On May 21, 12:35 pm, Dianne Hackborn hack...@android.com wrote:
 You can put them in your .apk without restriction, just don't load them all
 at the same time.

 On Thu, May 21, 2009 at 7:59 AM, zeeshan genx...@gmail.com wrote:

  Hi,

  i am afraid if Max space for android App is 14MB , how can i put 15MB
  images in my App.
  my application includes more than 500 PNG images which are
  confidentials and cann't be put on sd card. i need to put them in my
  assets.

  is it something that can not be achieved in android?

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Calling an Intent the implicit way

2009-05-21 Thread Claudio Veas

Hello group:
 I`m trying to develop an application, just to test
the ability of android to call an activity with an intent based not in
the specific class name but specifying the action, category and data
information. Acording to this link

http://developer.android.com/guide/topics/intents/intents-filters.html

 only three aspects are consulted when comparing an intent object to
select the future activity to run.
I created two android projects (and two activities),  the first is the
main project who sends the request and the second can be called
directly or through the filter.
This is the call of the activity in the main project:

Intent t3 = new Intent();
t3.setAction(Intent.ACTION_EDIT);
t3.addCategory(Intent.CATEGORY_HOME);
t3.setData(Uri.parse(http://www.yahoo.com.ar;));
try{
startActivity(t3);
}catch(ActivityNotFoundException e){
e.printStackTrace();

}

This is the part of the manifest that specifies (or at least I try to
specify) in the secondary activity that it`s available to be selected
to run with that information:

intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
intent-filter
action 
android:name=android.intent.action.EDIT /
category 
android:name=android.intent.category.HOME /
data android:scheme=http/
/intent-filter

I installed both separatelly and I was expecteing to see the second
activity after the called but instead I got an
ActivityNotFoundException. By the way if I comment the t3.addCategory
(Intent.CATEGORY_HOME); line and change the t3.setAction
(Intent.ACTION_EDIT); to t3.setAction(Intent.ACTION_VIEW); the browser
is executed so I think the problem is in the manifest of the second
activity.
If you know what the problem may be I ll  apreciate any comments
If you need more information to help me pls do not hesitate to ask
Thanks in Advance
Claudio
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there an easy way to make EditText look like TextView but still behave like EditText?

2009-05-21 Thread damnesia

Is it possible to implement style=?android:attr/textViewStyle
dynamically?


On May 20, 3:10 am, n5r11 nikolaradosavlje...@gmail.com wrote:
 This seems to be working..
 android:background=@null removes the background, but the text color
 stays the same. It takes another explicit android:textColor=@null to
 fix that. I guess those are the values that are set in the
 editTextStyle, but not in textViewStyle, so they stay the same after
 style=?android:attr/textViewStyle and need to be nulled-out
 explicitly. I'm not sure what's really going on here, but this seems
 to be a clean solution to this problem.
 The documentation should be more explaining, with more complete and
 thought-out examples..

 Thanks people - a lot!

 PS: Don't trust the layout tab in the xml editor too much..

 On 20 мај, 02:53, Jeff Sharkey jshar...@android.com wrote:

  This is probably because theEditTextstill inherits an
  android:background value from the default system Theme, because the
  textViewStyle doesn't force a @null background.

  Try adding an explicit android:background=@null, which should remove
  theEditText9-patch frame and any padding that comes with it.

  j

  On Tue, May 19, 2009 at 5:19 PM, n5r11 nikolaradosavlje...@gmail.com 
  wrote:

   I've tried all that you suggested, and nothing happens?EditTextstill
   looks the same, both in IDE and when compiled on emulator.

   EditText
      style=?android:attr/textViewStyle
      android:layout_width=fill_parent
      android:layout_height=wrap_content
      android:text=Neque porro quisquam est qui.dolorem.com ipsum /

   EditText
      style=@android:style/Widget.TextView
      android:layout_width=fill_parent
      android:layout_height=wrap_content
      android:text=Neque porro quisquam est qui.dolorem.com ipsum /

   I see I'm not the only one with this problem:
  http://groups.google.rs/group/android-developers/browse_frm/thread/29...

   n5r11

   On 19 мај, 02:05, Jeff Sharkey jshar...@android.com wrote:
   You should actually be using an attribute instead of a direct reference:

   style=?android:attr/textViewStyle

   The underlying @style reference isn't public, but the above attr is.

   j

   On Mon, May 18, 2009 at 4:30 PM, MrSnowflake mrsnowfl...@gmail.com 
   wrote:

Might be: style=@android:style/Widget.TextView

Otherwise, make a TextView and anEditTextand change the GONE state
of them.

On 18 mei, 19:33, Raphael r...@android.com wrote:
Try this:
        android:style=@android:style/Widget.TextView

R/

On Sun, May 17, 2009 at 3:31 PM, Nikola Radosavljevic

nikolaradosavlje...@gmail.com wrote:
 Note: I had troubles posting to android-beginners group, so I came 
 here
 hoping this will work.
 Hello there,

 I want anEditTextto look like TextView but still behave like
EditText. I've tried applying TextView style to myEditTextin my
 layout.xml file, like this:

 EditText
        android:id=@+id/lipsum
        android:text=Lorem ipsum
        android:style=@android:style/Widget_TextView
 /

 ..but I get an error within xml editor: Error: No resource found 
 that
 matches the given name (at 'style' with value '@android:style/
 Widget_TextView'). It is strange because @android:style/
 Widget_TextView definitively exists - I double checked it in code 
 via
 android.R.style.Widget_TextView. Another strange thing is that I 
 don't
 get android:style offered in the xml editor while typing? There is
 android:id, android:text and everything else.. but not
 android:style?!

 Note: I consider the hard way (makingEditTextlook like TextView) to
 be: extendingEditTextand overriding it's onDraw method.

Nikolar

 PS: Check out
http://developer.android.com/guide/topics/ui/themes.html#styles.
 Why are id and style written without android: namespace?

   --
   Jeff Sharkey
   jshar...@android.com

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



[android-developers] Re: SDK 1.5 breaks our build

2009-05-21 Thread Peter Jeffe

That workaround does the job, thanks for the help Xavier!

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



[android-developers] Re: Start Application with SMS

2009-05-21 Thread doananhtai

Try this code in SmsReceiver


// Invoke MyActivityName
Intent i = new Intent(context, MyActivityName.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);


But after start my application, I don't know how to let it process the
received sms content...hic


On May 2, 3:04 am, theMerchant ali.taciro...@gmail.com wrote:
 Hello Everyone,

 I would like to know if anybody knows how I canstartmyapplication
 with an incoming SMS message.

 For example, I send an SMS message from phone A to Phone B. When Phone
 B receives the message, it checks if it is sent to my program. If it
 is, it starts(run) myapplication. Important thing here is that my
 program is not running in the device unless SMS is received, so it can
 not be listening for SMS itself.

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



[android-developers] Emulator is not coming up if we will do the changes in CUPCAKE version

2009-05-21 Thread somu

Hi,

If iw ill do any changes in the External folder of Cupcake version i
am unable to get the emulator Up.Emulator stops at Android(Booting
stage) screen page itself.

Kindly do the needful,if anyone is having the update regarding the
same.


Thanks and Regards
Somashekar

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



[android-developers] How to play video file in android.

2009-05-21 Thread Priya

Hi,

I am new to Android.
I have depeloped a video player app. through Sd card.

Now i want to play video direct from URL.

Can anybody provide me sample code for the same.

Thanks in advance...


Thanks
Priya

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



[android-developers] Forum Development

2009-05-21 Thread JBC

I'm curious... Some of these apps that you see for website forums...
How are the developers able to get the actual topics and such from
some of these websites so easily?

Do some sites have updated xml files?

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



[android-developers] How to loading images (assets or resources) dynamically?

2009-05-21 Thread Kim

Hi,

How do I load the image dynamically through the code? If its unclear,
I mean, I want to load image files by name based on the condition in
the code.

If I use images as resources, the image names have to be hard coded.
This is unacceptable to me.
If I load image in a webview (with image src path dynamically), the
time it takes to load is unacceptable to me.

Can anyone suggest any other way to load the images dynamically?

Thanks much for any pointers,
Kim

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



[android-developers] How to specify both message body and Destination Number in SMS intent.

2009-05-21 Thread doananhtai

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(sms:
1234567890));
intent.putExtra(sms_body, the SMS text);
startActivity(intent);

NOTE: without  Intent.setType(vnd.android-dir/mms-sms);
this will erase the destination number.

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



[android-developers] GPS Access Question

2009-05-21 Thread Phil

Sorry if this is a stupid question- I'm still pretty new to Android
and have been completely unable to figure this out after much google
searching and hunting around in the documentation. *Note: I've been
coding in Eclipse with the Android SDK plugins, using the Google APIs
1.5 version.

I'm working on a project involving accessing the GPS, so I'm writing a
simple program that will do nothing more than access the current
location in order to familiarize myself with the GPS code.

Based on the examples I have found, I came up with the following code.

package com.example.gps;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.widget.Toast;
import android.location.Location;
import android.location.LocationManager;
import android.location.Criteria;

public class HelloGps extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Context context = getContext();

Location location = getLocation(context);

Toast.makeText(this, Location =  + location.getLatitude() +  
, 
+ location.getLongitude(), 0);
}

public static Location getLocation(Context context)
{
LocationManager manager = (LocationManager)
context.getSystemService(Context.LOCATION_SERVICE);
String provider = manager.getBestProvider(new Criteria(),
true);
Location location = manager.getLastKnownLocation(provider);
return location;
}
}

The issue I am having deals with the Context context = getContext()
line. Eclipse tells me that this is an error (but not why). It simply
tells me I should change it to getBaseContext(). If I try this, then
the program hangs. If I try removing it and running the getLocation()
function without the context thrown in there at all, as I have seen in
some other examples, then I get a similar error on the getSystemService
() function call. Eclipse tells me I should rename it, but does not
tell me why or what to.

Any help at all would be incredible, and sorry again if this is a
stupid question. Thanks!

-Phil

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



[android-developers] Unable to Select (check) check box in checkboxView

2009-05-21 Thread Simon

Hello,
I've got the following row xml file which consists of CheckboxView and
TextView;

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent

CheckedTextView 
xmlns:android=http://schemas.android.com/apk/res/
android
android:id=@+id/workout_text
android:layout_width=fill_parent

android:layout_height=?android:attr/listPreferredItemHeight
android:textAppearance=?android:attr/textAppearanceMedium
android:gravity=center_vertical

android:checkMark=?android:attr/listChoiceIndicatorMultiple
android:paddingLeft=6dip
android:paddingRight=6dip
/
TextView android:id=@+id/date_text
xmlns:android=http://schemas.android.com/apk/res/android;
android:textAppearance=?android:attr/textAppearanceSmall
android:layout_width=wrap_content
android:layout_height=wrap_content
 /
/LinearLayout

Following the notepad and list11.java examples, i have the following
fillData() function which creates an array adapter and sets
theListView.CHOICE_MODE_MULTIPLE;
private void fillData() {
// Get all of the exercises from the database and create the
item list
mExerciseCursor = mDbHelper.fetchAllExercise();
startManagingCursor(mExerciseCursor);

String[] from = new String[]
{ ExerciseDbAdapter.KEY_DESCRIPTION ,
ExerciseDbAdapter.KEY_STARTDATE };
int[] to = new int[] { R.id.workout_text, R.id.date_text};

// Now create an array adapter and set it to display using our
row
SimpleCursorAdapter exercises =
new SimpleCursorAdapter(this, R.layout.exercise_row,
mExerciseCursor, from, to);

setListAdapter(exercises);

final ListView listView = getListView();
listView.setItemsCanFocus(false);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
}

When the app run, i'm unable to tick any of the check boxes... what
am i doing wrong??

thank you for your help.

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



[android-developers] Android G1 - Streaming WMV

2009-05-21 Thread semil103

Hello,

I would like to know if I can view streamed WMV video format using G1
device (not the developer phone).
I understand that WMV format is not included in basic Android
Supported Media Formats. But I'm interested in developing application
specific for G1 device. My hope is taken from:
http://developer.android.com/guide/appendix/media-formats.html
Here It's written that
In addition to the core media formats supported in the Android
platform, the T-Mobile G1 also supports the formats listed below:
.
WMV Versions 7, 8 and 9. Simple profile only Windows Media Video
(.wmv)

I just can't find the answer for that question. can anyone help me
clearing this issue so I would know if it is worthwhile to purchase G1
device?


Thanks,
Emil

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



[android-developers] Streaming WMV Watch It Using G1 Device

2009-05-21 Thread Emil

Hello,

I would like to know if I can view streamed WMV video format using G1
device (not the developer phone).
I understand that WMV format is not included in basic Android
Supported Media Formats. But I'm interested in developing application
specific for G1 device. My hope is taken from:
http://developer.android.com/guide/appendix/media-formats.html
Here It's written that
In addition to the core media formats supported in the Android
platform, the T-Mobile G1 also supports the formats listed below:
.
WMV Versions 7, 8 and 9. Simple profile only Windows Media Video
(.wmv)

I just can't find the answer for that question. can anyone help me
clearing this issue so I would know if it's worthwhile for me to
purchase G1 device for development reasons?


Thanks,
Emil

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



[android-developers] startActivityForResult/onActivityResult question

2009-05-21 Thread Tom Opgenorth

Hello all,
I'm new to Android development, and am a bit confused here. I'm
hoping someone can help me out.  Please forgive me as I cross post
this to android-developers - I tried on android-begginers last week
but got no response.


Anyway, I've got a very simple Activity with one EditText and one Button.
Lets call it MyActivity.  Now, when I click on the button on
MyActivity, I want to take a picture using the camera.  For the sake
of this e-mail, lets call the activity that gets spawned when I click
on the button CameraActivity.

Here is how I've setup my button:

   Button takePictureButton = (Button)
this.findViewById(R.id.receipt_take_picture_button);
   takePictureButton.setOnClickListener(new View.OnClickListener() {
   public void onClick(View v) {
   ContentValues values = new ContentValues();
   values.put(Media.TITLE, IMAGE);
   values.put(Media.DESCRIPTION, Image
Captured by Camera);
   Uri uri =
getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, values);
   Intent i = new
Intent(android.media.action.IMAGE_CAPTURE);
   i.putExtra(output, uri);
   startActivityForResult(i,
ACTIVITY_TAKE_PICTURE_WITH_INTENT);
   }
   });

As I understand it, click the button will cause MyActivity to start up
CameraActivity, which is just the default camera application, to take
a picture.  Because I've used startActivityForResult, when
CameraActivity finishes, MyActivity should be notified via it's
onActivityResult.  Below is how I've coded it up:

I've defined my onActivityResult as follows:

   @Override
   protected void onActivityResult(int requestCode, int
resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   switch (requestCode) {
   case (ACTIVITY_TAKE_PICTURE_WITH_INTENT):
   Log.d(TAG, WOW!);
   default:
   break;
   }
   }

So, what has me confused is this:  I would expect onActivityResult to
be called AFTER I take a picture, i.e. when I click on the picture
button.  Instead, it seems to get called immediately:  I click on the
takeAPictureButton, the camera activity starts up at about the same
time the code in onActivityResult gets fired.  Am I missing something
here?

TIA
-- 
http://www.opgenorth.net

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



  1   2   >