Re: [android-developers] Mapping Keycodes and Scancodes to generate an Intent.

2011-04-02 Thread TreKing
On Thu, Mar 31, 2011 at 9:04 PM, chyll richyll@gmail.com wrote:

 For example I have a new application and just one touch of a key it will
 start the intent even if I am in another application.


Yeah, you can't do that.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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: Refreshing app

2011-04-02 Thread Droid
Set up a service that tests the data every 2 minutes. Then wake app if
data relevant.

On Apr 2, 6:58 am, Pinkesh Gupta pinkeshgup...@gmail.com wrote:
 i think you need to do one thing just implement a timer on your thread event

 and put the dat that is coming from the server on sleep.On Fri, Apr 1, 2011 
 at 2:13 PM, prakrati prakrati@gmail.com wrote:
  My data is coming from the server and i want to refresh that data
  every 2 minutes
  what should i do for this? any sample code 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

-- 
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


Re: [android-developers] Important: XmlPullParserException while accessing SOAP webservice

2011-04-02 Thread TreKing
On Thu, Mar 31, 2011 at 10:02 PM, Akshay Dave avd...@gmail.com wrote:

  I am trying to access webservice using KSOAP 2 ... I am having problem
 with accessing webservice...Below are my parameters


What does this have to do with the Android SDK?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

Re: [android-developers] File handling in android

2011-04-02 Thread TreKing
On Fri, Apr 1, 2011 at 5:11 AM, gauri gauri.v...@gmail.com wrote:

 Package name may vary.


For a given Android App ... no it can't ...

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

Re: [android-developers] Android InApp Billing, how to get a list of ALL available Items (+ Infos)

2011-04-02 Thread TreKing
On Fri, Apr 1, 2011 at 7:29 AM, blubl off...@adaria.info wrote:

 Maybe i am all wrong, but this seems like a big mess to me.


It's the Android Market - what do you expect at this point?


 Anybody out there, who can shed some light on this?


The people that have these kinds of answers neither participate in this
group nor would answer you if they did.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

Re: [android-developers] Hardware key combination capture

2011-04-02 Thread TreKing
On Fri, Apr 1, 2011 at 10:59 AM, ncerezo narciso.cer...@gmail.com wrote:

 Also, it should be done from a service with no user interface.


Nope, you can't do that (I hope).


 Otherwise it's impossible to create such an application.


Correct.

It looks like there are some key loggers out there


Can you point to some examples?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] Activity lifecycle

2011-04-02 Thread b_t
Hi,

Maybe an easy question.

When activity A launches activity B then it is possible that A
destroyes before the user navigates
back from B? So A will be recreated and don't remain object state?

T.

-- 
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: in-app billing problems

2011-04-02 Thread Peter
I have exact the same problem. Uploaded a apk with production key to
the market (with debug key doesn't work, because it's a update) and
tried to buy stuff with a test account on my device.
I get the same error: Application Error : This version of the
application is not configured for Market Billing. Check the help
center for more information. I hope somebody knows how to get rid of
the error. I have been google'ing, but no luck so far.


On Mar 31, 11:35 pm, Miguel Morales therevolti...@gmail.com wrote:
 Fyi, I'm testing it using the dungeons sample app google provides.  You
 should try that first and save some time

 On Mar 31, 2011 2:30 PM, Mr Pants pantssoftw...@googlemail.com wrote:

 It wouldn't surprise me, if my problems were down to my
 implementation :)

 I guess another few hours wouldn't hurt

 On Mar 31, 10:06 pm, Miguel Morales therevolti...@gmail.com wrote:









  Either that, or I have a spe...
  On Thu, Mar 31, 2011 at 2:02 PM, Miguel Morales therevolti...@gmail.com
 wrote:

   Well, I'm saying that the market service returns RESULT_BILLING_OK (or
   wha...
   On Thu, Mar 31, 2011 at 1:55 PM, Mr Pants pantssoftw...@googlemail.com
 wrote:

   Testing yes, real in-app products?

   On Mar 31, 9:35 pm, Miguel Morales therevolti...@g...

 --

 You received this message because you are subscribed to the Google
 Groups Android Developers group...

-- 
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] Where is the source code of ADT

2011-04-02 Thread 单单
Hi All,

Could anyone tell me that where the source code of ADT (Android
Development Tools) plugin is. 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


Re: [android-developers] Where is the source code of ADT

2011-04-02 Thread a a
my god, this question is too simple...

http://develop.android.com

2011/4/2 单单 birb...@gmail.com:
 Hi All,

 Could anyone tell me that where the source code of ADT (Android
 Development Tools) plugin is. 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

-- 
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: Help me to realize preferences scheme to use it between activities

2011-04-02 Thread Peter Webb
The OP said he had two applications. He did not specify whether they
were in different packages. I tried to explain the general rules as I
understand them, and describe options for different scenarios.

Why did you post? What value did your post add to anything or anybody?

Do you know more about how to address the OP's issues? If so, why
didn't you try and post something helpful to the OP and maybe other
readers? If not, why did you post at all? Haven't you anything more
intelligent to say than adding a me too to an existing useless post?




On Apr 2, 4:45 pm, Justin Anderson magouyaw...@gmail.com wrote:
 * Who said anything about reading preferences in another package?*

 I know the OP certainly didn't... :-)

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware



 On Fri, Apr 1, 2011 at 8:39 PM, TreKing treking...@gmail.com wrote:
  On Fri, Apr 1, 2011 at 9:07 PM, Peter Webb r.peter.w...@gmail.com wrote:

  You cannot currently use Shared Preferences to read the preferences
  in another package, the documentation says this is currently unsupported.

  Who said anything about reading preferences in another package?

  ---­--
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

   --
  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- Hide quoted text -

 - Show quoted text -

-- 
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


Re: [android-developers] Re: does NFC in gingerbread support card simulate?

2011-04-02 Thread Zhihong GUO
Hi Michael,

The Tag application on Gingerbread have a fouction called smart poster, is
it the card simulation? or just a tag emulation.

Thanks



2011/3/23 nadam a...@anyro.se

 There seems to be some work-around though using undocumented features.
 http://www.youtube.com/watch?v=28TwCpx4Dng

 On 23 mar, 16:03, Michael Roland mi.rol...@gmail.com wrote:
  Hallo,
 
  the current SDK does not allow you to use card emulation.
 
  Anyways, with card *emulation* you will not be able to simulate an
  *NFC tag* (i.e. a tag where you store simple NDEF messages). Card
  emulation mode allows to emulate a contactless smartcard (typically
  used for applications with high security requirements, like credit
  cards). While such a card (emulated or real) can be used to carry NDEF
  messages, I really doubt that this possibility will be made available
  for the Android phones.
 
  br,
  Michael
 
  On Mar 23, 5:14 am, Zhihong GUO gzhh...@gmail.com wrote:
 
 
 
 
 
 
 
   Hi all,
 
   about NFC in Gingerbread, is it possible to simulate a tag by the SDK?
 I
   have found the support for tag read/write and P2P push message, but
 haven't
   found any support on card simulate.
 
   thanks
 
   James

 --
 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


-- 
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 MediaPlayer sometimes stops playing a sound file early

2011-04-02 Thread mot12
Have you tried playing these same files not as asset files? Put them
somewhere on your SD card, then do:
player.setDataSourc(absoluteFilePath);

See if this makes a difference. If so, include your files in the
resources directory as raw rather than using assets. This is what I
did in my apps and I never had the problem you described.

Martin
mobitobi
Gentle Alarm, Sleep Now

-- 
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: dialog placement

2011-04-02 Thread skink


On Apr 2, 2:50 am, lbendlin l...@bendlin.us wrote:
 does the bubble have to be part of the image? Or could it be a separate
 image, positioned relative to your nine-patch?

It can be separate image. Any hints for merging two drawables and
using the result as a windowBackground in such way that dialog will
look like want_it.png image?

-- 
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


Re: [android-developers] Activity lifecycle

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 3:58 AM, b_t bartata...@gmail.com wrote:
 When activity A launches activity B then it is possible that A
 destroyes before the user navigates
 back from B?

Yes.

 So A will be recreated and don't remain object state?

A will be recreated and will be passed a Bundle (to onCreate() and
onRestoreInstanceState()) that was filled in by the
onSaveInstanceState() of the original instance.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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


Re: [android-developers] Layout Buttons have no gradient on Droid X

2011-04-02 Thread Mark Murphy
On Fri, Apr 1, 2011 at 5:37 PM, Marke2112 ellen...@mlkerns.com wrote:
 I developed a simple app on my Droid (os v2.2.2).  The homepage has 4
 buttons on it that display the default gradient gray background.
 Everything looks great.  When I install the app on any of our in-
 office Motorola Droid X (os v2.2 and v2.2.1) phones, the buttons are
 dark with no gradient.

 I've combed the forums, created a new hello world default project and
 added a single button to confirm that it wasn't something goofy I did
 in my app, and even tried manually setting the background color of the
 button (see below).

 v.getBackground().setColorFilter(Color.parseColor(#DD),
 PorterDuff.Mode.DST);

Note that you are not manually setting the background color of the
button. You are manually setting a color filter on the background of
the button.

 Everything looks great on the Droid, all buttons look dark and lack
 gradient on the Droid X.

 What am I missing???

If I had to guess, Motorola modified some resource that you are
explicitly or implicitly relying upon. You may want to copy the
standard button background out of the SDK and into your project, then
use that for your buttons (e.g., via a theme).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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


Re: [android-developers] How to automount SD card

2011-04-02 Thread Mark Murphy
I am not aware of any documented and supported means of doing what you
seek from the Android SDK or NDK.

On Fri, Apr 1, 2011 at 5:31 PM, Jayaprakash Shanmugam
jayaprakas...@gmail.com wrote:
 I am working on a platform where I need to provide an option to share
 the SD card with the connected host.  Although I could use the sysfs
 lun0/file to achieve what I need, this file ( /sys/devices/.../gadget/
 lun0/file) is owned by the root and so is not accessible from my
 Android app.

 I looked into the vold and it has commands to share/mount/unmount
 etc., I am not sure how to make use of them.

 Anybody with better insight can enlighten me ???

 Thank you,
 JP.

 --
 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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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


Re: [android-developers] Custom Url support in Android

2011-04-02 Thread Mark Murphy
On Fri, Apr 1, 2011 at 11:52 AM, Can you help
ranjeeth.deva...@gmail.com wrote:
 I have created a custom Url schee that can launch my application.
 myprotocol://link

That is not recommended, unless you are registering myprotocol with
the IETF or W3C or whoever handles that standard.

 The problem is that the email client that we are using make the link
 as text hence I a not able to launch the application. Is there a way
 through which I can ensure that the myprotocol gets automatically
 recognized by android application if the application is installed.

Use a recognized scheme, such as http://, the way Barcode Scanner and
similar apps do it.

 Converting of myprotocol  to standerd protocols like htto etc is not
 an option since this url scheme has been ported to other OS platform
 and this has to be done the same way on android too.

Then fix the other OS platform. You should not be inventing new
schemes there, either.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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


Re: [android-developers] Launching Google maps from another app

2011-04-02 Thread Mark Murphy
On Fri, Apr 1, 2011 at 4:09 AM, S ohri.sac...@gmail.com wrote:
 I want to launch the native google map app from my application and
 pass some set of addresses so that google maps can show all the
 addresses as markers.

This is not supported AFAIK. You can, however, integrate a MapView
into your own MapActivity for this.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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


Re: [android-developers] Extend UEventObserver.java

2011-04-02 Thread Mark Murphy
On Fri, Apr 1, 2011 at 6:21 AM, Phillip pdurd...@googlemail.com wrote:
 For observing GPIO interrupts i want to create an observer class which
 should be a subclass of UEventObserver.java which finds in frameworks/
 base/core/java/android/os. The problem is, that this class is not
 contained in the standard SDK android.jar. Does anybody have got an
 idea how to extend from this class?

Write your own firmware.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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


Re: [android-developers] There is no disk in the drive. Please insert a disk into drive \Device\Harddisk1\DR14

2011-04-02 Thread Kostya Vasilyev
You could try:

- Installing a memory card in the phone;

- Disabling the Desire's memory card device (seen as a removable drive by
Windows) in Windows Device Manager.

-- Kostya

2011/4/1 Jordan Adams jordanadams.co...@gmail.com

 I keep getting this error when opening programs whilst I have my HTC
 Desire connected. The device has USB Debugging and is being used for
 well... USB debugging. The error only arises when the device is
 connected so I know it's directly related to that. Are there any known
 fixes for this or have I just got a faulty device. Strangely, the
 error shows whenever I send and receive messages on aim as well.

 OS: Windows Vista


 Thanks,

 Jordan Adams

 --
 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

-- 
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: Activity lifecycle

2011-04-02 Thread J
The best way I have found to handle this is: be ready to be killed
_in_any_moment_. This may seem unlike to happed, but still you must be
ready. How? By saving your state when your onSavedInstanceState() is
called, gracefully releasing resources when onDestroy() is called, and
restoring the state when onCreate() is called.

This is a superset of the problem that you are describing, but I have
found to be easier to think in this way than trying to solve every
particular scenario.

On 2 abr, 09:58, b_t bartata...@gmail.com wrote:
 Hi,

 Maybe an easy question.

 When activity A launches activity B then it is possible that A
 destroyes before the user navigates
 back from B? So A will be recreated and don't remain object state?

 T.

-- 
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


Re: [android-developers] Socket cause avc decoding thread lag??

2011-04-02 Thread Kostya Vasilyev
That is very high CPU usage, try reducing that. You may also be seeing GC
kicking in and causing delays, try reducing how often/much you allocate
memory.
02.04.2011 2:47 пользователь Haojun Zhou haoju...@gmail.com написал:
 Hi all,

 I've developed a remote desktop application, which is like VNC.

 The remote desktop is encoded as H.264 and streamed to Android
 handset, while the interaction(touch screen, accelerator sensor
 changed, etc) on the handset is send back to the server.

 The application works fine except sometimes the decoding thread is
 very lag. For instance, decoding one frame costs about 20ms at
 beginning, but a few minutes later, the time increases to over 100ms.
 That will last for severl seconds, than the time goes back to 20ms.

 I've substituted a do-while loop for the decoding function , the same
 thing happens. So it should be no business of the decoder.

 Then i found if i do not send the interaction information to the
 server, there is no lag any more.(The interaction information is still
 gathered, but not sent)

 The uploading of interaction message is triggerd at sensor listener,
 and the H.264 decoding is done in another thread. Since the message
 is very tiny (20bytes, per 30ms), i don't understand why it will
 cause the lag?? The cpu occupancy is about 60%.

 --
 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

-- 
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 support J2ME??

2011-04-02 Thread giangiammy
hi,

http://microemu.blogspot.com/2008/11/running-java-me-applications-on-android.html

this tool converts j2me applet to APK packet.


On Apr 1, 6:08 pm, lady gaga ladygakga...@gmail.com wrote:
 whether andoid support J2ME? if not what software is needed and why?

why what?
android do not have the j2me library, so to run j2me software you need
something to make available that libraries ...

 thank you greetings

-- 
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: Disable a particular row in list view onCreate

2011-04-02 Thread lbendlin
lists work differently. The process of creating a list cell (and re-using 
it) is de-coupled from the process of updating it. The disabling needs to 
be done in the updating part. So when Android asks you to give it this 
particular cell so it can display it you could either try to return null 
(that might backfire) or set the cell's height to zero.

Of course you could disable touch events and key events for that cell but as 
I said before that is bad UI karma.

-- 
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

Re: [android-developers] Refreshing app

2011-04-02 Thread Marcin Orlowski
On 1 April 2011 10:43, prakrati prakrati@gmail.com wrote:

every 2 minutes


But you are aware you will kill the battery very quickly that way?

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
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 build an android project that doesn't contain AndroidManifest.xml

2011-04-02 Thread Robert
IF what you are saying is that you created what you thought was an
Android project and you got those files and folders instead then you
either didn't setup the SDK or didn't set it up properly.   Go to
http://developer.android.com/sdk/index.html  and follow the
instructions step-by-step.  DOn't leave any out, don't try to get
creative and don't short-cut anything.  It'll take you  30 minutes to
get a working environment.  Then do the Hello World app. Depending on
which programming language you already know then you can either jump
into making an app (if you know Java or some other similar language)
or continue with the tutorial applications.

 If you don't know any progamming language and still want to make
Android apps then go to http://appinventor.googlelabs.com/about/  and
use the App Inventor.  Make sure you subscribe to their excellent
forums/groups for help on that method of application development.

If you want those files in your application then please unsubscribe
from this group and go subscribe to a Windows Mobile developer
group.


On Apr 1, 2:08 am, eric rosebeck...@gmail.com wrote:
 I am new to android...and i am trying to build an application that
 doesn't have AndroidManifest.xml but does contains files
 like .sh,.bat,.exe,etc. Along with folders ant-lib and lib
 containing .jar files...

 Somebody please help me

-- 
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


Re: [android-developers] openGL texture render size

2011-04-02 Thread lbendlin
those are bit-wise operations. powers of two have a 1 and any number of 0 in 
binary representation

for example  7 (dec) is 111 (bin), and 8 (dec) is 1000 (bin)

Just some shifting and ANDing. But nice, that's true.


-- 
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

Re: [android-developers] openGL texture render size

2011-04-02 Thread Kostya Vasilyev
It sets every used and intermediate bit to one, resulting in a number
greater than the argument, and having the form (2^N)-1 for some N.

Adding one at the end rolls all those ones over to the next highest bit,
giving 2^N, a power of two.
02.04.2011 3:16 пользователь a a harvey.a...@gmail.com написал:
 But i can't understand the following algorithm


 function nextHighestPowerOfTwo(x) {
 --x;
 for (var i = 1; i  32; i = 1) {
 x = x | x  i;
 }
 return x + 1;
 }


 2011/4/2 a a harvey.a...@gmail.com:
 My god, the following algorithm is very very brilliant from your
 provider url code.


 function isPowerOfTwo(x) {
return (x  (x - 1)) == 0;
 }

 2011/4/2 Dan Roberts ademan...@gmail.com:
 http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences

 While OpenGL 2.0 and later for the desktop offer full support for
 non-power-of-two (NPOT) textures, OpenGL ES 2.0 and WebGL have only
limited
 NPOT support.

 Chances are you're using OpenGL ES 1.1 anyways, unless the highest
profile
 is automagically selected for you when creating a context (I have no
idea).
 But if OpenGL ES 2.0 has only limited support, it seems likely NPOT is
 almost entirely missing in 1.1 Someone more knowledgeable can correct
me,
 but this is likely at least close. Just use power of two sized textures,
you
 can pre-scale them is need be.

 Cheers,
 Dan

 On Apr 1, 2011 6:24 PM, a a harvey.a...@gmail.com wrote:
 Why should bitmap with 2, 4, 8, 16, 32, 64, 128.otherwise, it
 will be white board?

 --
 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

 --
 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


 --
 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

-- 
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: Disable a particular row in list view onCreate

2011-04-02 Thread dilu
Thanks.But my question is how to do that?

On Apr 2, 5:32 pm, lbendlin l...@bendlin.us wrote:
 lists work differently. The process of creating a list cell (and re-using
 it) is de-coupled from the process of updating it. The disabling needs to
 be done in the updating part. So when Android asks you to give it this
 particular cell so it can display it you could either try to return null
 (that might backfire) or set the cell's height to zero.

 Of course you could disable touch events and key events for that cell but as
 I said before that is bad UI karma.

-- 
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] Anyone tried Drupal Services Module with Android???

2011-04-02 Thread Abhishek Talwar
I have installed drupal module well and running on my drupal website
this module lacks some tutorials so thats why i am having some problem
figuring out the android side coding with getting this to work.

I have done parsing and i can parse data but i dont know which api to
hit to get the node content in xml form

making the HttpurlConnection with url - http://localhost/drupal6/
services/xmlrpc yeilds success result but then what should i do and
which api should i hit? from where will i get the session id? and
which method to call

i have enabled all modules related to node and system

would be nice if you could guide me with that 3-4 line of code

Regards

-- 
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


Re: [android-developers] Anyone tried Drupal Services Module with Android???

2011-04-02 Thread Kumar Bibek
This looks simple. Try the rest API.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Sat, Apr 2, 2011 at 7:09 PM, Abhishek Talwar 
r.o.b.i.n.abhis...@gmail.com wrote:

 I have installed drupal module well and running on my drupal website
 this module lacks some tutorials so thats why i am having some problem
 figuring out the android side coding with getting this to work.

 I have done parsing and i can parse data but i dont know which api to
 hit to get the node content in xml form

 making the HttpurlConnection with url - http://localhost/drupal6/
 services/xmlrpc yeilds success result but then what should i do and
 which api should i hit? from where will i get the session id? and
 which method to call

 i have enabled all modules related to node and system

 would be nice if you could guide me with that 3-4 line of code

 Regards

 --
 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

-- 
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

Re: [android-developers] Anyone tried Drupal Services Module with Android???

2011-04-02 Thread Kumar Bibek
http://drupal.org/project/rest_server

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Sat, Apr 2, 2011 at 7:09 PM, Abhishek Talwar 
r.o.b.i.n.abhis...@gmail.com wrote:

 I have installed drupal module well and running on my drupal website
 this module lacks some tutorials so thats why i am having some problem
 figuring out the android side coding with getting this to work.

 I have done parsing and i can parse data but i dont know which api to
 hit to get the node content in xml form

 making the HttpurlConnection with url - http://localhost/drupal6/
 services/xmlrpc yeilds success result but then what should i do and
 which api should i hit? from where will i get the session id? and
 which method to call

 i have enabled all modules related to node and system

 would be nice if you could guide me with that 3-4 line of code

 Regards

 --
 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

-- 
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] Flytouch Etablet + android browser

2011-04-02 Thread Károly Holczhauser
Hi all!

 My main question is: are the android browser or any browser on android can
play video directly from the website ?
 When I surf to the http://videa.hu site and play an video with my HTC
Deisre everything okay, but when I try redo this with my flytouch eTablet ,
I got a blink white screen instead of the video:(

 Can anybody suggest a solution for me ? How can I play video directy from
the webbrowser ? I don't want to start a new app to play youtube (or else)
videos.


Thanks : Károly

-- 
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 can't be loaded in a Open GL live wallpaper

2011-04-02 Thread MobileVisuals
I am trying to make a Open GL live wallpaper based on Robert Greens
GLWallpaperService:

http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live-wallpapers
:

My problem  is that I can’t load my texture resources. The app crashes
when I call
getApplicationContext(); getResources(); or getApplicationContext()

I have a working version of the 3D animation for the wallpaper. I can
load the texture resources in this project and it works like it
should.The resource structures is exactly the same in this project as
in the live wallpaper project, so it should work to load the textures
here also. Should I use some special way to load the texture
resources? I am now using the standard way:

BitmapFactory.decodeResource(resources, R.drawable.l11);

-- 
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


Re: [android-developers] Flytouch Etablet + android browser

2011-04-02 Thread Mark Murphy
This list is for Android application development using the SDK. For
questions regarding the use of a flytouch eTablet, please contact the
manufacturer.

2011/4/2 Károly Holczhauser holczhau...@gmail.com:
 Hi all!

  My main question is: are the android browser or any browser on android can
 play video directly from the website ?
  When I surf to the http://videa.hu site and play an video with my HTC
 Deisre everything okay, but when I try redo this with my flytouch eTablet ,
 I got a blink white screen instead of the video:(

  Can anybody suggest a solution for me ? How can I play video directy from
 the webbrowser ? I don't want to start a new app to play youtube (or else)
 videos.


 Thanks : Károly

 --
 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



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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 access the list of services which are currently running in background?

2011-04-02 Thread Varun Batra
Hi guys,

Does anybody know how to get the same screen which we get when we
click on :-

Menu - Setting - Applications - Running Services.

There are few apps in the market which access this screen directly by
one click for ex. Advance Taks Manager has this functionality by
clicking on :-

Advance Task Manager -  Menu - Services.

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


Re: [android-developers] Resources can't be loaded in a Open GL live wallpaper

2011-04-02 Thread Marcin Orlowski
On 2 April 2011 16:12, MobileVisuals eyv...@astralvisuals.com wrote:

My problem  is that I can’t load my texture resources. The app crashes


And the log quote is...?

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
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: openGL texture render size

2011-04-02 Thread Hari Edo

On Apr 1, 11:16 pm, a a harvey.a...@gmail.com wrote:
 But i can't understand the following algorithm

 function nextHighestPowerOfTwo(x) {
     --x;
     for (var i = 1; i  32; i = 1) {
         x = x | x  i;
     }
     return x + 1;

 }

On the first loop, take the value and smear its bits
once rightward:

  x was:10010111
  x  1:   01001011
  x | x  1:   11010001

On the second loop, you could smear the bits once
rightward again (doing i++ in the for loop), but that
would be a waste of time since there can be no more
single 1 bits.  All the runs of 1 bits are now fatter.
So on the second loop, smear the bits TWICE rightward,
by doing (i = 1) in the for loop instead.

  x was:11010001
  x  2:   00110100
  x | x  2:   1101

On the third loop, smear the bits FOUR rightward,
since any 1 bit is now fatter.

  x was:1101
  x  4:   
  x | x  4:   

We're done in this example, but the loop here
also tries to smear by 8 and smear by 16.

We then add 1, to roll over to the next power of
two.

  x was:
  next power:   0001

However, because you don't want to have the
nextHighestPowerOfTwo(2048) to return 4096,
the function starts with x-1 instead of x.

-- 
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: Disable a particular row in list view onCreate

2011-04-02 Thread lbendlin
Don't know - by reading the listview documentation maybe? 

-- 
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: Disable a particular row in list view onCreate

2011-04-02 Thread dilu
oh thanks a lot.

On Apr 2, 8:34 pm, lbendlin l...@bendlin.us wrote:
 Don't know - by reading the listview documentation maybe?

-- 
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] Layout Buttons have no gradient on Droid X

2011-04-02 Thread lbendlin
I thought this stuff is heavily influenced by the theme that is either 
preinstalled on the device or selected by the user. 

-- 
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


Re: [android-developers] Layout Buttons have no gradient on Droid X

2011-04-02 Thread Kostya Vasilyev
It is. The Droid X uses a very distinctive dark theme.

Perhaps rather than using the #CDCDCD literal value, one could look up some
similar color in the theme. Then on the Droid X it might be something that
fits with the overall color scheme of the device.

-- Kostya

2011/4/2 lbendlin l...@bendlin.us

 I thought this stuff is heavily influenced by the theme that is either
 preinstalled on the device or selected by the user.

 --
 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

-- 
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

Re: [android-developers] Re: Help me to realize preferences scheme to use it between activities

2011-04-02 Thread TreKing
On Sat, Apr 2, 2011 at 3:56 AM, Peter Webb r.peter.w...@gmail.com wrote:

 The OP said he had two applications.


Where did he say that?

I see:
On Thu, Mar 31, 2011 at 4:58 AM, Sergey K serj...@gmail.com wrote:

 (My first and main *activitiy *must be form with login + password) ... My
 currently code work only in one *activity*, if i want to use preferences
 in another *activity*. ...

 Maybe some of you can offer another way to store login and password for my
 app, with using in *activities*.


Lots of mention of multiple activities. I see no mention of multiple
applications or packages.


 He did not specify whether they were in different packages.


I think this is assumed when dealing with a single app.


 I tried to explain the general rules as I understand them, and describe
 options for different scenarios.


I was confused and wanted to know what your explanation had to do with the
OP's original question. I still don't and I'm still confused.


 Why did you post? What value did your post add to anything or anybody?

 Do you know more about how to address the OP's issues? If so, why didn't
 you try and post something helpful to the OP and maybe other readers? If
 not, why did you post at all? Haven't you anything more intelligent to say
 than adding a me too to an existing useless post?


No need to get testy.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] EditText to filter a listview

2011-04-02 Thread Igor Nesralla Ribeiro
Hi,

i have a edittext and a listview ... I want to do thiswhen the users
type on a edittext  this will filter a listview
But...the problem  is the listview returns nothing when I type someword that
i have in the list. 

Can anyone help me ? or there any another simple way to do this

Here is my code...
public class Restaurants extends Activity {

private ListView restaurantListView;
private ArrayListRestaurantsInfo mRestaurants;
private ListAdapter lstAdapter;
EditText edt;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
 setContentView(R.layout.restaurants);   
 mRestaurants = getRestaurants();
 restaurantListView = (ListView)
findViewById(R.id.lvRestaurant);
 lstAdapter = new ListAdapter(this,
R.id.lvRestaurant, mRestaurants);
 restaurantListView.setAdapter(lstAdapter);

 restaurantListView.setTextFilterEnabled(true);
 restaurantListView.setOnItemClickListener(new
ListView.OnItemClickListener()  {
@Override
public void onItemClick(AdapterView? arg0,
View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub

Intent its = new
Intent(getBaseContext(),RestaurantsDetails.class);

Bundle b = new Bundle();
b.putLong(key,arg3);

its.putExtras(b);

startActivity(its);
}
 });
 edt = (EditText)findViewById(R.id.editText);
 edt.addTextChangedListener(new TextWatcher(){
 @Override  
 public void onTextChanged( CharSequence
arg0, int arg1, int arg2, int arg3)
 {// TODO Auto-generated method
stub  

Restaurants.this.lstAdapter.getFilter().filter(arg0); 
 
 }
 @Override
 public void afterTextChanged(Editable arg0)

 {// TODO Auto-generated method
stub
 
 }
 @Override
 public void beforeTextChanged(CharSequence
arg0, int arg1,
int arg2, int arg3)
{
// TODO Auto-generated
method stub

}
 
 });
} catch (Exception e) {
// TODO: handle exception
Log.e(oncreate resta,e.getMessage());
}


} 
public ArrayListRestaurantsInfo getRestaurants(){ 

DBAdapter dbAdapter=DBAdapter.getDBAdapterInstance(this);
try {
dbAdapter.createDataBase();
} catch (IOException e) {
Log.i(*** select ,e.getMessage());
}
dbAdapter.openDataBase();   
String query=SELECT * FROM restaurants;;
ArrayListArrayListString stringList =
dbAdapter.selectRecordsFromDBList(query, null);
dbAdapter.close();

ArrayListRestaurantsInfo restaurantsList = new
ArrayListRestaurantsInfo();
for (int i = 0; i  stringList.size(); i++) {
ArrayListString list = stringList.get(i);
RestaurantsInfo restaurant = new RestaurantsInfo();
try {
restaurant.id =
Integer.parseInt(list.get(0));
restaurant.res_name = list.get(1);
restaurant.res_city = list.get(2);
} catch (Exception e) {
Log.i(*** + Restaurants.class.toString(),
e.getMessage());
}
restaurantsList.add(restaurant);
}
return restaurantsList;
}
 private class ListAdapter extends 

[android-developers] Re: Activity lifecycle

2011-04-02 Thread b_t
And is there any way to force stop activity A to test if
my onRestoreInstanceState and onSavedInstanceState implementation
works
when returning from B?

In my device A is never 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


Re: [android-developers] Re: Activity lifecycle

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 12:28 PM, b_t bartata...@gmail.com wrote:
 And is there any way to force stop activity A to test if
 my onRestoreInstanceState and onSavedInstanceState implementation
 works
 when returning from B?

Sure. Rotate the screen. By default, that will destroy and recreate
the activity.

 In my device A is never destroyed.

That seems unlikely.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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: touch screen with two finger gesture to magnify or shrink

2011-04-02 Thread lbendlin

The ontouchevent syntax has changed since multitouch is supported.
Check the new documentation.

On Apr 1, 11:56 pm, a a harvey.a...@gmail.com wrote:
 I think most of people have played the angry birds. It can magnify
 or shrink background when you move your two finger.

 I want to get the two start point like a(x1, y1) and b(x2, y2), and
 the two last point c(x3, y3) and d(x4, y4)

 if ( (x1 - x2)  (x3 - x4) || (y1 - y2)  (y3 - y4)) {
   // shrink

 } else {
   // magnify
 }

 the I tested following code:
         public void onTouchEvent(MotionEvent event) {
             if (event.getAction() == MotionEvent.ACTION_MOVE) {
                 mTouchX = event.getX();
                 mTouchY = event.getY();
                 Log.d(harvey, move(x, y) =  +  (  + mTouchX + 
 ,   + mTouchY +  ));
             } else if (event.getAction() == MotionEvent.ACTION_DOWN) {
                 Log.d(harvey, down(x1, y1) =  + ( + event.getX()
 + ,  + event.getY() + ));
             } else if(event.getAction() == MotionEvent.ACTION_UP) {
                 Log.d(harvey, up(x1, y1) =  + ( + event.getX() +
 ,  + event.getY() + ));
             }
             super.onTouchEvent(event);
         }

 Form the log, it seams that can only get one finger's position, but
 not the two finger at the same time.

 Would you provider any idea how to implement 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] ImageView change image

2011-04-02 Thread Raghav Sood
Hi everyone,

My code is as follows:

import com.raghavsood.mp.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;


public class class extends Activity {
ImageView button = (ImageView)findViewById(R.id.l1m1);
private OnClickListener mCorkyListener = new OnClickListener() {
public void onClick(View v) {
  button.setImageResource (R.drawable.m1s);
}
};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

// Register the onClick listener with the implementation above
button.setOnClickListener(mCorkyListener);

}
}

My code had no problems when the parts in greenish color were not there. Now
the app force closes.

Please help. This is for a game I am making.



-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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

Re: [android-developers] ImageView change image

2011-04-02 Thread Mark Murphy
Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
LogCat and look at the stack trace associated with your force close.

On Sat, Apr 2, 2011 at 1:33 PM, Raghav Sood raghavs...@gmail.com wrote:
 Hi everyone,

 My code is as follows:

 import com.raghavsood.mp.R;

 import android.app.Activity;
 import android.os.Bundle;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.ImageView;


 public class class extends Activity {
     ImageView button = (ImageView)findViewById(R.id.l1m1);
     private OnClickListener mCorkyListener = new OnClickListener() {
         public void onClick(View v) {
       button.setImageResource (R.drawable.m1s);
         }
     };

     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);

         // Register the onClick listener with the implementation above
         button.setOnClickListener(mCorkyListener);

     }
 }

 My code had no problems when the parts in greenish color were not there. Now
 the app force closes.

 Please help. This is for a game I am making.



 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.com/
 http://www.telstop.tel/

 --
 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



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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


Re: [android-developers] ImageView change image

2011-04-02 Thread Raghav Sood
I am testing it on my phone. The emulator has never finished booting on my
computer. How to I write errors to the logfile on the phone?

On Sat, Apr 2, 2011 at 11:08 PM, Mark Murphy mmur...@commonsware.comwrote:

 Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
 LogCat and look at the stack trace associated with your force close.

 On Sat, Apr 2, 2011 at 1:33 PM, Raghav Sood raghavs...@gmail.com wrote:
  Hi everyone,
 
  My code is as follows:
 
  import com.raghavsood.mp.R;
 
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.ImageView;
 
 
  public class class extends Activity {
  ImageView button = (ImageView)findViewById(R.id.l1m1);
  private OnClickListener mCorkyListener = new OnClickListener() {
  public void onClick(View v) {
button.setImageResource (R.drawable.m1s);
  }
  };
 
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
 
  // Register the onClick listener with the implementation above
  button.setOnClickListener(mCorkyListener);
 
  }
  }
 
  My code had no problems when the parts in greenish color were not there.
 Now
  the app force closes.
 
  Please help. This is for a game I am making.
 
 
 
  --
  Raghav Sood
  http://www.raghavsood.com/
  http://www.androidappcheck.com/
  http://www.telstop.tel/
 
  --
  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



 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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

Re: [android-developers] ImageView change image

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 1:41 PM, Raghav Sood raghavs...@gmail.com wrote:
 I am testing it on my phone. The emulator has never finished booting on my
 computer. How to I write errors to the logfile on the phone?

Stack traces are automatically written to LogCat on the phone. Use adb
logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat.

http://developer.android.com/guide/developing/device.html
http://developer.android.com/guide/developing/debugging/debugging-projects.html#toptips
http://developer.android.com/guide/developing/debugging/ddms.html
http://developer.android.com/guide/developing/debugging/debugging-log.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: ImageView setColorFilter, what to do for a bitmap?

2011-04-02 Thread Tim Jones
You can create a new scratch bitmap with a copy of the data and then blt it 
back onto the target bitmap like so:

Paint p = new Paint();

 p.setColorFilter(customColorFilter);
 Canvas c = new Canvas(target);
c.drawColor(Color.BLACK);
c.drawBitmap(scratchBitmap, 0, 0, p);

-- 
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

Re: [android-developers] ImageView change image

2011-04-02 Thread Raghav Sood
Thanks Mark,

This is what I got from the phone log:
04-02 23:04:46.576 I/ActivityManager( 1368): Start proc
com.raghavsood.mpfor activity
com.raghavsood.mp/.matchpuzzler: pid=25262 uid=10113 gids={3003}
04-02 23:04:46.726 E/AndroidRuntime(25262): FATAL EXCEPTION: main
04-02 23:04:46.726 E/AndroidRuntime(25262): java.lang.RuntimeException:
Unable to instantiate activity ComponentInfo{
com.raghavsood.mp/com.raghavsood.mp.matchpuzzler}:
java.lang.NullPointerException
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.os.Looper.loop(Looper.java:123)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread.main(ActivityThread.java:4627)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
java.lang.reflect.Method.invokeNative(Native Method)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
java.lang.reflect.Method.invoke(Method.java:521)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
dalvik.system.NativeStart.main(Native Method)
04-02 23:04:46.726 E/AndroidRuntime(25262): Caused by:
java.lang.NullPointerException
04-02 23:04:46.726 E/AndroidRuntime(25262): at android.app.Activity.
findViewById(Activity.java:1637)
04-02 23:04:46.726 E/AndroidRuntime(25262): at com.raghavsood.mp.
matchpuzzler.init(matchpuzzler.java:14)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
java.lang.Class.newInstanceImpl(Native
Method)
04-02 23:04:46.726 E/AndroidRuntime(25262): at java.lang.Class.newInstance(
Class.java:1429)
04-02 23:04:46.726 E/AndroidRuntime(25262): at android.app.Instrumentation.
newActivity(Instrumentation.java:1021)
04-02 23:04:46.726 E/AndroidRuntime(25262): at android.app.ActivityThread.
performLaunchActivity(ActivityThread.java:2577)
04-02 23:04:46.726 E/AndroidRuntime(25262): ... 11 more
04-02 23:04:46.736 W/ActivityManager( 1368):   Force finishing activity
com.raghavsood.mp/.matchpuzzler

I can't understand this very well but from what I got it seems like the
error is at findviewbyid (in red). Is this right? if so does anyone know how
I can fix it?

On Sat, Apr 2, 2011 at 11:15 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Sat, Apr 2, 2011 at 1:41 PM, Raghav Sood raghavs...@gmail.com wrote:
  I am testing it on my phone. The emulator has never finished booting on
 my
  computer. How to I write errors to the logfile on the phone?

 Stack traces are automatically written to LogCat on the phone. Use adb
 logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat.

 http://developer.android.com/guide/developing/device.html

 http://developer.android.com/guide/developing/debugging/debugging-projects.html#toptips
 http://developer.android.com/guide/developing/debugging/ddms.html
 http://developer.android.com/guide/developing/debugging/debugging-log.html

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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: Monkeyrunner not capturing screenshot correctly

2011-04-02 Thread SJ
I have also seen not 100% perfect screenshot.
There is only one function in Monkeyrunner to take Snapshots:

com.android.monkeyrunner.MonkeyDevice.takeSnapshot
Gets the device's screen buffer, yielding a screen capture of the
entire display.

Which function have you mention?

On Mar 31, 2:31 am, lbendlin l...@bendlin.us wrote:
 Are you taking the screenshots from the framebuffer? You may want to use a
 more higher level function that will only execute when the whole screen is
 blitted.

-- 
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 we get handle of GUI controls in Android?

2011-04-02 Thread SJ
I think it requires kernel level monitor. Maybe you should start from
getting source code of android.
Write driver to enumarate all controls of foreground apps.

SJ

On Mar 31, 4:57 am, Ella daffodil...@gmail.com wrote:
 The same question from me.

 We know, A GUI automation testing tool -- monkey runner is there, it
 provide some functions such as Keyboard function, input message
 functions as well as touch, which are all very good supports for the
 automation testing.

 However, there seems somethings that puzzle me a lot, so search helps
 from all of you here:
 1. As in most of GUI automation testing, locate the objects in the
 screen and judge the existing of the objects are very important, so is
 there any way to implement this function, or can we extend the
 function ourselves, if so, how?
 2. Now we can't touch the object by provide name or id or any other
 attributes of the objects but just touch on location(by X,Y). in
 common GUI automation, it's very inflexible and bring much trouble to
 users to get the location info. Is there any way to resolve this
 problems? or any further plans for the enhancement?

 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: C/C++ Integration With Android...

2011-04-02 Thread SJ
Check here:

http://smartctl.net/android/ndk-r5.php

On Apr 1, 1:59 pm, iliTheFallen gurcan.il...@gmail.com wrote:
 Hi All,

 I want to integrate C/C++ to Android Platform. Java Virtual Machine
 has a native support for calling C/C++ methods or importing dll files.
 My question is Does Dalvik Virtual Machine(DVM) have the same
 support?.

 If it has; would you mind letting me know about the technique or the
 resource depicting the case i mentioned?

 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


Re: [android-developers] ImageView change image

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 1:55 PM, Raghav Sood raghavs...@gmail.com wrote:
 Thanks Mark,

 This is what I got from the phone log:

:: snip ::

 04-02 23:04:46.726 E/AndroidRuntime(25262): Caused by:
 java.lang.NullPointerException
 04-02 23:04:46.726 E/AndroidRuntime(25262): at
 android.app.Activity.findViewById(Activity.java:1637)
 04-02 23:04:46.726 E/AndroidRuntime(25262): at
 com.raghavsood.mp.matchpuzzler.init(matchpuzzler.java:14)

This tells you where you are going wrong. You cannot call
findViewById() from an initializer. You have to wait until *after*
setContentView() before calling findViewById().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: Monkeyrunner error for device

2011-04-02 Thread SJ
Looks like connection between monkeyrunner script and monkeyrunner
daemon on device broken.
is it always happen or sparadically?
Can u try to remove all extra Apps and repeat?

On Apr 1, 9:12 pm, saadhuboy saadhu...@gmail.com wrote:
 I am trying to use monkeyrunner to automate a few tests on the device
 but keep running into the following error on a touch() or press()
 call.

 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice] Erro
 r sending touch event: 240 720 DOWN_AND_UP
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]java.
 net.SocketException: Software caused connection abort: socket write
 error
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at java.net.SocketOutputStream.socketWrite(Unknown Source)
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at java.net.SocketOutputStream.write(Unknown Source)
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
 .
 .
 .
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at com.android.monkeyrunner.ScriptRunner.console(ScriptRunner.java:
 193)
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at
 com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:
 89)

 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at
 com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:
 20
 3)

 However the calls for shell() method works fine. What might I be doing
 wrong?
 The same code works well on the eumlator.

-- 
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] Mac phone

2011-04-02 Thread bob
Can someone recommend an android phone that will definitely let me do
development for it on the Mac?

I'm thinking of getting the Optimus, but it's nonrefundable, so if it
doesn't work on Mac, it's a waste of $200.

-- 
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: OutofMemoryError on Thunderbolt: HttpClient.execute

2011-04-02 Thread Nathan
Is there anyway to change the global settings for buffer size?

There are some connections I don't control, such as the dispatch on
Google Analytics.

Nathan

On Mar 29, 2:36 pm, Nathan critter...@crittermap.com wrote:
 On Mar 29, 2:20 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Mar 
 29, 2011 at 5:15 PM, Nathan critter...@crittermap.com wrote:
   Until I got a recent log, I didn't know how much it was trying to
   allocate - 2Megabytes. That seems awfully greedy when you have a 16M
   heap - multiple downloads in a row without triggering garbage
   collection are sure to bring you down. I'm happy to allocate less
   since I'm only downloading 69K files.

  I think theThunderboltshould have a larger heap than 16MB -- 24MB
  would be my guess.

 In practice, my stack traces are showing 16M heap because there is up
 to 8Meg of bitmap memory in use. And that is with my bitmaps on a diet
 - which was the first thing I did when seeing OutOfMemory errors.

 Nathan

-- 
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


Re: [android-developers] ImageView change image

2011-04-02 Thread Raghav Sood
Okay I fixed that part now but it still force closes. My code now is:
public class class extends Activity {
ImageView button = (ImageView)findViewById(R.id.l1m1);
public OnClickListener mCorkyListener = new OnClickListener() {
public void onClick(View v) {
  button.setImageResource (R.drawable.m1s);
}
};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
AdView adView = (AdView)findViewById(R.id.ad);
adView.requestFreshAd();
ImageView button = (ImageView)findViewById(R.id.l1m1);
// Register the onClick listener with the implementation above
button.setOnClickListener(mCorkyListener);

}
}

and the log reads:

04-03 00:06:53.383 I/ActivityManager( 1368): Start proc
com.raghavsood.mpfor activity
com.raghavsood.mp/.matchpuzzler: pid=26022 uid=10113 gids={3003}
04-03 00:06:53.553 W/dalvikvm(26022): threadid=1: thread exiting with
uncaught exception (group=0x40020ac0)
04-03 00:06:53.573 E/AndroidRuntime(26022): FATAL EXCEPTION: main
04-03 00:06:53.573 E/AndroidRuntime(26022): java.lang.RuntimeException:
Unable to instantiate activity ComponentInfo{
com.raghavsood.mp/com.raghavsood.mp.matchpuzzler}:
java.lang.NullPointerException
04-03 00:06:53.573 E/AndroidRuntime(26022): at android.app.ActivityThread.

performLaunchActivity(ActivityThread.java:2585)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.os.Looper.loop(Looper.java:123)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.app.ActivityThread.main(ActivityThread.java:4627)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
java.lang.reflect.Method.invokeNative(Native Method)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
java.lang.reflect.Method.invoke(Method.java:521)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
dalvik.system.NativeStart.main(Native Method)
04-03 00:06:53.573 E/AndroidRuntime(26022): Caused by:
java.lang.NullPointerException
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.app.Activity.findViewById(Activity.java:1637)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
com.raghavsood.mp.matchpuzzler.init(matchpuzzler.java:14)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
java.lang.Class.newInstanceImpl(Native Method)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
java.lang.Class.newInstance(Class.java:1429)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-03 00:06:53.573 E/AndroidRuntime(26022): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-03 00:06:53.573 E/AndroidRuntime(26022): ... 11 more
04-03 00:06:53.583 W/ActivityManager( 1368):   Force finishing activity
com.raghavsood.mp/.matchpuzzler
Now I have no idea as to what is wrong though it still seems to be my
findviewbyid

Please help

-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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

Re: [android-developers] ImageView change image

2011-04-02 Thread Raghav Sood
Sorry my fault. forgot to remove the imageview declaration from top.

On Sun, Apr 3, 2011 at 12:07 AM, Raghav Sood raghavs...@gmail.com wrote:

 Okay I fixed that part now but it still force closes. My code now is:

 public class class extends Activity {
 ImageView button = (ImageView)findViewById(R.id.l1m1);
 public OnClickListener mCorkyListener = new OnClickListener() {

 public void onClick(View v) {
   button.setImageResource (R.drawable.m1s);
 }
 };

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 AdView adView = (AdView)findViewById(R.id.ad);
 adView.requestFreshAd();

 ImageView button = (ImageView)findViewById(R.id.l1m1);
 // Register the onClick listener with the implementation above
 button.setOnClickListener(mCorkyListener);

 }
 }

 and the log reads:

 04-03 00:06:53.383 I/ActivityManager( 1368): Start proc com.raghavsood.mpfor 
 activity
 com.raghavsood.mp/.matchpuzzler: pid=26022 uid=10113 gids={3003}
 04-03 00:06:53.553 W/dalvikvm(26022): threadid=1: thread exiting with
 uncaught exception (group=0x40020ac0)
 04-03 00:06:53.573 E/AndroidRuntime(26022): FATAL EXCEPTION: main
 04-03 00:06:53.573 E/AndroidRuntime(26022): java.lang.RuntimeException:
 Unable to instantiate activity ComponentInfo{
 com.raghavsood.mp/com.raghavsood.mp.matchpuzzler}:
 java.lang.NullPointerException
 04-03 00:06:53.573 E/AndroidRuntime(26022): at android.app.ActivityThread.

 performLaunchActivity(ActivityThread.java:2585)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.access$2300(ActivityThread.java:125)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.os.Looper.loop(Looper.java:123)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.main(ActivityThread.java:4627)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.reflect.Method.invokeNative(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.reflect.Method.invoke(Method.java:521)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 dalvik.system.NativeStart.main(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): Caused by:
 java.lang.NullPointerException
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.Activity.findViewById(Activity.java:1637)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.raghavsood.mp.matchpuzzler.init(matchpuzzler.java:14)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.Class.newInstanceImpl(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.Class.newInstance(Class.java:1429)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.Instrumentation.newActivity(Instrumentation.java:1021)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
 04-03 00:06:53.573 E/AndroidRuntime(26022): ... 11 more
 04-03 00:06:53.583 W/ActivityManager( 1368):   Force finishing activity
 com.raghavsood.mp/.matchpuzzler
 Now I have no idea as to what is wrong though it still seems to be my
 findviewbyid

 Please help


 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.com/
 http://www.telstop.tel/




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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] Low latency audio

2011-04-02 Thread Peter Eastman
How is low latency audio in Gingerbread supposed to work?  It added
the android.hardware.audio.low_latency flag to the manifest with the
description, The application uses a low-latency audio pipeline on the
device and is sensitive to delays or lag in sound input or output.
But how do I actually use that low-latency audio pipeline?  I've been
unable to find any mention of it other than this flag.

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


Re: [android-developers] ImageView change image

2011-04-02 Thread Raghav Sood
Okay I fixed that but now the line in red cannot find the button imageview.

public class class extends Activity {


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.main);
AdView adView = (AdView)findViewById(R.id.ad);
adView.requestFreshAd();
ImageView button = (ImageView)findViewById(R.id.l1m1);
// Register the onClick listener with the implementation above
button.setOnClickListener(mCorkyListener);

}
public OnClickListener mCorkyListener = new OnClickListener() {
public void onClick(View v) {
  button.setImageResource (R.drawable.m1s);
}
};
}

I know its because the button variable is part of the other method but how
do I fix it?

On Sun, Apr 3, 2011 at 12:09 AM, Raghav Sood raghavs...@gmail.com wrote:

 Sorry my fault. forgot to remove the imageview declaration from top.


 On Sun, Apr 3, 2011 at 12:07 AM, Raghav Sood raghavs...@gmail.com wrote:

 Okay I fixed that part now but it still force closes. My code now is:

 public class class extends Activity {
 ImageView button = (ImageView)findViewById(R.id.l1m1);
 public OnClickListener mCorkyListener = new OnClickListener() {

 public void onClick(View v) {
   button.setImageResource (R.drawable.m1s);
 }
 };

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 AdView adView = (AdView)findViewById(R.id.ad);
 adView.requestFreshAd();

 ImageView button = (ImageView)findViewById(R.id.l1m1);
 // Register the onClick listener with the implementation above
 button.setOnClickListener(mCorkyListener);

 }
 }

 and the log reads:

 04-03 00:06:53.383 I/ActivityManager( 1368): Start proc com.raghavsood.mpfor 
 activity
 com.raghavsood.mp/.matchpuzzler: pid=26022 uid=10113 gids={3003}
 04-03 00:06:53.553 W/dalvikvm(26022): threadid=1: thread exiting with
 uncaught exception (group=0x40020ac0)
 04-03 00:06:53.573 E/AndroidRuntime(26022): FATAL EXCEPTION: main
 04-03 00:06:53.573 E/AndroidRuntime(26022): java.lang.RuntimeException:
 Unable to instantiate activity ComponentInfo{
 com.raghavsood.mp/com.raghavsood.mp.matchpuzzler}:
 java.lang.NullPointerException
 04-03 00:06:53.573 E/AndroidRuntime(26022): at android.app.ActivityThread.

 performLaunchActivity(ActivityThread.java:2585)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.access$2300(ActivityThread.java:125)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.os.Looper.loop(Looper.java:123)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.main(ActivityThread.java:4627)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.reflect.Method.invokeNative(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.reflect.Method.invoke(Method.java:521)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 dalvik.system.NativeStart.main(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): Caused by:
 java.lang.NullPointerException
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.Activity.findViewById(Activity.java:1637)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.raghavsood.mp.matchpuzzler.init(matchpuzzler.java:14)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.Class.newInstanceImpl(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.Class.newInstance(Class.java:1429)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.Instrumentation.newActivity(Instrumentation.java:1021)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
 04-03 00:06:53.573 E/AndroidRuntime(26022): ... 11 more
 04-03 00:06:53.583 W/ActivityManager( 1368):   Force finishing activity
 com.raghavsood.mp/.matchpuzzler
 Now I have no idea as to what is wrong though it still seems to be my
 findviewbyid

 Please help


 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.com/
 http://www.telstop.tel/




 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.com/
 

Re: [android-developers] ImageView change image

2011-04-02 Thread Mark Murphy
You do not have a drawable resource named m1s, most likely.

On Sat, Apr 2, 2011 at 2:44 PM, Raghav Sood raghavs...@gmail.com wrote:
 Okay I fixed that but now the line in red cannot find the button imageview.

 public class class extends Activity {


     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {

     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
     AdView adView = (AdView)findViewById(R.id.ad);
         adView.requestFreshAd();
         ImageView button = (ImageView)findViewById(R.id.l1m1);
         // Register the onClick listener with the implementation above
         button.setOnClickListener(mCorkyListener);

     }
     public OnClickListener mCorkyListener = new OnClickListener() {
         public void onClick(View v) {
       button.setImageResource (R.drawable.m1s);
         }
     };
 }

 I know its because the button variable is part of the other method but how
 do I fix it?

 On Sun, Apr 3, 2011 at 12:09 AM, Raghav Sood raghavs...@gmail.com wrote:

 Sorry my fault. forgot to remove the imageview declaration from top.

 On Sun, Apr 3, 2011 at 12:07 AM, Raghav Sood raghavs...@gmail.com wrote:

 Okay I fixed that part now but it still force closes. My code now is:
 public class class extends Activity {
     ImageView button = (ImageView)findViewById(R.id.l1m1);
     public OnClickListener mCorkyListener = new OnClickListener() {
         public void onClick(View v) {
       button.setImageResource (R.drawable.m1s);
         }
     };

     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
     AdView adView = (AdView)findViewById(R.id.ad);
         adView.requestFreshAd();
         ImageView button = (ImageView)findViewById(R.id.l1m1);
         // Register the onClick listener with the implementation above
         button.setOnClickListener(mCorkyListener);

     }
 }

 and the log reads:

 04-03 00:06:53.383 I/ActivityManager( 1368): Start proc com.raghavsood.mp
 for activity com.raghavsood.mp/.matchpuzzler: pid=26022 uid=10113
 gids={3003}
 04-03 00:06:53.553 W/dalvikvm(26022): threadid=1: thread exiting with
 uncaught exception (group=0x40020ac0)
 04-03 00:06:53.573 E/AndroidRuntime(26022): FATAL EXCEPTION: main
 04-03 00:06:53.573 E/AndroidRuntime(26022): java.lang.RuntimeException:
 Unable to instantiate activity
 ComponentInfo{com.raghavsood.mp/com.raghavsood.mp.matchpuzzler}:
 java.lang.NullPointerException
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.

 performLaunchActivity(ActivityThread.java:2585)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.access$2300(ActivityThread.java:125)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.os.Looper.loop(Looper.java:123)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.main(ActivityThread.java:4627)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.reflect.Method.invokeNative(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.reflect.Method.invoke(Method.java:521)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 dalvik.system.NativeStart.main(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): Caused by:
 java.lang.NullPointerException
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.Activity.findViewById(Activity.java:1637)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 com.raghavsood.mp.matchpuzzler.init(matchpuzzler.java:14)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.Class.newInstanceImpl(Native Method)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 java.lang.Class.newInstance(Class.java:1429)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.Instrumentation.newActivity(Instrumentation.java:1021)
 04-03 00:06:53.573 E/AndroidRuntime(26022): at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
 04-03 00:06:53.573 E/AndroidRuntime(26022): ... 11 more
 04-03 00:06:53.583 W/ActivityManager( 1368):   Force finishing activity
 com.raghavsood.mp/.matchpuzzler

 Now I have no idea as to what is wrong though it still seems to be my
 findviewbyid

 Please help

 --
 Raghav Sood
 

Re: [android-developers] Re: OutofMemoryError on Thunderbolt: HttpClient.execute

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 2:36 PM, Nathan critter...@crittermap.com wrote:
 Is there anyway to change the global settings for buffer size?

Rebuild the firmware is the only solution, AFAIK.

 There are some connections I don't control, such as the dispatch on
 Google Analytics.

Oy.

Short of Analytics fixing this in their code, I think you're screwed.
Can you disable your use of Analytics if you're on a Thunderbolt?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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


Re: [android-developers] ImageView change image

2011-04-02 Thread Raghav Sood
No. that image is definitely there. The word button is getting underlined.
It says that it cannot find it. I think it is because button is declared in
the other method. How do I fix this?

On Sun, Apr 3, 2011 at 12:17 AM, Mark Murphy mmur...@commonsware.comwrote:

 You do not have a drawable resource named m1s, most likely.

 On Sat, Apr 2, 2011 at 2:44 PM, Raghav Sood raghavs...@gmail.com wrote:
  Okay I fixed that but now the line in red cannot find the button
 imageview.
 
  public class class extends Activity {
 
 
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
 
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  AdView adView = (AdView)findViewById(R.id.ad);
  adView.requestFreshAd();
  ImageView button = (ImageView)findViewById(R.id.l1m1);
  // Register the onClick listener with the implementation above
  button.setOnClickListener(mCorkyListener);
 
  }
  public OnClickListener mCorkyListener = new OnClickListener() {
  public void onClick(View v) {
button.setImageResource (R.drawable.m1s);
  }
  };
  }
 
  I know its because the button variable is part of the other method but
 how
  do I fix it?
 
  On Sun, Apr 3, 2011 at 12:09 AM, Raghav Sood raghavs...@gmail.com
 wrote:
 
  Sorry my fault. forgot to remove the imageview declaration from top.
 
  On Sun, Apr 3, 2011 at 12:07 AM, Raghav Sood raghavs...@gmail.com
 wrote:
 
  Okay I fixed that part now but it still force closes. My code now is:
  public class class extends Activity {
  ImageView button = (ImageView)findViewById(R.id.l1m1);
  public OnClickListener mCorkyListener = new OnClickListener() {
  public void onClick(View v) {
button.setImageResource (R.drawable.m1s);
  }
  };
 
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  AdView adView = (AdView)findViewById(R.id.ad);
  adView.requestFreshAd();
  ImageView button = (ImageView)findViewById(R.id.l1m1);
  // Register the onClick listener with the implementation above
  button.setOnClickListener(mCorkyListener);
 
  }
  }
 
  and the log reads:
 
  04-03 00:06:53.383 I/ActivityManager( 1368): Start proc
 com.raghavsood.mp
  for activity com.raghavsood.mp/.matchpuzzler: pid=26022 uid=10113
  gids={3003}
  04-03 00:06:53.553 W/dalvikvm(26022): threadid=1: thread exiting with
  uncaught exception (group=0x40020ac0)
  04-03 00:06:53.573 E/AndroidRuntime(26022): FATAL EXCEPTION: main
  04-03 00:06:53.573 E/AndroidRuntime(26022): java.lang.RuntimeException:
  Unable to instantiate activity
  ComponentInfo{com.raghavsood.mp/com.raghavsood.mp.matchpuzzler}:
  java.lang.NullPointerException
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.ActivityThread.
 
  performLaunchActivity(ActivityThread.java:2585)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
 
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.ActivityThread.access$2300(ActivityThread.java:125)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.os.Handler.dispatchMessage(Handler.java:99)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.os.Looper.loop(Looper.java:123)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.ActivityThread.main(ActivityThread.java:4627)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  java.lang.reflect.Method.invokeNative(Native Method)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  java.lang.reflect.Method.invoke(Method.java:521)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
 
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  dalvik.system.NativeStart.main(Native Method)
  04-03 00:06:53.573 E/AndroidRuntime(26022): Caused by:
  java.lang.NullPointerException
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.Activity.findViewById(Activity.java:1637)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  com.raghavsood.mp.matchpuzzler.init(matchpuzzler.java:14)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  java.lang.Class.newInstanceImpl(Native Method)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  java.lang.Class.newInstance(Class.java:1429)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.Instrumentation.newActivity(Instrumentation.java:1021)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
 

Re: [android-developers] ImageView change image

2011-04-02 Thread TreKing
On Sat, Apr 2, 2011 at 1:53 PM, Raghav Sood raghavs...@gmail.com wrote:

 How do I fix this?


Learn Java. Then look up scope.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

Re: [android-developers] ImageView change image

2011-04-02 Thread Mark Murphy
Oh, sorry. You need to make that be a data member of your activity.
You moved the whole line into onCreate(). You need to declare the data
member where you had it, but not initialize it until onCreate().

You appear to be new to Java. I *strongly* encourage you to take some
time and learn Java outside of Android. Here is a blog post where I
link to free Wikibooks material on the various Java topics that
Android developers need to learn:

http://commonsware.com/blog/2010/08/02/java-good-parts-version.html

On Sat, Apr 2, 2011 at 2:53 PM, Raghav Sood raghavs...@gmail.com wrote:
 No. that image is definitely there. The word button is getting underlined.
 It says that it cannot find it. I think it is because button is declared in
 the other method. How do I fix this?

 On Sun, Apr 3, 2011 at 12:17 AM, Mark Murphy mmur...@commonsware.com
 wrote:

 You do not have a drawable resource named m1s, most likely.

 On Sat, Apr 2, 2011 at 2:44 PM, Raghav Sood raghavs...@gmail.com wrote:
  Okay I fixed that but now the line in red cannot find the button
  imageview.
 
  public class class extends Activity {
 
 
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
 
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      AdView adView = (AdView)findViewById(R.id.ad);
          adView.requestFreshAd();
          ImageView button = (ImageView)findViewById(R.id.l1m1);
          // Register the onClick listener with the implementation above
          button.setOnClickListener(mCorkyListener);
 
      }
      public OnClickListener mCorkyListener = new OnClickListener() {
          public void onClick(View v) {
        button.setImageResource (R.drawable.m1s);
          }
      };
  }
 
  I know its because the button variable is part of the other method but
  how
  do I fix it?
 
  On Sun, Apr 3, 2011 at 12:09 AM, Raghav Sood raghavs...@gmail.com
  wrote:
 
  Sorry my fault. forgot to remove the imageview declaration from top.
 
  On Sun, Apr 3, 2011 at 12:07 AM, Raghav Sood raghavs...@gmail.com
  wrote:
 
  Okay I fixed that part now but it still force closes. My code now is:
  public class class extends Activity {
      ImageView button = (ImageView)findViewById(R.id.l1m1);
      public OnClickListener mCorkyListener = new OnClickListener() {
          public void onClick(View v) {
        button.setImageResource (R.drawable.m1s);
          }
      };
 
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      AdView adView = (AdView)findViewById(R.id.ad);
          adView.requestFreshAd();
          ImageView button = (ImageView)findViewById(R.id.l1m1);
          // Register the onClick listener with the implementation above
          button.setOnClickListener(mCorkyListener);
 
      }
  }
 
  and the log reads:
 
  04-03 00:06:53.383 I/ActivityManager( 1368): Start proc
  com.raghavsood.mp
  for activity com.raghavsood.mp/.matchpuzzler: pid=26022 uid=10113
  gids={3003}
  04-03 00:06:53.553 W/dalvikvm(26022): threadid=1: thread exiting with
  uncaught exception (group=0x40020ac0)
  04-03 00:06:53.573 E/AndroidRuntime(26022): FATAL EXCEPTION: main
  04-03 00:06:53.573 E/AndroidRuntime(26022):
  java.lang.RuntimeException:
  Unable to instantiate activity
  ComponentInfo{com.raghavsood.mp/com.raghavsood.mp.matchpuzzler}:
  java.lang.NullPointerException
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.ActivityThread.
 
  performLaunchActivity(ActivityThread.java:2585)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
 
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.ActivityThread.access$2300(ActivityThread.java:125)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.os.Handler.dispatchMessage(Handler.java:99)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.os.Looper.loop(Looper.java:123)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  android.app.ActivityThread.main(ActivityThread.java:4627)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  java.lang.reflect.Method.invokeNative(Native Method)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  java.lang.reflect.Method.invoke(Method.java:521)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
 
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
  04-03 00:06:53.573 E/AndroidRuntime(26022): at
  dalvik.system.NativeStart.main(Native Method)
  04-03 00:06:53.573 E/AndroidRuntime(26022): Caused by:
  

Re: [android-developers] ImageView change image

2011-04-02 Thread Raghav Sood
Thanks Mark and TreKing,

It works perfectly now.

I am not new to Java. I have been working with it for over 2 years but not
very often. I am just a little out of practice and maybe need to refresh my
memory.Thanks for the links anyways.

Thanks

On Sun, Apr 3, 2011 at 12:27 AM, TreKing treking...@gmail.com wrote:

 On Sat, Apr 2, 2011 at 1:53 PM, Raghav Sood raghavs...@gmail.com wrote:

 How do I fix this?


 Learn Java. Then look up scope.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 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




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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] Honeycomb screenOrientation not working

2011-04-02 Thread Kevin
I have a small app that has the screenOrientation set to portrait in
the manifest file for the single activity it contains.

It works fine, except for Honeycomb devices, which users are reporting
to me that if they are holding the device in landscape position, the
app will crash instead of remaining in portrait mode.

Do I have to do something extra to keep it forced in portrait, or is
it simply not possible to do this in Honeycomb?

-- 
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] assign drawable to variable not imageview

2011-04-02 Thread Raghav Sood
Hi,

I need to use this function:
public Drawable getDrawable ().
How do I assign this to a variable and which type of variable do I need.
Also is there a better way of finding out an imageview's current image
resource?

Thanks
-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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

Re: [android-developers] Honeycomb screenOrientation not working

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 3:06 PM, Kevin khant...@hotmail.com wrote:
 I have a small app that has the screenOrientation set to portrait in
 the manifest file for the single activity it contains.

 It works fine, except for Honeycomb devices, which users are reporting
 to me that if they are holding the device in landscape position, the
 app will crash instead of remaining in portrait mode.

 Do I have to do something extra to keep it forced in portrait, or is
 it simply not possible to do this in Honeycomb?

This sample project works fine on Honeycomb:

https://github.com/commonsguy/cw-android/tree/master/Rotation/RotationFour

If you have an app in production, you should be doing something to get
stack traces (e.g., Android Market console, ACRA, Flurry), which
should help you determine where things are going wrong.

Bear in mind that having android:screenOrientation=portrait does not
stop Android from destroying and recreating your activity. Hence, you
still need to use onSaveInstanceState() and/or
onRetainNonConfigurationInstance(), just as you do for any other
configuration change (dock, locale, etc.).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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


Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 3:14 PM, Raghav Sood raghavs...@gmail.com wrote:
 I need to use this function:

 public Drawable getDrawable ().

 How do I assign this to a variable and which type of variable do I need.

Presumably, you need a Drawable variable. You assign it the same way
you assign anything else in Java. Please consider asking Java syntax
questions on StackOverflow, tagged with the 'java' tag.

 Also is there a better way of finding out an imageview's current image
 resource?

Track it yourself, since you are the one assigning the resources to
the ImageView. An ImageView may not have a current image resource,
since it may not have been populated with a resource in the first
place (e.g., loaded with a bitmap from a downloaded PNG file). If you
are trying to use getDrawable() to tell what your current image
resource is, that will not work.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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


Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Raghav Sood
Thanks Mark,

Got it working

On Sun, Apr 3, 2011 at 12:51 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Sat, Apr 2, 2011 at 3:14 PM, Raghav Sood raghavs...@gmail.com wrote:
  I need to use this function:
 
  public Drawable getDrawable ().
 
  How do I assign this to a variable and which type of variable do I need.

 Presumably, you need a Drawable variable. You assign it the same way
 you assign anything else in Java. Please consider asking Java syntax
 questions on StackOverflow, tagged with the 'java' tag.

  Also is there a better way of finding out an imageview's current image
  resource?

 Track it yourself, since you are the one assigning the resources to
 the ImageView. An ImageView may not have a current image resource,
 since it may not have been populated with a resource in the first
 place (e.g., loaded with a bitmap from a downloaded PNG file). If you
 are trying to use getDrawable() to tell what your current image
 resource is, that will not work.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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: in-app billing problems

2011-04-02 Thread Tony

Update : after one day and a half, I am trying my code again and this
time everything works :-). So I guess it is my fault to try something
right after the announcement... :-)

Two notes, though :

1) you need to have a real credit card assigned to your google test
account (and you will be charged for real when you do the test
purchases). Keep this in mind...

2) you need to deploy the production-signed apk on the test device,
when you test against the market. So export a production signed
version from Eclipse, upload it as a draft on the Market, create/
modify your in-apps items on the market, publish them. Then deploy the
same apk on the test device with test google account and do the
testing.

Anyway, it's fine now. Guys, thanks for the comments and good 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


Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Raghav Sood
Got the assigning working. Does this method return a value like
R.drawable.imagename or some other thing.

On Sun, Apr 3, 2011 at 12:54 AM, Raghav Sood raghavs...@gmail.com wrote:

 Thanks Mark,

 Got it working


 On Sun, Apr 3, 2011 at 12:51 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Sat, Apr 2, 2011 at 3:14 PM, Raghav Sood raghavs...@gmail.com wrote:
  I need to use this function:
 
  public Drawable getDrawable ().
 
  How do I assign this to a variable and which type of variable do I need.

 Presumably, you need a Drawable variable. You assign it the same way
 you assign anything else in Java. Please consider asking Java syntax
 questions on StackOverflow, tagged with the 'java' tag.

  Also is there a better way of finding out an imageview's current image
  resource?

 Track it yourself, since you are the one assigning the resources to
 the ImageView. An ImageView may not have a current image resource,
 since it may not have been populated with a resource in the first
 place (e.g., loaded with a bitmap from a downloaded PNG file). If you
 are trying to use getDrawable() to tell what your current image
 resource is, that will not work.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.com/
 http://www.telstop.tel/




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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: Honeycomb screenOrientation not working

2011-04-02 Thread Kevin
I do have a stack trace, it crashed in the onCreate method when
calling setContentView with a ResourcesNotFoundException.  This seems
to indicate that it was trying to load the landscape xml layout, which
of course doesn't exist since it's supposed to always be portrait and
I didn't make a landscape layout file.

I do use onSaveInstanceState, but I don't think that's applicable
here, it crashes right on startup according to the user.

Perhaps Honeycomb always loads the landscape layout first and then
destroys it and loads the portrait according to the manifest property?

java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.molskness.loadplanner/
com.molskness.loadplanner.LoadPlanner}: android.content.res.Resources
$NotFoundException: Resource ID #0x7f03
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1736)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
1752)
at android.app.ActivityThread.access$1500(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:126)
at android.app.ActivityThread.main(ActivityThread.java:3997)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource
ID #0x7f03
at android.content.res.Resources.getValue(Resources.java:1014)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:
2039)
at android.content.res.Resources.getLayout(Resources.java:853)
at android.view.LayoutInflater.inflate(LayoutInflater.java:389)
at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
224)
at android.app.Activity.setContentView(Activity.java:1771)
at com.molskness.loadplanner.LoadPlanner.onCreate(LoadPlanner.java:
107)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1048)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1700)
... 11 more

On Apr 2, 12:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Apr 2, 2011 at 3:06 PM, Kevin khant...@hotmail.com wrote:
  I have a small app that has the screenOrientation set to portrait in
  the manifest file for the single activity it contains.

  It works fine, except for Honeycomb devices, which users are reporting
  to me that if they are holding the device in landscape position, the
  app will crash instead of remaining in portrait mode.

  Do I have to do something extra to keep it forced in portrait, or is
  it simply not possible to do this in Honeycomb?

 This sample project works fine on Honeycomb:

 https://github.com/commonsguy/cw-android/tree/master/Rotation/Rotatio...

 If you have an app in production, you should be doing something to get
 stack traces (e.g., Android Market console, ACRA, Flurry), which
 should help you determine where things are going wrong.

 Bear in mind that having android:screenOrientation=portrait does not
 stop Android from destroying and recreating your activity. Hence, you
 still need to use onSaveInstanceState() and/or
 onRetainNonConfigurationInstance(), just as you do for any other
 configuration change (dock, locale, etc.).

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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


Re: [android-developers] Re: Honeycomb screenOrientation not working

2011-04-02 Thread Mark Murphy
Have you looked in your R.java file (assuming you have the exact
R.java file corresponding with the production code) to see what
resource has the ID of 0x7f03?

If your layout is in res/layout/, Android will always find it.

On Sat, Apr 2, 2011 at 3:43 PM, Kevin khant...@hotmail.com wrote:
 I do have a stack trace, it crashed in the onCreate method when
 calling setContentView with a ResourcesNotFoundException.  This seems
 to indicate that it was trying to load the landscape xml layout, which
 of course doesn't exist since it's supposed to always be portrait and
 I didn't make a landscape layout file.

 I do use onSaveInstanceState, but I don't think that's applicable
 here, it crashes right on startup according to the user.

 Perhaps Honeycomb always loads the landscape layout first and then
 destroys it and loads the portrait according to the manifest property?

 java.lang.RuntimeException: Unable to start activity
 ComponentInfo{com.molskness.loadplanner/
 com.molskness.loadplanner.LoadPlanner}: android.content.res.Resources
 $NotFoundException: Resource ID #0x7f03
 at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 1736)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 1752)
 at android.app.ActivityThread.access$1500(ActivityThread.java:123)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:126)
 at android.app.ActivityThread.main(ActivityThread.java:3997)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:491)
 at com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:841)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
 at dalvik.system.NativeStart.main(Native Method)
 Caused by: android.content.res.Resources$NotFoundException: Resource
 ID #0x7f03
 at android.content.res.Resources.getValue(Resources.java:1014)
 at android.content.res.Resources.loadXmlResourceParser(Resources.java:
 2039)
 at android.content.res.Resources.getLayout(Resources.java:853)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:389)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
 at
 com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
 224)
 at android.app.Activity.setContentView(Activity.java:1771)
 at com.molskness.loadplanner.LoadPlanner.onCreate(LoadPlanner.java:
 107)
 at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1048)
 at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 1700)
 ... 11 more

 On Apr 2, 12:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Apr 2, 2011 at 3:06 PM, Kevin khant...@hotmail.com wrote:
  I have a small app that has the screenOrientation set to portrait in
  the manifest file for the single activity it contains.

  It works fine, except for Honeycomb devices, which users are reporting
  to me that if they are holding the device in landscape position, the
  app will crash instead of remaining in portrait mode.

  Do I have to do something extra to keep it forced in portrait, or is
  it simply not possible to do this in Honeycomb?

 This sample project works fine on Honeycomb:

 https://github.com/commonsguy/cw-android/tree/master/Rotation/Rotatio...

 If you have an app in production, you should be doing something to get
 stack traces (e.g., Android Market console, ACRA, Flurry), which
 should help you determine where things are going wrong.

 Bear in mind that having android:screenOrientation=portrait does not
 stop Android from destroying and recreating your activity. Hence, you
 still need to use onSaveInstanceState() and/or
 onRetainNonConfigurationInstance(), just as you do for any other
 configuration change (dock, locale, etc.).

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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

Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 3:40 PM, Raghav Sood raghavs...@gmail.com wrote:
 Got the assigning working. Does this method return a value like
 R.drawable.imagename or some other thing.

No, R.drawable.imagename is an integer.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: Mac phone

2011-04-02 Thread Maps.Huge.Info (Maps API Guru)
Every one I've tried works with the Mac.

Evo
Droid
Nexus One
Magic

I think you'll find it's not an issue.

-John Coryat

-- 
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


Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Raghav Sood
I found that out. I need to use this for an if else. What value do I need to
put on the other side of the ==?

Thanks

On Sun, Apr 3, 2011 at 1:19 AM, Mark Murphy mmur...@commonsware.com wrote:

 On Sat, Apr 2, 2011 at 3:40 PM, Raghav Sood raghavs...@gmail.com wrote:
  Got the assigning working. Does this method return a value like
  R.drawable.imagename or some other thing.

 No, R.drawable.imagename is an integer.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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] Add a new resource and an old resource is no longer found

2011-04-02 Thread trans
Hi--

I had a res/values directory like so:

  colors.xml
  dimens.xml
  strings.xml

Everything worked fine. Then I added a new file, `dictionary.xml`. Now
when I run my app I get a  Resources$NotFoundException for a resource
that is in the dimens.xml file.

I don't see any reason for it. Any one know why this might happen?

I am using the Linux emulator for development, btw.

-- 
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] Is there any method in Android through which we can add some message secretly in the end of Video clip?

2011-04-02 Thread Nilay
Hello All,

I am working on Android Multimedia Framework,

My query is, Is there any method in Android through which we can add
some message secretly in the end of Video or Video Frame?

Please If any method or program is there then help me.

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] setting alarm

2011-04-02 Thread niju
Hi,

i am facing issues for  setting alarm through android code.
I  gone through  most of the documents  on net  about alarmmanager and
how to use it but  nothing worked.

please  find  the code am using  ,is it the right way for  setting
alarm .
i  am setting it for  8 AM morning .but  its not  working  i am
strugling on it for 3 hrs.
i am testing it on emulator.
:(
Calendar calendar = new GregorianCalendar(); or // Calendar calendar =
new Calendar();
 calendar.set(Calendar.HOUR_OF_DAY,1);
calendar.set(Calendar.MINUTE,12);
 calendar.set(Calendar.SECOND, 0);
 alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
pendingIntent);

Thank  you

-- 
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


Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 3:53 PM, Raghav Sood raghavs...@gmail.com wrote:
 I found that out. I need to use this for an if else. What value do I need to
 put on the other side of the ==?

How should I know?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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


Re: [android-developers] setting alarm

2011-04-02 Thread Mark Murphy
calendar.set(Calendar.HOUR_OF_DAY,1);
calendar.set(Calendar.MINUTE,12);

This is 1:12am, not 8am.

Also:

-- Use Calendar.getInstance()
-- Do not forget that if it is after 1:12am today (which is to say,
the bulk of the day), this time will be in the past

On Sat, Apr 2, 2011 at 3:57 PM, niju neerajmur...@gmail.com wrote:
 Hi,

 i am facing issues for  setting alarm through android code.
 I  gone through  most of the documents  on net  about alarmmanager and
 how to use it but  nothing worked.

 please  find  the code am using  ,is it the right way for  setting
 alarm .
 i  am setting it for  8 AM morning .but  its not  working  i am
 strugling on it for 3 hrs.
 i am testing it on emulator.
 :(
 Calendar calendar = new GregorianCalendar(); or // Calendar calendar =
 new Calendar();
  calendar.set(Calendar.HOUR_OF_DAY,1);
 calendar.set(Calendar.MINUTE,12);
  calendar.set(Calendar.SECOND, 0);
  alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
 pendingIntent);

 Thank  you

 --
 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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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


Re: [android-developers] Is there any method in Android through which we can add some message secretly in the end of Video clip?

2011-04-02 Thread Mark Murphy
No.

On Sat, Apr 2, 2011 at 3:56 PM, Nilay nilaymistr...@gmail.com wrote:
 Hello All,

 I am working on Android Multimedia Framework,

 My query is, Is there any method in Android through which we can add
 some message secretly in the end of Video or Video Frame?

 Please If any method or program is there then help me.

 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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: Honeycomb screenOrientation not working

2011-04-02 Thread Kevin
That ID is the layout file, but it's in /res/layout-port/ I don't have
a /res/layout/ or /res/layout-land/.  So it must not be looking in /
res/layout-port/ even though it's supposed to always use the portfolio
orientation...

It works fine on 2.2 and lower, I don't get it.

On Apr 2, 12:48 pm, Mark Murphy mmur...@commonsware.com wrote:
 Have you looked in your R.java file (assuming you have the exact
 R.java file corresponding with the production code) to see what
 resource has the ID of 0x7f03?

 If your layout is in res/layout/, Android will always find it.









 On Sat, Apr 2, 2011 at 3:43 PM, Kevin khant...@hotmail.com wrote:
  I do have a stack trace, it crashed in the onCreate method when
  calling setContentView with a ResourcesNotFoundException.  This seems
  to indicate that it was trying to load the landscape xml layout, which
  of course doesn't exist since it's supposed to always be portrait and
  I didn't make a landscape layout file.

  I do use onSaveInstanceState, but I don't think that's applicable
  here, it crashes right on startup according to the user.

  Perhaps Honeycomb always loads the landscape layout first and then
  destroys it and loads the portrait according to the manifest property?

  java.lang.RuntimeException: Unable to start activity
  ComponentInfo{com.molskness.loadplanner/
  com.molskness.loadplanner.LoadPlanner}: android.content.res.Resources
  $NotFoundException: Resource ID #0x7f03
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
  1736)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
  1752)
  at android.app.ActivityThread.access$1500(ActivityThread.java:123)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:126)
  at android.app.ActivityThread.main(ActivityThread.java:3997)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:491)
  at com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:841)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
  at dalvik.system.NativeStart.main(Native Method)
  Caused by: android.content.res.Resources$NotFoundException: Resource
  ID #0x7f03
  at android.content.res.Resources.getValue(Resources.java:1014)
  at android.content.res.Resources.loadXmlResourceParser(Resources.java:
  2039)
  at android.content.res.Resources.getLayout(Resources.java:853)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:389)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
  at
  com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
  224)
  at android.app.Activity.setContentView(Activity.java:1771)
  at com.molskness.loadplanner.LoadPlanner.onCreate(LoadPlanner.java:
  107)
  at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
  1048)
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
  1700)
  ... 11 more

  On Apr 2, 12:16 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Sat, Apr 2, 2011 at 3:06 PM, Kevin khant...@hotmail.com wrote:
   I have a small app that has the screenOrientation set to portrait in
   the manifest file for the single activity it contains.

   It works fine, except for Honeycomb devices, which users are reporting
   to me that if they are holding the device in landscape position, the
   app will crash instead of remaining in portrait mode.

   Do I have to do something extra to keep it forced in portrait, or is
   it simply not possible to do this in Honeycomb?

  This sample project works fine on Honeycomb:

 https://github.com/commonsguy/cw-android/tree/master/Rotation/Rotatio...

  If you have an app in production, you should be doing something to get
  stack traces (e.g., Android Market console, ACRA, Flurry), which
  should help you determine where things are going wrong.

  Bear in mind that having android:screenOrientation=portrait does not
  stop Android from destroying and recreating your activity. Hence, you
  still need to use onSaveInstanceState() and/or
  onRetainNonConfigurationInstance(), just as you do for any other
  configuration change (dock, locale, etc.).

  --
  Mark Murphy (a Commons 
  Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

  _The Busy Coder's Guide to *Advanced* Android Development_ Version
  1.9.2 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

 --
 Mark Murphy (a Commons 
 

Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Raghav Sood
sorry my fault. I wasn't specific enough. Should I pur R.drawable.imagename
or what? R.drawable.imagename is an integer so what would be the drawable
version of that?

On Sun, Apr 3, 2011 at 1:28 AM, Mark Murphy mmur...@commonsware.com wrote:

 On Sat, Apr 2, 2011 at 3:53 PM, Raghav Sood raghavs...@gmail.com wrote:
  I found that out. I need to use this for an if else. What value do I need
 to
  put on the other side of the ==?

 How should I know?

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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: Mac phone

2011-04-02 Thread bob
I got a Huawei Ascend, and I don't know how to get it working on Mac.
I don't think it works on Mac.

Do you usually have to install some drivers?  Do the phones usually
come with Mac drivers?

On Apr 2, 2:51 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com
wrote:
 Every one I've tried works with the Mac.

 Evo
 Droid
 Nexus One
 Magic

 I think you'll find it's not an issue.

 -John Coryat

-- 
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


Re: [android-developers] Re: Honeycomb screenOrientation not working

2011-04-02 Thread Mark Murphy
Well, that's a risky setup anyway. *Always* have one of *every*
resource in the default resource set (e.g., one of every layout in
res/layout/). Override as needed.

On Sat, Apr 2, 2011 at 4:03 PM, Kevin khant...@hotmail.com wrote:
 That ID is the layout file, but it's in /res/layout-port/ I don't have
 a /res/layout/ or /res/layout-land/.  So it must not be looking in /
 res/layout-port/ even though it's supposed to always use the portfolio
 orientation...

 It works fine on 2.2 and lower, I don't get it.

 On Apr 2, 12:48 pm, Mark Murphy mmur...@commonsware.com wrote:
 Have you looked in your R.java file (assuming you have the exact
 R.java file corresponding with the production code) to see what
 resource has the ID of 0x7f03?

 If your layout is in res/layout/, Android will always find it.









 On Sat, Apr 2, 2011 at 3:43 PM, Kevin khant...@hotmail.com wrote:
  I do have a stack trace, it crashed in the onCreate method when
  calling setContentView with a ResourcesNotFoundException.  This seems
  to indicate that it was trying to load the landscape xml layout, which
  of course doesn't exist since it's supposed to always be portrait and
  I didn't make a landscape layout file.

  I do use onSaveInstanceState, but I don't think that's applicable
  here, it crashes right on startup according to the user.

  Perhaps Honeycomb always loads the landscape layout first and then
  destroys it and loads the portrait according to the manifest property?

  java.lang.RuntimeException: Unable to start activity
  ComponentInfo{com.molskness.loadplanner/
  com.molskness.loadplanner.LoadPlanner}: android.content.res.Resources
  $NotFoundException: Resource ID #0x7f03
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
  1736)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
  1752)
  at android.app.ActivityThread.access$1500(ActivityThread.java:123)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:126)
  at android.app.ActivityThread.main(ActivityThread.java:3997)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:491)
  at com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:841)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
  at dalvik.system.NativeStart.main(Native Method)
  Caused by: android.content.res.Resources$NotFoundException: Resource
  ID #0x7f03
  at android.content.res.Resources.getValue(Resources.java:1014)
  at android.content.res.Resources.loadXmlResourceParser(Resources.java:
  2039)
  at android.content.res.Resources.getLayout(Resources.java:853)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:389)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
  at
  com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
  224)
  at android.app.Activity.setContentView(Activity.java:1771)
  at com.molskness.loadplanner.LoadPlanner.onCreate(LoadPlanner.java:
  107)
  at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
  1048)
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
  1700)
  ... 11 more

  On Apr 2, 12:16 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Sat, Apr 2, 2011 at 3:06 PM, Kevin khant...@hotmail.com wrote:
   I have a small app that has the screenOrientation set to portrait in
   the manifest file for the single activity it contains.

   It works fine, except for Honeycomb devices, which users are reporting
   to me that if they are holding the device in landscape position, the
   app will crash instead of remaining in portrait mode.

   Do I have to do something extra to keep it forced in portrait, or is
   it simply not possible to do this in Honeycomb?

  This sample project works fine on Honeycomb:

 https://github.com/commonsguy/cw-android/tree/master/Rotation/Rotatio...

  If you have an app in production, you should be doing something to get
  stack traces (e.g., Android Market console, ACRA, Flurry), which
  should help you determine where things are going wrong.

  Bear in mind that having android:screenOrientation=portrait does not
  stop Android from destroying and recreating your activity. Hence, you
  still need to use onSaveInstanceState() and/or
  onRetainNonConfigurationInstance(), just as you do for any other
  configuration change (dock, locale, etc.).

  --
  Mark Murphy (a Commons 
  Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

  _The Busy Coder's Guide to *Advanced* Android Development_ Version
  1.9.2 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 

Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 4:06 PM, Raghav Sood raghavs...@gmail.com wrote:
 sorry my fault. I wasn't specific enough. Should I pur R.drawable.imagename
 or what? R.drawable.imagename is an integer so what would be the drawable
 version of that?

There is no Drawable version of that.

At the risk of quoting myself:

An ImageView may not have a current image resource,
since it may not have been populated with a resource in the first
place (e.g., loaded with a bitmap from a downloaded PNG file). If you
are trying to use getDrawable() to tell what your current image
resource is, that will not work.


 On Sun, Apr 3, 2011 at 1:28 AM, Mark Murphy mmur...@commonsware.com wrote:

 On Sat, Apr 2, 2011 at 3:53 PM, Raghav Sood raghavs...@gmail.com wrote:
  I found that out. I need to use this for an if else. What value do I
  need to
  put on the other side of the ==?

 How should I know?

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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


 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.com/
 http://www.telstop.tel/

 --
 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



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: custom dialog frame - how to get a pointy triangle edge

2011-04-02 Thread Nick Longinow
Successfully got a .9.png file created and applied it to my ListView -
looks very nice.  Problem - the AlertDialog I want to use it for seems
to add a rectangle with white interior as a container or border around
my ListView.  I'd like it to be transparent, and only show the
ListView. Do I have to do an extends alertdialog class to get rid of
that white border?

On Mar 30, 6:21 pm, Nick Longinow nicklongi...@gmail.com wrote:
 Then that's what I'll do.  Moving the triangle around randomly isn't
 very important. Thanks all.

 On Mar 29, 10:29 pm, Dianne Hackborn hack...@android.com wrote:



  No, use a 9-patch.  That said, if you want to actually position the triangle
  at different places in the border you probably will need to give up on just
  setting a custom background drawable and have to draw your own background
  with things positioned where you want.

  On Tue, Mar 29, 2011 at 6:06 PM, Nick Longinow 
  nicklongi...@gmail.comwrote:

   I'm looking for something more like a shape where the vertices are
   set to like a rectangle, but with one side that has a triangle shape
   coming out of it.  I believe I create this as a drawable in the XML
   layout, and then set the Dialog to use this drawable as the
   background.  True so far?

   On Mar 27, 11:01 pm, Hari Edo hari@gmail.com wrote:
If you mean like the SMS app, you can do that with a .9.png
image file, also called a Nine Patch.

   http://developer.android.com/guide/topics/graphics/2d-graphics.html#n...

On Mar 27, 10:34 pm, Nick Longinow nicklongi...@gmail.com wrote:

 Like a balloon-style dialog, with one side of the dialog having a
 triangle coming out of it so that the dialog appears to point to some
 portion of the screen.  I've seen these in alot of apps - what is the
 basic idea here?  Is it use of shapes and themes?  Any simple examples
 out there?- Hide quoted text -

- Show quoted text -

   --
   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

  --
  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.- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android 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


Re: [android-developers] Re: Mac phone

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 4:11 PM, bob b...@coolgroups.com wrote:
 I got a Huawei Ascend, and I don't know how to get it working on Mac.
 I don't think it works on Mac.

 Do you usually have to install some drivers?  Do the phones usually
 come with Mac drivers?

There are no Mac drivers for any phone, AFAIK. It should just work:

http://developer.android.com/guide/developing/device.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: Honeycomb screenOrientation not working

2011-04-02 Thread Kevin
Yeah I can see why it's a good idea to always have a default.  In the
case of this app though, I don't know if a generic layout would work
for both layout and portrait, it would usually extend off the screen
in one direction or another.  I suppose I could put it in a scrolling
layout for the default.

Thanks for the help.

On Apr 2, 1:14 pm, Mark Murphy mmur...@commonsware.com wrote:
 Well, that's a risky setup anyway. *Always* have one of *every*
 resource in the default resource set (e.g., one of every layout in
 res/layout/). Override as needed.









 On Sat, Apr 2, 2011 at 4:03 PM, Kevin khant...@hotmail.com wrote:
  That ID is the layout file, but it's in /res/layout-port/ I don't have
  a /res/layout/ or /res/layout-land/.  So it must not be looking in /
  res/layout-port/ even though it's supposed to always use the portfolio
  orientation...

  It works fine on 2.2 and lower, I don't get it.

  On Apr 2, 12:48 pm, Mark Murphy mmur...@commonsware.com wrote:
  Have you looked in your R.java file (assuming you have the exact
  R.java file corresponding with the production code) to see what
  resource has the ID of 0x7f03?

  If your layout is in res/layout/, Android will always find it.

  On Sat, Apr 2, 2011 at 3:43 PM, Kevin khant...@hotmail.com wrote:
   I do have a stack trace, it crashed in the onCreate method when
   calling setContentView with a ResourcesNotFoundException.  This seems
   to indicate that it was trying to load the landscape xml layout, which
   of course doesn't exist since it's supposed to always be portrait and
   I didn't make a landscape layout file.

   I do use onSaveInstanceState, but I don't think that's applicable
   here, it crashes right on startup according to the user.

   Perhaps Honeycomb always loads the landscape layout first and then
   destroys it and loads the portrait according to the manifest property?

   java.lang.RuntimeException: Unable to start activity
   ComponentInfo{com.molskness.loadplanner/
   com.molskness.loadplanner.LoadPlanner}: android.content.res.Resources
   $NotFoundException: Resource ID #0x7f03
   at
   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
   1736)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
   1752)
   at android.app.ActivityThread.access$1500(ActivityThread.java:123)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:126)
   at android.app.ActivityThread.main(ActivityThread.java:3997)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:491)
   at com.android.internal.os.ZygoteInit
   $MethodAndArgsCaller.run(ZygoteInit.java:841)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
   at dalvik.system.NativeStart.main(Native Method)
   Caused by: android.content.res.Resources$NotFoundException: Resource
   ID #0x7f03
   at android.content.res.Resources.getValue(Resources.java:1014)
   at android.content.res.Resources.loadXmlResourceParser(Resources.java:
   2039)
   at android.content.res.Resources.getLayout(Resources.java:853)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:389)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
   at
   com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
   224)
   at android.app.Activity.setContentView(Activity.java:1771)
   at com.molskness.loadplanner.LoadPlanner.onCreate(LoadPlanner.java:
   107)
   at
   android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
   1048)
   at
   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
   1700)
   ... 11 more

   On Apr 2, 12:16 pm, Mark Murphy mmur...@commonsware.com wrote:
   On Sat, Apr 2, 2011 at 3:06 PM, Kevin khant...@hotmail.com wrote:
I have a small app that has the screenOrientation set to portrait in
the manifest file for the single activity it contains.

It works fine, except for Honeycomb devices, which users are reporting
to me that if they are holding the device in landscape position, the
app will crash instead of remaining in portrait mode.

Do I have to do something extra to keep it forced in portrait, or is
it simply not possible to do this in Honeycomb?

   This sample project works fine on Honeycomb:

  https://github.com/commonsguy/cw-android/tree/master/Rotation/Rotatio...

   If you have an app in production, you should be doing something to get
   stack traces (e.g., Android Market console, ACRA, Flurry), which
   should help you determine where things are going wrong.

   Bear in mind that having android:screenOrientation=portrait does not
   stop Android from destroying and recreating your activity. Hence, you
   still need to use onSaveInstanceState() and/or
   onRetainNonConfigurationInstance(), just as you do for any other
   configuration 

Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Raghav Sood
Oh. Right sorry. Seeing as thiss will not work do I use something like
getResources().getIdentifier to find the current image in the image view?

On Sun, Apr 3, 2011 at 1:45 AM, Mark Murphy mmur...@commonsware.com wrote:

 On Sat, Apr 2, 2011 at 4:06 PM, Raghav Sood raghavs...@gmail.com wrote:
  sorry my fault. I wasn't specific enough. Should I pur
 R.drawable.imagename
  or what? R.drawable.imagename is an integer so what would be the drawable
  version of that?

 There is no Drawable version of that.

 At the risk of quoting myself:

 An ImageView may not have a current image resource,
 since it may not have been populated with a resource in the first
 place (e.g., loaded with a bitmap from a downloaded PNG file). If you
 are trying to use getDrawable() to tell what your current image
 resource is, that will not work.

 
  On Sun, Apr 3, 2011 at 1:28 AM, Mark Murphy mmur...@commonsware.com
 wrote:
 
  On Sat, Apr 2, 2011 at 3:53 PM, Raghav Sood raghavs...@gmail.com
 wrote:
   I found that out. I need to use this for an if else. What value do I
   need to
   put on the other side of the ==?
 
  How should I know?
 
  --
  Mark Murphy (a Commons Guy)
  http://commonsware.com | http://github.com/commonsguy
  http://commonsware.com/blog | http://twitter.com/commonsguy
 
  _The Busy Coder's Guide to *Advanced* Android Development_ Version
  1.9.2 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
 
 
  --
  Raghav Sood
  http://www.raghavsood.com/
  http://www.androidappcheck.com/
  http://www.telstop.tel/
 
  --
  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



 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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

Re: [android-developers] assign drawable to variable not imageview

2011-04-02 Thread Mark Murphy
On Sat, Apr 2, 2011 at 4:21 PM, Raghav Sood raghavs...@gmail.com wrote:
 Oh. Right sorry. Seeing as thiss will not work do I use something like
 getResources().getIdentifier to find the current image in the image view?

I have explained the situation twice, and I do not feel like pasting
it in again a third time. I give up -- somebody else can help you,
maybe.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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


Re: [android-developers] Add a new resource and an old resource is no longer found

2011-04-02 Thread TreKing
On Sat, Apr 2, 2011 at 2:55 PM, trans transf...@gmail.com wrote:

 Then I added a new file, `dictionary.xml`.


Where did you add that xml file?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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   >