[android-developers] Re: Nine patch pre-scaling on Hdpi

2010-01-06 Thread Pixie
Thanks for your responses.
I know I can fix this by creating a high density image, but in the
first place, the reason I didn’t do it is because my application is
working on version 1.5, which, as you probably know, does not support
density-specific resources.
I have more than one way to solve this problem, one of them is as you
suggested, but I’m still interested to know the difference between a
regular PNG and a 9-patch PNG, when it comes to scaling up.

Thanks again


On Jan 6, 12:41 am, Dianne Hackborn  wrote:
> I would strongly recommend making density-specific resources.  Graphics
> scaled from one density to another (especially going up) are never going to
> look as good as ones designed for the density.
>
> Plus doing the pre-scaling on 9-patch images is...  interesting. :)  It's
> actually amazing to me that it works as well as it does, but it is certainly
> far from perfect.
>
>
>
> On Tue, Jan 5, 2010 at 1:48 PM, Jeffrey  wrote:
> > The easiest thing I can think of is to make high density images and
> > see if that fixes the problem. I know that fix isn't the best but it
> > might work.
>
> > On Jan 5, 7:31 am, Pixie  wrote:
> > > Hello everyone,
>
> > > I have some 9-patch images on my app, and they work great on the
> > > medium density.
> > > When I load the app on a High density emulator/device, these images
> > > look grainy.
> > > It happens only to 9-patch images. The others look great after the pre-
> > > scaling.
> > > Is there a way to make them look good after the scaling, like the
> > > non-9-patch images?
>
> > > 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
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to use the "Object android.widget.AdapterView.getItemAtPosition(int position)"

2010-01-06 Thread Manoj
Sir I am doing the same thing what you are tell but i am not getting
the way to use the returned object by getItemAtPosition() to get the
checkbox which is a item in list.

On Jan 7, 10:53 am, theSmith  wrote:
> Manoj,
>
> I'm not sure if I understood you correctly, but I believe you are
> looking for getViewById(R.id.whatever);
> cast the result to a ListView, then call getItemAtPosition.
>
> also there is a group for android 
> beginners.http://groups.google.com/group/android-beginners
>
> P.S. Please brush up on your knowledge of the android 
> documentationhttp://developer.android.com/guide/index.html
> There are plenty of examples that will help you get started.
>
> -theSmith
>
> On Jan 6, 3:47 am, Manoj  wrote:
>
> > Hi,
> > I am new for Android development. I want to use "Object
> > android.widget.AdapterView.getItemAtPosition(int position)" method for
> > getting the items from ListView. But I am not getting the way to make
> > it happen.
> > Please help me out on this topic.
-- 
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] Java Source/APIs to create a Fourm

2010-01-06 Thread soft buzz
Hi All,

I would like to create a forum in my application, I would like to know
available source code/APIs through which i can create it in less time/effort

Thanks for your comments.

-Buzz
-- 
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: WebView Help

2010-01-06 Thread Mel Navarro
Oh. nvrmind. found the solution. :)

On Dec 18 2009, 10:44 pm, Mel Navarro  wrote:
> Hi,
>
> I was wondering if there is a way toselectorhighlightor focus at
> text from a webview's content.
>
> Or evenselectand copy text to the clipboard? (just like the default
> browser)
>
> Or even access the emulateShiftHeld() function?
>
> I'm working on an browser and am trying to add accelerators but I can
> really only focus on links and buttons.
>
> 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] I want to make a Toast to prompt again and again on screen after every 5minutes.

2010-01-06 Thread Manoj
Hi,

Please help me out on the issue as I want to make a Toast to promt
again and again on screen by a service running in background. Please
suggest me the way how to make this done.

manoj chauhan
-- 
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: ADP2 Ion upgrade to Android 2.0?

2010-01-06 Thread ninu
I am with you!  I am trying to find out if there is any news about
this as well.  I have my Ion right now and want to install either 2.0
or 2.1 whichever I can get my hands on.

-N

On Dec 24 2009, 1:23 am, deuce4  wrote:
> Is there any official site that discusses any updates to whether or
> not the Ion will be able to upgraded to Android 2.0?
>
> Or is there any concrete news among users here?
>
> Thanks
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to make any service running automatically when the phone is turned on.

2010-01-06 Thread Manoj
Hi
Please tell me the way to make any service running automatically when
the phone is turned on.


Manoj Chauhan
-- 
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 use the "Object android.widget.AdapterView.getItemAtPosition(int position)"

2010-01-06 Thread theSmith
Manoj,

I'm not sure if I understood you correctly, but I believe you are
looking for getViewById(R.id.whatever);
cast the result to a ListView, then call getItemAtPosition.

also there is a group for android beginners. 
http://groups.google.com/group/android-beginners

P.S. Please brush up on your knowledge of the android documentation
http://developer.android.com/guide/index.html
There are plenty of examples that will help you get started.

-theSmith

On Jan 6, 3:47 am, Manoj  wrote:
> Hi,
> I am new for Android development. I want to use "Object
> android.widget.AdapterView.getItemAtPosition(int position)" method for
> getting the items from ListView. But I am not getting the way to make
> it happen.
> Please help me out on this topic.
-- 
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 delete applications from the Android simulator.

2010-01-06 Thread Sasikumar S

http://www.androidpeople.com/uninstalldelete-an-appliaction-from-emulator-in-android/

see the above link...


On Jan 6, 9:52 pm, John Gaby  wrote:
> I know that this is probably a stupid question, but I am completely
> new to Android development.  I have worked through a number of the
> examples, and now have a bunch of apps on my simulated phone.  I would
> like to remove some of those apps (to reduce the clutter), but cannot
> figure out how to do it.  If I click on the app icon and hold down the
> mouse button, the screen changes to the main screen, and there appears
> to be a trash can at the bottom.  However, dragging the icon to the
> trash can seems to have no effect.
>
> 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] Expose kernel logs to user environment

2010-01-06 Thread perumal316
Hi,

I am currently writing a module for Android.

In module programming there is only printk but is it possible to show
the kernel messages to the users?

Meaning the user who will be using the Android phone with the module
will be shown the kernel messages.

Thanks In Advance,
Perumal
-- 
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 set Image to the ImageView dynamically

2010-01-06 Thread murali
hi friends ,
I am facing problem that whenever i am setting the image to a
ImageView dynamically from a file path(not from the Res,drawable),by
using SetImageURI(uri),i am getting one error like
resolve uri failed on bad bitmap uri
so how can i get the image from a file path by using this setImageURI
(uri)
Thanks and Regards
Murali dhuli
-- 
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 “hover” event i n custom layout

2010-01-06 Thread k_day
I still really need help with this.  I just tried detecting in the
imageView's on touch even if the finger is currently outside of the
imageView, and if so, calling clear focus.  However, it appears that
once I clear focus from one view, dragging it over another will not
give that view focus.

Can anyone please help me determine the best way to do this?


On Dec 29 2009, 3:52 pm, k_day  wrote:
> I suppose one way to do this is to capture touch events at the layout
> level, and then loop through all the layouts to see if an imageview is
> under that point, though that sounds inefficient.
>
> Is there any better way to find which view is at a given point?
>
> Also, is it true that any touch event on an imageview will always
> start with an ACTION_DOWN? I would like to switch focus to another
> view when a finger is dragged over it.
>
> On Dec 26, 11:06 pm, k_day  wrote:
>
> > I have a custom layout that I have written that basically just
> > displays a bunch of ImageViews. I am handing onTouch events for all
> > the ImageViews in my layout. However, if a user touches one imageView
> > and then drags over another ImageView, I would like to be able to
> > handle that as well.
>
> > How would I go about capturing this behavior?
>
>
-- 
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: Launching another application through the current application

2010-01-06 Thread Kumar Bibek
You can do this, by triggering an implicit intent, provided the target
application is designed to listen to such intents.

Please read up the docs.

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

See "Intent Resolution" topic.

Thanks and Regards,
Kumar Bibek

On Jan 6, 5:29 pm, Rajiv  wrote:
> Hello all
>
> The problem I am facing is, I want to launch another application through the
> current application.
>
> In RIM there is a "ApplicationManager.getApplicationManager().launch("String
> path")" method that launches directly RIM application mentioned in "String
> path".
>
> Is there any method like this in android or any other way to solve this
> problem ??
>
> Regards,
> Rajiv
-- 
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: Labeling points on a map

2010-01-06 Thread Kumar Bibek
The "title" and "snippet" seem to be there for this purpose. I tried
to find out about that, but nothing was mentioned in the docs. I
guess, these haven't been implemented yet.

Thanks and Regards,
Kumar Bibek

On Jan 7, 6:18 am, TreKing  wrote:
> Unfortunately, no, I don't think there's a "built-in" method of doing this
> (sure does make you wonder why they bothered with the "title" and "snippet"
> options, don't it?)
>
> However, this is asked alot. Search this group and the developer group for
> "map balloon" or "map popup" or something along those lines and you might
> some useful information.
>
> The basic idea is to add your own view that contains a text view (or
> whatever you want) to the MapView you have using the MapView.LayoutParams -
> that lets you place any view at a specific geo-location on the map.
>
> Hope that helps some.
>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking
>
> On Wed, Jan 6, 2010 at 4:24 PM, Becca  wrote:
> > Hi,
>
> > I'm trying to add a label to each of the points on a map that I've
> > created.  Setting the "title" and "snippet" values of the OverlayItem
> > don't seem to automatically cause these labels to appear however.  I
> > would've thought this would be a pretty simple and common
> > requirement...  Am I missing something?  Can someone tell me if
> > there's a function that does this?
>
> > 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: No route to host issue, but Browser application works fine

2010-01-06 Thread Kumar Bibek
For connecting to the localhost of your machine, you should not use
127.0.0.1

You can use the IP instead, or Please read up the docs.

http://developer.android.com/guide/developing/tools/emulator.html#networkinglimitations

Check for the section."Network Address Space"

Thanks and Regards,
Kumar Bibek.

On Jan 7, 7:15 am, Kenn Min Chong  wrote:
> OKOK, I think I found out what the issue is, but can't explain why. I
> was trying to connect to a webservice located on the same machine as
> the emulator was running. I tried referring to the local machine by IP
> and by name, but I always get the "no route to host" error. But when I
> connect to the same webservice, but hosted on a different machine
> altogether, it works fine! So, what am I missing here?
>
> On Jan 6, 8:55 pm, Kenn Min Chong  wrote:
>
> > I don't get it. I'm having this issue in the emulator. Is this an
> > emulator only issue or  it affects real devices too? This used to not
> > do this, did a recent SDK update break this functionality?
>
> > On Jan 6, 8:28 pm, Wayne Wenthin  wrote:
>
> > > You are not alone.   I have this every once in awhile,  I know that they
> > > have already logged in due to where it generates the error.   It's 
> > > annoying
> > > to say the least.  I'm now working on catching the exception and retrying
> > > since it is just trying to put a json object to my server
>
> > > On Wed, Jan 6, 2010 at 3:07 PM, Kenn Min Chong  wrote:
>
> > > > Hey guys!
> > > >   So, this is very frustrating. I already have
>
> > > >  > > > permission>
>
> > > > in my manifest, but when my application tries to make a webservice
> > > > call (I'm using a HttpURLConnection object to do this via connect()
> > > > method), I'm getting an exception of "No route to host".
>
> > > > The built-in Browser application is able to access the internet
> > > > properly, so I'm guessing it's something in my project. Any ideas?
>
> > > > Kenn.
>
> > > > --
> > > > 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
>
> > > --
> > > Writing code is one of few things
> > > that teaches me I don't know everything.
>
> > > Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums
-- 
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] Can you release the MediaPlayer wake lock when the battery is low?

2010-01-06 Thread skyhigh
I have received complaints from users of my application that audio
playback will sometimes stop when the screen is blank.  This seems to
be a problem on some phones or Android OS versions, but not everyone
sees this issue.  On checking the documentation I found that the
MediaPlayer by default does not hold a wake lock to prevent the CPU
from being shut down by the power management system while the
MediaPlayer is playing.

I have now added the following call in my application in order to
avoid this problem with the playback stopping:

   MediaPlayer.setWakeMode(this, PowerManager.PARTIAL_WAKE_LOCK);

Now that my application is holding a PARTIAL_WAKE_LOCK, my concern is
what will happen if the battery runs low?  I started to code a
BroadcastReceiver for ACTION_BATTERY_LOW in order to release the wake
lock and make sure that the player would stop if the battery is low.
However when I looked for the correct parameter to pass to the
MediaPlayer.setWakeMode() to restore the original behavior (no wake
lock) I couldn't find any value to do this.

The documented wake lock mode parameters (in order of increasing power
consumption) are:
   PARTIAL_WAKE_LOCK
   SCREEN_DIM_WAKE_LOCK
   SCREEN_BRIGHT_WAKE_LOCK
   FULL_WAKE_LOCK

There is no documented value to pass to MediaPlayer.setWakeMode() in
order to tell it to stop holding the PARTIAL_WAKE_LOCK

There isn't any documentation to indicate if the MediaPlayer is
already listening for the ACTION_BATTERY_LOW broadcast itself and
taking appropriate action, so I really don't have to worry about
this.  There isn't any documentation to tell me how to tell the
MediaPlayer that it is OK to let the CPU shut down when the battery is
low.

I would like my application to be a "good power citizen" and would
appreciate any help and direction on the correct way 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] Re: scaling game images according display sizes

2010-01-06 Thread Jason Arora
Are you drawing in a separate thread (like the LunarLander example)?
If not and your game is real-time, I seriously recommend switching to
that model.

Also, I don't believe you should be seeing a slow-down in
compatibility mode... In my experience, it has worked pretty well.

Are you testing this on an actual device or in the emulator? The
emulator does lag in compatibility mode but real devices shouldn't.

On Jan 6, 11:56 am, Andrea  wrote:
> Hi Robert, thanks for the reply.
> Ok the images are loaded as Bitmaps (not drawable) and drawed on the
> onDraw(Canvas c) method of a view. Inside that method I invalidate()
> all the view. So the game runs as fast as it can. The game is using
> dirty rects technique to redraw only the portions of the screen that
> need to be changed. Here is the simply code structure:
>
> //on a view
> private void onDraw(Canvas c){
>
>        //do staff
>
>        invalidate();
>
> }
>
> if you need some other info, tell me it.
>
> a.p.
>
> Robert Green ha scritto:
>
> > What's your design like?  How are you drawing everything?  If you tell
> > me that, I can offer some suggestions.
>
> > On Jan 6, 9:02 am, Andrea  wrote:
> > > Hi
> > > I developed a game with the g1 in my mind. Now I want to support large
> > > screen sizes but I don't want to add in the apk different images for
> > > different screen sizes because now the apk is 3mb and when installed
> > > trought market it became 6mb (due to protection on). If i have to
> > > double the images to support new screens, the apk would be too heavy
> > > (about 13mb, i think) so I'm wondering to know if scaling images at
> > > runtime by myself (without compatibility mode) maybe the best way for
> > > supporting larger screens. Someone tried this solution? Compatbility
> > > mode does a great work in scaling images but it slows down drastically
> > > the framerate (i think because the scale operation is made every time
> > > an image is used/moved and not only once on the load of the image
> > > itself).
>
> > > 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] Using Nexus One as a development phone: Problem with USB driver under windows 7 64 bit

2010-01-06 Thread Xavier Ducrohet
Yesterday, we've pushed a new USB driver on the SDK updater repository
(rev 3) to support the Nexus One, did you download it?

Xav

On Wed, Jan 6, 2010 at 7:51 PM, Streets Of Boston
 wrote:
> Hi everyone,
>
> I've been using my G1 under Windows 7 64-bit and Eclipse just fine.
>
> However, when using my new Nexus One instead - and making sure that
> 'Use Debugging' is enabled - the Nexus One is not recognized and
> debugging on this phone is not possible.
>
> Usig the Nexus One as a removable-drive (by mounting it) works fine.
>
> How can I start using the Nexus one as a development device (on
> Eclipse)?
>
> 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
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. 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] Using Nexus One as a development phone: Problem with USB driver under windows 7 64 bit

2010-01-06 Thread Streets Of Boston
Hi everyone,

I've been using my G1 under Windows 7 64-bit and Eclipse just fine.

However, when using my new Nexus One instead - and making sure that
'Use Debugging' is enabled - the Nexus One is not recognized and
debugging on this phone is not possible.

Usig the Nexus One as a removable-drive (by mounting it) works fine.

How can I start using the Nexus one as a development device (on
Eclipse)?

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] Re: Always permission denial when trying to read Email Account

2010-01-06 Thread Dianne Hackborn
This is private to the e-mail app.  Other apps do not get to access it.

On Wed, Jan 6, 2010 at 6:36 PM, sure zhang  wrote:

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



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

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

[android-developers] Re: Always permission denial when trying to read Email Account

2010-01-06 Thread sure zhang
Anybody can help?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: No route to host issue, but Browser application works fine

2010-01-06 Thread Kenn Min Chong
OKOK, I think I found out what the issue is, but can't explain why. I
was trying to connect to a webservice located on the same machine as
the emulator was running. I tried referring to the local machine by IP
and by name, but I always get the "no route to host" error. But when I
connect to the same webservice, but hosted on a different machine
altogether, it works fine! So, what am I missing here?

On Jan 6, 8:55 pm, Kenn Min Chong  wrote:
> I don't get it. I'm having this issue in the emulator. Is this an
> emulator only issue or  it affects real devices too? This used to not
> do this, did a recent SDK update break this functionality?
>
> On Jan 6, 8:28 pm, Wayne Wenthin  wrote:
>
> > You are not alone.   I have this every once in awhile,  I know that they
> > have already logged in due to where it generates the error.   It's annoying
> > to say the least.  I'm now working on catching the exception and retrying
> > since it is just trying to put a json object to my server
>
> > On Wed, Jan 6, 2010 at 3:07 PM, Kenn Min Chong  wrote:
>
> > > Hey guys!
> > >   So, this is very frustrating. I already have
>
> > >  > > permission>
>
> > > in my manifest, but when my application tries to make a webservice
> > > call (I'm using a HttpURLConnection object to do this via connect()
> > > method), I'm getting an exception of "No route to host".
>
> > > The built-in Browser application is able to access the internet
> > > properly, so I'm guessing it's something in my project. Any ideas?
>
> > > Kenn.
>
> > > --
> > > 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
>
> > --
> > Writing code is one of few things
> > that teaches me I don't know everything.
>
> > Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums
-- 
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] MediaPlayer - Sound stops when I change the layout or suddenly randomly in my game

2010-01-06 Thread Martin
Hi!

Why does my MediaPlayer

MediaPlayer mp = MediaPlayer.create(this, R.raw.somemusic);
mp.setLooping(true);
mp.start();

stop, wenn I change the layout?

setContentView(R.layout.screenoptions);


and also suddenly in my game, the sound stops. What could be the
reason?

And which one is better? MediaPlayer or SoundPool?

Greetings, Martin
-- 
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] AndroidRuntimeException - where is the error in my code?

2010-01-06 Thread Martin
Hi!

I am programming a game. I have some layouts:

the Layout screenmain has these ImageButtons:
private ImageButton buttonstart;
private ImageButton buttonoptions;
private ImageButton buttonhighscore;
private ImageButton buttoninfo;
which will open the layouts.

all these layouts have just an ImageButton "buttonback".

I can click through all my menus but sometimes (to me, it seems like
random), my program crashes when I click a button and I get an
AndroidRuntimeException. What can be the error?
Here is the error-message:

Leonard Frog [Android Application]
DalvikVM[localhost:8614]
Thread [<3> main] (Suspended (exception 
AndroidRuntimeException))
MessageQueue.enqueueMessage(Message, long) line: 173
LeonardFrog$1(Handler).sendMessageAtTime(Message, long) 
line: 457
LeonardFrog$1(Handler).sendMessageDelayed(Message, 
long) line: 430
LeonardFrog$1(Handler).sendMessage(Message) line: 367
LeonardFrog$4.onClick(View) line: 119
ImageButton(View).performClick() line: 2179
ImageButton(View).onTouchEvent(MotionEvent) line: 3828
ImageButton(View).dispatchTouchEvent(MotionEvent) line: 
3368

AbsoluteLayout(ViewGroup).dispatchTouchEvent(MotionEvent) line:
863
FrameLayout(ViewGroup).dispatchTouchEvent(MotionEvent) 
line: 863
FrameLayout(ViewGroup).dispatchTouchEvent(MotionEvent) 
line: 863

PhoneWindow$DecorView(ViewGroup).dispatchTouchEvent(MotionEvent)
line: 863

PhoneWindow$DecorView.superDispatchTouchEvent(MotionEvent) line:
1707
PhoneWindow.superDispatchTouchEvent(MotionEvent) line: 
1197
LeonardFrog(Activity).dispatchTouchEvent(MotionEvent) 
line: 1993
PhoneWindow$DecorView.dispatchTouchEvent(MotionEvent) 
line: 1691
ViewRoot.handleMessage(Message) line: 1525
ViewRoot(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3948
Method.invokeNative(Object, Object[], Class, Class[], 
Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 782
ZygoteInit.main(String[]) line: 540
NativeStart.main(String[]) line: not available [native 
method]
Thread [<13> Binder Thread #2] (Running)
Thread [<11> Binder Thread #1] (Running)


and here is my main class:

package digle.de.LeonardFrog;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.ImageButton;


public class LeonardFrog extends Activity {

private ImageButton buttonstart;
private ImageButton buttonoptions;
private ImageButton buttonhighscore;
private ImageButton buttoninfo;
private ImageButton buttonback;

private Game game;

Message msg;
int handler_lastarg=-1;

private Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
if (handler_lastarg!=msg.arg1) //I put this line here 
to be sure
that the error doesn't come becaues I doubleclick on a button without
knowing and two handlers maybe would interfere? But the error comes
anyway.
{
switch (msg.arg1)
{
case 1:
game.start();
setContentView(game.getPanel());
break;
case 2:
screenoptions();
break;
case 3:
screenhighscore();
break;
case 4:
screeninfo();
break;
case 5:
screenmain();
break;

}
handler_lastarg=msg.arg1;

[android-developers] Re: No route to host issue, but Browser application works fine

2010-01-06 Thread Kenn Min Chong
I don't get it. I'm having this issue in the emulator. Is this an
emulator only issue or  it affects real devices too? This used to not
do this, did a recent SDK update break this functionality?

On Jan 6, 8:28 pm, Wayne Wenthin  wrote:
> You are not alone.   I have this every once in awhile,  I know that they
> have already logged in due to where it generates the error.   It's annoying
> to say the least.  I'm now working on catching the exception and retrying
> since it is just trying to put a json object to my server
>
> On Wed, Jan 6, 2010 at 3:07 PM, Kenn Min Chong  wrote:
>
>
>
> > Hey guys!
> >   So, this is very frustrating. I already have
>
> >  > permission>
>
> > in my manifest, but when my application tries to make a webservice
> > call (I'm using a HttpURLConnection object to do this via connect()
> > method), I'm getting an exception of "No route to host".
>
> > The built-in Browser application is able to access the internet
> > properly, so I'm guessing it's something in my project. Any ideas?
>
> > Kenn.
>
> > --
> > 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
>
> --
> Writing code is one of few things
> that teaches me I don't know everything.
>
> Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums
-- 
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: How to run application in Back ground?

2010-01-06 Thread zongan liu
I think use android services
two kinds of services
1 Application, once closed, services also shut down
2 Application, once closed, services also run

2010/1/7 Matt Kanninen 

> So most applications are android Activites, long running processes
> outside of a given activity should be Android Services.  The other
> major "kind" of Android "thingy" are content providers.
>
> On Jan 6, 3:33 am, Ganeshkumar  wrote:
> > Hello Friends,
> >
> > I want to develope an application in which if SIM card is changed then
> > the application should sent SMS to a predefined number from the new
> > SIM. User should not know that SMS are being send from his/ her
> > mobile. For this application needs to run in background. How can I
> > achieve it?
> >
> > Thank you 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

Re: [android-developers] No route to host issue, but Browser application works fine

2010-01-06 Thread Wayne Wenthin
You are not alone.   I have this every once in awhile,  I know that they
have already logged in due to where it generates the error.   It's annoying
to say the least.  I'm now working on catching the exception and retrying
since it is just trying to put a json object to my server


On Wed, Jan 6, 2010 at 3:07 PM, Kenn Min Chong  wrote:

> Hey guys!
>   So, this is very frustrating. I already have
>
>  permission>
>
>
> in my manifest, but when my application tries to make a webservice
> call (I'm using a HttpURLConnection object to do this via connect()
> method), I'm getting an exception of "No route to host".
>
> The built-in Browser application is able to access the internet
> properly, so I'm guessing it's something in my project. Any ideas?
>
> Kenn.
>
> --
> 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
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums
-- 
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: Null pointer exception

2010-01-06 Thread Martin
Hey, with eclipse, you can simply put a null-pointer-exception-
breakpoint, then debug your program and eclipse will stop there, where
the nullpointer creates this exception.
Greetings, Martin
-- 
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] Labeling points on a map

2010-01-06 Thread TreKing
Unfortunately, no, I don't think there's a "built-in" method of doing this
(sure does make you wonder why they bothered with the "title" and "snippet"
options, don't it?)

However, this is asked alot. Search this group and the developer group for
"map balloon" or "map popup" or something along those lines and you might
some useful information.

The basic idea is to add your own view that contains a text view (or
whatever you want) to the MapView you have using the MapView.LayoutParams -
that lets you place any view at a specific geo-location on the map.

Hope that helps some.

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


On Wed, Jan 6, 2010 at 4:24 PM, Becca  wrote:

> Hi,
>
> I'm trying to add a label to each of the points on a map that I've
> created.  Setting the "title" and "snippet" values of the OverlayItem
> don't seem to automatically cause these labels to appear however.  I
> would've thought this would be a pretty simple and common
> requirement...  Am I missing something?  Can someone tell me if
> there's a function that does this?
>
> 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: Android Books?...

2010-01-06 Thread Matt Kanninen
I do get the impression most game developers ignore most of the
Android specific stuff.  They still have to respect the Android
lifestyle, and a game or two I otherwise like fails to properly save
state...

but you basically end up writing directly to the canvas and can follow
the standards for java and opengl game development.  Garbage
collection is your enemy for real time games.  So for RT games you'll
want to create nearly all of your objects up front, and thus attempt
to avoid garbage collection.  You'll want to avoid creating new
objects during real time portions of a game.

If you aren't making a real time game you might consider sticking with
standard Android UI actually.

On Jan 6, 7:36 am, kylestew  wrote:
> There really aren't any good Android books out there. I bought two of
> them and they are just poor copies of what Google wrote for
> developers. If you want to build games you should look for books on
> making games with open gl es. You should be able to find info on the
> internet about any Android specific open gl implementation.
>
> Good luck
>
> On Jan 5, 3:37 pm, Duey Oxburger  wrote:
>
> > Can anyone recommend any good Android books for a beginner?  I'm
> > mostly interested in games...
>
> > Thx All,
>
> > D
>
>
-- 
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 run application in Back ground?

2010-01-06 Thread Matt Kanninen
So most applications are android Activites, long running processes
outside of a given activity should be Android Services.  The other
major "kind" of Android "thingy" are content providers.

On Jan 6, 3:33 am, Ganeshkumar  wrote:
> Hello Friends,
>
> I want to develope an application in which if SIM card is changed then
> the application should sent SMS to a predefined number from the new
> SIM. User should not know that SMS are being send from his/ her
> mobile. For this application needs to run in background. How can I
> achieve it?
>
> Thank you 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] Re: How to GIF image for a finate time

2010-01-06 Thread Matt Kanninen
Yeah that's probably the right answer.  In theory you can open a GIF
as a video, it hasn't worked for me in practice.

Actually it pisses me off that in the specs for Android phones they
say they support the GIF filetype.  They really should say they have
partial support, until GIFs are animated in the browser and easily
animated by applications.

Apparently some GIFs work, just not most GIFs you find in the wild.

On Jan 6, 11:51 am, TonyDoc  wrote:
> Convert it to multiple png's & use androids animation manager.
>
> On Jan 6, 5:31 am, RamaMohan  wrote:
>
> > Hi all,
> > I want to show  a loading Image of GIF type  for a finite time .how to
> > do this.
> > Please tell me the solution if anyone knows.
>
> > Thanks,
> > Ram
>
>
-- 
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: how to clear activity stack in task

2010-01-06 Thread Matt Kanninen
Hard to do without changing code.  I always end having to implement
logout(), so all my activities extend a custom base activity, and in
that base activity in onCreate I always end up checking for a global
static:

if(!isLoggedIn){
  finish();
  return;
}


On Jan 6, 4:43 am, Zhihong GUO  wrote:
> thanks for the quick answer. but is there any other solutions? i mean do not
> change the code of activity a and b, just clear the task stack.
-- 
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: Null pointer exception

2010-01-06 Thread Matt Kanninen
I do the management in onStop, for my cursor which supplies the data
needed by a ListView (which means the cursor has to be open whenever
the activity is displayed).

@Override
protected void onStop() {
super.onStop();
if(db!=null){
if(db.isOpen()){
db.close();
}
}
if(mCursor!=null){
if(!mCursor.isClosed()){
mCursor.close();
}
}
}

On Jan 6, 7:25 am, JasonMP  wrote:
> That was it!  I took out the startManagingCursor() and it worked
> fine.  My next question is what should I do to handle the life cycle
> of my cursor?  Should I close it outside the switch statement?
>
> On Jan 5, 5:41 pm, Vladimir  wrote:
>
> > What do you think about this:
> > 1. Cursor created in onContextItemSelected() is null (for some reason)
> > 2. Since its lifecycle is managed by the activity (startManagingCursor
> > (c)), it tries to release it when the activity is stopped (when the
> > new intent is launched)
> > 3. It doesn't expect managed cursor to be null and crashes (at
> > android.app.Activity.performStop(Activity.java:3604))
> > Does that make sense? I have little idea about how this cursor
> > management works, but I would do the following:
> > 1. Try removing startManagingCursor() calls to see if these are
> > related
> > 2. Double check if the cursor is null
> > 3. Take a look inside Android source and specifically Activity.java:
> > 3604
> > Just a guess :)
>
> > On Jan 5, 4:02 pm, JasonMP  wrote:
>
> > > Ok, I tried gino's idea with initializing my arrays differently.  I
> > > also changed there names so that they did not share a name with any
> > > other arrays in my app:  Did not work.
>
> > > I also tried calling to static variables instead of passing variables
> > > between classes with intents:  This also did not work.
>
> > > I can't determine which line of code causes the error.  The logcat
> > > does not give me a pointer to anything in my app at all.  I tried to
> > > narrow it down with breakpoints and logging and what I found is that
> > > it runs through all of my code without a hitch, and then once its done
> > > it throws the exception.
>
> > > And again the exception only happens when I call the intent from a
> > > contextMenu.
>
> > > On Jan 1, 2:56 am, Wiebbe  wrote:
>
> > > > Shouldnt you check if the bundle is null or not? Try to loop through
> > > > it when you get there from a onContextItemSelected event. I'm guessing
> > > > some value somewhere is null when it should be instantiated. Perhaps
> > > > the intent is started quicker or without the bundle somehow so you get
> > > > a nullpointer exception?
>
> > > > On 31 dec 2009, 15:57, JasonMP  wrote:
>
> > > > > yes, Select.class is another one of my files.  throughout my app there
> > > > > are a few different calls to it, all done the same way i.e. "Intent i
> > > > > = new Intent(this, Select.class); startActivity(i);"
>
> > > > > No where in Select.class do I make a call to start Select.class or
> > > > > Sheet.class.  When its done it calls finish();
>
> > > > > in the onCreate() of Select.class I grab the extras from the invoking
> > > > > class with this line of code:
>
> > > > > public class Select extends ListActivity{
>
> > > > >         DBAdapter db = new DBAdapter(this);
> > > > >         String slotName = null;
>
> > > > >         @Override
> > > > >         public void onCreate(Bundle savedInstanceState) {
> > > > >                   super.onCreate(savedInstanceState);
>
> > > > >                   db.open();
>
> > > > >                   ListView list = getListView();
>
> > > > >                   View v = View.inflate(this, R.layout.list_header, 
> > > > > null);
> > > > >                   list.addHeaderView(v, null, false);
>
> > > > >                   name = 
> > > > > this.getIntent().getStringExtra(DBAdapter.KEY_NAME);
> > > > >         }
>
> > > > > Could it be something in the .getIntent() method?  or
> > > > > the .getStringExtra()?
>
> > > > > On Dec 30, 7:19 pm, "Stephen @ gmail.com" 
> > > > > wrote:
>
> > > > > > Now that I understand your intent creation a little better, and I 
> > > > > > see that
> > > > > > the intent you are creating is unique from the class in which the 
> > > > > > code
> > > > > > exists, I am not quite sure how it could be an infinite loop in the
> > > > > > (immediate) way I was thinking.
>
> > > > > > Reading this code
>
> > > > > > Intent i = new Intent(this, Select.class);
>
> > > > > > I have to start thinking there's something wrong with this.  I 
> > > > > > tried to look
> > > > > > up the "Select" class on the android developers site, and couldn't 
> > > > > > find it.
> > > > > > Is that a class from another of your files?  I guess I would wonder 
> > > > > > if the
> > > > > > code being invoked there, is somehow causing this class

Re: [android-developers] Re: Crashed Service not restarting - !!! FAILED BINDER TRANSACTION !!! - Dianne could you help ?

2010-01-06 Thread Dianne Hackborn
You probably want to fix the cause of your service crashing, so...  what is
the actual stack crawl of the exception?  You don't show that anywhere.

On Wed, Jan 6, 2010 at 2:03 PM, Derek  wrote:

> Hi again,
>
> Our service is still crashing for some reason not related to our
> application. To make sure it's not RunTime exception we've used a :
> try
> {
>  // Get WakeLock
>  // Perform actions
> }
> catch (Throwable t)
> {
>  // log error (if any)
> }
> finally
> {
>  // Schedule a new service startup and PendingIntent an AlarmManager
>  long tick = 6L;
>  long nextUpdate = System.currentTimeMillis();
>  nextUpdate += (tick - nextUpdate % tick);
>  Intent updateIntent = new Intent();
>  updateIntent.setClass(this, RefreshService.class);
>  PendingIntent pendingIntent = PendingIntent.getService(this, 0,
> updateIntent, 0);
>  AlarmManager alarmManager = (AlarmManager)getSystemService
> (Context.ALARM_SERVICE);
>  alarmManager.set(AlarmManager.RTC, nextUpdate, pendingIntent);
>  // Release WakeLock
>  ...
> }
> stopSelf();
>
> The service is still crashing randomly on real device (Android 1.6/HTC
> Magic) and it does not restart. It's not a problem of Taskiller
> because it is not installed.
> Here are the logs:
> 01-06 21:18:00.653: INFO/ActivityManager(75): Stopping service:
> xx.yy/.widget.RefreshService
> 01-06 21:18:06.283: DEBUG/dalvikvm(1318): GC freed 4957 objects /
> 283104 bytes in 110ms
> // Problem starts here.
> 01-06 21:18:59.153: INFO/ActivityManager(75): Process xx.yy(pid 1318)
> has died.
> 01-06 21:21:33.530: INFO/ActivityManager(75): Start proc xx.yyfor
> service xx.yy/.widget.RefreshService: pid=1339 uid=10031 gids={3003,
> 1015}
> 01-06 21:21:33.720: INFO/dalvikvm(1339): Debugger thread not active,
> ignoring DDM send (t=0x41504e4d l=38)
> 01-06 21:21:33.750: INFO/dalvikvm(1339): Debugger thread not active,
> ignoring DDM send (t=0x41504e4d l=48)
> 01-06 21:21:34.520: INFO/ActivityManager(75): Stopping service:
> xx.yy/.widget.RefreshService
> 01-06 21:23:11.526: ERROR/JavaBinder(75): !!! FAILED BINDER
> TRANSACTION !!!
> 01-06 21:23:11.536: ERROR/JavaBinder(75): !!! FAILED BINDER
> TRANSACTION !!!
> 01-06 21:23:11.635: INFO/ActivityManager(75): Process xx.yy(pid 1339)
> has died.
> 01-06 21:23:11.686: WARN/ActivityManager(75): Scheduling restart of
> crashed service xx.yy/.widget.RefreshService in 5000ms
> 01-06 21:23:16.736: INFO/ActivityManager(75): Start proc xx.yy for
> service xx.yy/.widget.RefreshService: pid=1349 uid=10031 gids={3003,
> 1015}
> 01-06 21:23:16.825: INFO/dalvikvm(1349): Debugger thread not active,
> ignoring DDM send (t=0x41504e4d l=38)
> 01-06 21:23:16.855: INFO/dalvikvm(1349): Debugger thread not active,
> ignoring DDM send (t=0x41504e4d l=48)
> // But service never restarts !
>
> We've run the following command according to Dianne advice: "adb shell
> dumpsys activity.services" and we can see our service but it is not
> executed.
>
> Currently running services:
>  activity.services
>
> ---
> DUMP OF SERVICE activity.services:
> Services in Current Activity Manager State:
>  Active services:
>  * ServiceRecord{43563d78 xx.yy/.widget.RefreshService}
>intent={cmp=xx.yy/.widget.RefreshService}
>packageName=xx.yy
>processName=xx.uu
>baseDir=/data/app/xx.yy.apk/data/app/xx.yy.apk dataDir=/data/data/
> xx.yy
>app=ProcessRecord{4348d8f8 1349:xx.yy/10031}
>isForeground=false lastActivity=-675021
>startRequested=true startId=1 executeNesting=0
> executingStart=-675021 crashCount=0
>totalRestartCount=1 restartCount=1 restartDelay=5000
> restartTime=-675021 nextRestartTime=-675183
>
>  * ServiceRecord{43471978
> com.google.android.location/.NetworkLocationService}
>intent={cmp=com.google.android.location/.NetworkLocationService}
>packageName=com.google.android.location
>processName=system
>baseDir=/system/app/NetworkLocation.apk/system/app/
> NetworkLocation.apk dataDir=/data/data/com.google.android.location
>app=ProcessRecord{433869d8 75:system/1000}
>isForeground=false lastActivity=-6811360
>startRequested=true startId=1 executeNesting=0
> executingStart=-6811353 crashCount=0
>totalRestartCount=0 restartCount=0 restartDelay=0
> restartTime=-6811360 nextRestartTime=-6857706
>
>  * ServiceRecord{43430480
> com.google.android.googleapps/.GoogleLoginService}
>intent={cmp=com.google.android.googleapps/.GoogleLoginService}
>packageName=com.google.android.googleapps
>processName=com.google.process.gapps
>baseDir=/system/app/GoogleApps.apk/system/app/GoogleApps.apk
> dataDir=/data/data/com.google.android.googleapps
>app=ProcessRecord{4337a268 149:com.google.process.gapps/10015}
>isForeground=false lastActivity=-330241
>startRequested=false startId=0 executeNesting=0
> executingStart=-6812034 crashCount=0
>totalRestartCount=0 restartCount=0 restartDelay=0
> restartTime=-6816373 nextRestartTime=-6857714
>
> 

Re: [android-developers] Will native libs built with the NDK work with the Nexus One?

2010-01-06 Thread David Turner
On Tue, Jan 5, 2010 at 6:39 PM, Francois Hamel wrote:

> Basically is the ARMv7 instruction set somehow an extension of the
> ARMv5 or is it completely different?


Yes, it's an extension. All NDK-generated code that runs on Android ARMv5
devices should
run on ARMv7 ones too. Extreme care has been taken in Eclair to ensure that
this is the case
(exact details are tricky).



>
>

> --
> 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: What does targetSdkVersion do?

2010-01-06 Thread Dianne Hackborn
On Wed, Jan 6, 2010 at 3:10 PM, Matt Kanninen  wrote:

> android:normalScreens="true" android:largeScreens="true" />
>

If you don't specify anyDensity, then the system will run your app in
density compatibility mode on high and low density devices.  You really want
to avoid this, since it can result in some artifacts in the UI such as some
text being clipped.

If you are designing your app to support different screens/densities, I
highly recommend that you make the target SDk version at least 4, since this
will allow the system to do the correct default configuration to make it
work correctly.  It also allows various other compatibility features to be
turned off, which we try to document under each API version here:

http://developer.android.com/reference/android/os/Build.VERSION_CODES.html

As for running out of memory -- it is probably because outside of
compatibility mode the system is being allowed to pre-scale some of your
loaded bitmaps to allow them to be drawn faster.  I would guess this is just
a matter of you being close to the memory limit, and this pushing you over
(the high density or large screen devices should always have a higher memory
limit to account for this...  though I don't think the emulator changes
this, come to think of it, so it could just be an emulator issue).

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

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

Re: [android-developers] android emulator speed

2010-01-06 Thread David Turner
Upgrade to Windows 7 ?

More seriously, how much slower is it ? Are you sure you're talking about
exactly the same hardware (including CPU and RAM) ?
Did you try to disable your antivirus scanner, some of them really don't
like the emulator's internal runtime code generation and
do really hideous things to performance.

On Tue, Jan 5, 2010 at 7:24 PM, greenfish  wrote:

> i was disappointed that the boot speed of the android emulator was
> more slower than my peer.
> of course, the spec was identical, his os was Win7 but my os was
> XPSP2.
>
> how can it be possible?
> is there any one who knows the way boosts the speed of android
> emulator?
>
> --
> 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: Start new activity in TAB

2010-01-06 Thread jotobjects
Are you calling this method to set the action for the tab?

http://developer.android.com/intl/fr/reference/android/widget/TabHost.TabSpec.html#setContent%28android.content.Intent%29

On Jan 5, 3:11 pm, smyl  wrote:
> the activites are with in the same application , but the thing is that
> when the user clicks on a particular city i can start the  activity
> which contains the forecast for that city but that new activity
> launches on the whole screen not within the current tab , i.e it
> doesn't replaces the  activity that launched it  with in the current
> tab  rather it covers the whole screen .
>
> On Jan 6, 12:29 am, jotobjects  wrote:
>
> > Unless the Activities that you want to show under the tabs are
> > activities in the same application you may run into the problem
> > described here regarding TabWidget -
>
> >http://groups.google.com/group/android-beginners/msg/17c95a6881e1dfe4
>
> > On Jan 5, 5:50 am, smyl  wrote:
>
> > > i am working on a travelling application and  i am using tabs and each
> > > tab has an activity i.e world clock in one tab ,weather data in
> > > another tab and so on
>
> > > with in the weather tab i am displaying the users selected cities and
> > > the scenario is that when the user selects a city  that city's
> > > forecast is to be displayed and  later to view details as well which
> > > is in another activity .
>
> > > so how can i launch this new activity from the already started
> > > activity with in the same tab ?
-- 
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: Nexus 2.1 one sale, WHERE is the SDK!

2010-01-06 Thread Sundog
I have ceased development on Android entirely. I am now just
supporting my 2 apps - one of them a bestseller, the other an OpenGL
flight game - as best I can. I'm sure the soundboard authors and the
flashlight authors will keep up the stream of garbage, but I'll bet
I'm not the only actual quality developer to say "no more".

It really is hard to see how Google could have possibly screwed this
up any more. It's been a long, slow, two-year trainwreck.
-- 
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] MediaPlayer ... a nest of undocumented pitfalls

2010-01-06 Thread DulcetTone
I use MediaPlayers in the most basic way possible, and yet it either
works or not and there is no means to troubleshoot.

I am trying to play a .wav file in my app's own filespace.
It just won't do it.  I try variation upon variation.
I suspect that the MediaPlayer boasts only a limited set of WAV file
formats that it can play, but where do I turn to find that, and will
it vary by phone model?

File file = new File(fname);
long siz = file.length();
boolean readable = file.canRead();

// this shows that the file is readable and sized around 60K
// it is a mono 16 bit PCM WAV at 11,025 sample rate
Log.d(TAG, "file is readable=" + readable + ", size=" + siz);
Uri uri = Uri.fromFile(file);

// this create() returns NULL
// the following hard-to-find error is printed:
/*
01-06 18:05:02.257: ERROR/PlayerDriver(51): Command
PLAYER_SET_DATA_SOURCE completed with an error or info
PVMFErrNotSupported
01-06 18:05:02.257: ERROR/MediaPlayer(1917): error (1, -4)
*/

MediaPlayer mp = MediaPlayer.create(getBaseContext(), uri);
mp.start();

This is the code that generated the file:

ByteArrayOutputStream baos; // this is what stores raw audio data to
be written out
   try {
OutputStream out = new FileOutputStream(fname);
try {
byte[] pcm = baos.toByteArray();
WaveHeader hdr = new WaveHeader(WaveHeader.FORMAT_PCM,
(short)1, mSampleRate, (short)16, pcm.length);
hdr.write(out);
out.write(pcm);
}  finally {
out.close();
}

} finally {
baos.close();
}
-- 
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: What does targetSdkVersion do?

2010-01-06 Thread Matt Kanninen
Got it.  I don't think I need targetSdkVersion now that I have:



I want to target HVGA and up.

On Jan 5, 8:10 pm, Lance Nanek  wrote:
> Can change defaults for supports-screens. Can also disable
> compatibility features, like reporting a smaller size than the actual
> display and scaling your app up.
>
> See:http://developer.android.com/intl/zh-TW/guide/practices/screens_suppo...
>
> On Jan 5, 9:15 pm, Matt Kanninen  wrote:
>
> > What does targetSdkVersion do?
>
> > There isn't much detail on what targetSdkVersion actually does.
>
> > I've read:
>
> >http://developer.android.com/guide/topics/manifest/uses-sdk-element.h...
>
> > android:targetSdkVersion
> >     An integer designating the API Level that the application is
> > targetting.
>
> >     With this attribute set, the application says that it is able to
> > run on older versions (down to minSdkVersion), but was explicitly
> > tested to work with the version specified here. Specifying this target
> > version allows the platform to disable compatibility settings that are
> > not required for the target version (which may otherwise be turned on
> > in order to maintain forward-compatibility) or enable newer features
> > that are not available to older applications. This does not mean that
> > you can program different features for different versions of the
> > platform—it simply informs the platform that you have tested against
> > the target version and the platform should not perform any extra work
> > to maintain forward-compatibility with the target version.
>
> >     Introduced in: API Level 4
>
> >   I'm curious because it appears that switching from:
>
> >         
>
> > to
>
> >         
>
> > is the change that started the
>
> > android.view.InflateException ... java.lang.OutOfMemoryError: bitmap
> > size exceeds VM budget
>
> > errors I was randomly seeing in setContentView.  When I remove the
> > targetSdkVersion it runs much better.
>
> > Now I'm having trouble remembering what adding targetSdkVersion got me
> > in the first place.
>
>
-- 
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] No route to host issue, but Browser application works fine

2010-01-06 Thread Kenn Min Chong
Hey guys!
   So, this is very frustrating. I already have




in my manifest, but when my application tries to make a webservice
call (I'm using a HttpURLConnection object to do this via connect()
method), I'm getting an exception of "No route to host".

The built-in Browser application is able to access the internet
properly, so I'm guessing it's something in my project. Any ideas?

Kenn.
-- 
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: Performance issue: Dalvik VM is >20x slower than most modern Java VMs

2010-01-06 Thread dm1973
Your tests are pretty useless. Most modern compilers will optimize
away all of that code so what you are measuring is the overhead of
your timing code.

That being said interpreted byte code is slow. Either write native
code where it matters or wait for JIT.


On Jan 6, 9:08 am, Biosopher  wrote:
> I'm writing a processing intensive digital sound processing app
> (requires numerous (50,000) Fast Fourier Transforms - FFT).  This
> challenge led me to perform basic performance tests of Android running
> on an HTC Hero.
>
> The results show the Dalvik VM to be >20 times slower than a modern
> JIT-enabled JVM running J2ME and 25-50 times slower than a C program
> performing the same operations on a similarly powered mobile phone.
>
> For example, this simple iteration over an empty method 2 million
> times takes 1.4 seconds even though it doesn’t do anything.  The same
> iteration is performed in milliseconds by a C program and about 100ms
> on a modern JVM
>
> public void performanceTest1() {
>         for (int i = 0; i < 200; i++) {
>                 emptyMethod();
>         }
>
> }
>
> private int emptyMethod() {
>         return 0;
>
> }
>
> Doing something a little more complex like calculating the imaginary
> component of a complex conjugate 2 million times takes 3.2 seconds.
> Again, this takes milliseconds on other mobile phones running J2ME or
> C.
>
> public void performanceTest2() {
>         for (int i = 0; i < 200; i++) {
>                 int a  = 5;
>                 int b  = 5;
>                 int c  = 5;
>                 int x  = 5;
>                 int y  = 5;
>
>                 y = ((a >> 16) * ((c << 16) >> 16)) + (((a & 0X) * 
> ((c <<
> 16) >> 16)) >> 16);
>                 y = -y;
>                 y  += ((b >> 16) * (c >> 16)) + (((b & 0X) * (c >> 
> 16)) >>
> 16);
>         }
>
> }
>
> Has anyone else been able to overcome these performance issues of
> Android?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Targeting >=1.6(!), can't get rid of READ_PHONE_STATE and WRITE_EXTERNAL_STORAGE

2010-01-06 Thread greg1x
I've published the application and you're right. There are no extra
permissions required through the market.

Thank you!


On jan. 6, 22:35, "Maps.Huge.Info (Maps API Guru)" 
wrote:
> Are you trying to load you app outside the market? If so, then this is
> more of a feature than a bug. I believe that Google has added these
> permissions into non-market apps. If you use the market, the
> permissions are correct.
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"
-- 
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] Labeling points on a map

2010-01-06 Thread Becca
Hi,

I'm trying to add a label to each of the points on a map that I've
created.  Setting the "title" and "snippet" values of the OverlayItem
don't seem to automatically cause these labels to appear however.  I
would've thought this would be a pretty simple and common
requirement...  Am I missing something?  Can someone tell me if
there's a function that does this?

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] Re: Can someone with a Motorola Droid call AccountManager.getAccounts() please?

2010-01-06 Thread polyclefsoftware


On Jan 6, 3:01 pm, Mariano Kamp  wrote:
> > It turns out that the reason the authToken from the AccountManager
> > wasn't working was because it was expired. It was dated Dec. 9th,
> > which is probably the day I first got my authentication code working.
> > I guess it cached the authToken and has been using the same one ever
> > since.
>
> How do you know it was dated and that it was from the 9th?
> Anyway, I don't think that is the case for me. I did all my testing on the
> same day and always got a token, but that token doesn't seem to be valid.

The dev was somehow about to reverse engineer the authToken I provided
him. Presumably there's a tool for doing this...I don't know how he
did it.

> I acquire a token like this:
>
> String token = accountManager.blockingGetAuthToken(acct, "ah", false);
>
> and then try something like this:
>
> curl --header "Cookie: SID=" --header "Accept-Encoding:
> gzip" 
> "http://www.google.com/reader/atom/user/-/state/com.google/reading-list"; -D
> header | tidy -i -xml | mate
>
> And this usually returns an xml file, but only if I pass in an auth token
> from the ClientLogin. But not this time.
>
> I get those headers then:
>
> HTTP/1.1 302 Moved Temporarily
> Content-Type: text/html; charset=UTF-8
> Location:https://www.google.com/accounts/ServiceLogin?hl=en&nui=1&service=read...
> 
> Date: Wed, 06 Jan 2010 20:42:00 GMT
> Expires: Wed, 06 Jan 2010 20:42:00 GMT
> Cache-Control: private, max-age=0
> X-Content-Type-Options: nosniff
> X-XSS-Protection: 0
> X-Frame-Options: SAMEORIGIN
> Content-Length: 1381
> Server: GFE/2.0
>
> And this message in the content stream:
>
> 302 Redirection
> 
>       body {font-family: arial,sans-serif}
>       div.nav {margin-top: 1ex}
>       div.nav A {font-size: 10pt; font-family: arial,sans-serif}
>       span.nav {font-size: 10pt; font-family: arial,sans-serif; font-weight:
> bold}
>       div.nav A,span.big {font-size: 12pt; color: #cc}
>       div.nav A {font-size: 10pt; color: black}
>       A.l:link {color: #6f6f6f}
>       
>  cellspacing="0" width="100%">
>  size="10">Go face="times" color="#f3c518" size="10">o color="#0039b6" size="10">g size="10">l size="10">e  
>  
>
>  color="#ff">Error
>  
> Redirection
> Further action needs to be taken by your user agent in order to fulfill the
> request.
> 
>  bgcolor="#3366cc"> height="4">
>
>   Following the "expired" logic this should work, right?:
>
> String oldToken = accountManager.peekAuthToken(acct, "ah");
> if (oldToken != null) {
>   System.out.println("oldToken="+oldToken);
>   accountManager.invalidateAuthToken("com.google",oldToken);
>   System.out.println("invalidated.");}
>
> String sid = accountManager.blockingGetAuthToken(acct, "ah", false);
>
>   But it doesn't. Same effect. And also these two additional permissions
> (four in total then) are also needed then:

Yeah, that's basically what I did to get my code working again. I
grabbed the current token, invalidated it, and grabbed another one. It
worked for me.

I'm sorry, man. Not sure what to tell you. There might have been some
change on the Google Reader side that's mucking things up for you. Is
there a dedicated group for Google Reader? I also posted my question
on Stack Overflow, which is the Google-officially-endorsed resource
for Android questions. I didn't get a response, but you might try
there as well.

Good luck and post back here if you figure it out.
-- 
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: A log collector - Online Bug collector For android developers

2010-01-06 Thread Dan Sherman
I didn't, I'm pretty happy with the remote stacktrace (we made a bunch of
upgrades to it for our own apps), and have no real need to swap, I just
wanted to make sure the option was out there for people looking for a
solution :)

On Wed, Jan 6, 2010 at 5:10 PM, vekexasia  wrote:

> Yes. But it does not group all the exceptions per package and
> versions... And it requires a working web server..
>
> Did you take a look to the Dashboard and Detailed information with the
> demo credentials?
>
> On 6 Gen, 22:23, Dan Sherman  wrote:
> > Not trying to take anything away from you, just wanted to mention theres
> > another set of code doing the same remote tracing:
> >
> > http://code.google.com/p/android-remote-stacktrace/
> >
> >
> >
> > On Wed, Jan 6, 2010 at 3:46 PM, vekexasia  wrote:
> > > Hi Guys,
> > > In my free time (thanks to my asthma sickness) i was able to complete
> > > an old project of mine that i think would interest a lot of you.
> >
> > > Long story short: I created a library which is able to track your
> > > application crashes directly online!
> >
> > > The library, once imported on your android projects, will start to
> > > track each crash online. It will report as much information as it
> > > can.
> > > Each new crash the web service will send you an e-mail warning
> > > yourself about a new found bug.
> >
> > > Then you'll be able the following information directly on your
> > > browser:
> >
> > > - The exception stacktrace
> > > - The exception CausedBy stacktrace (if available)
> > > - The versions of android which the crash has been occurred.
> > > - The different phone models afflicted by the crash.
> > > - The versions of your app bugged by that particular crash
> >
> > > Everything is packed by exception and package so there will be a lot
> > > of information grouped by this 2 main fields.
> > > Plus i've created a set of graphs .. The most usefull is the "crash
> > > views" one which shows how many crash for that exception has been
> > > occurred divided by day.
> >
> > > I hope this will help. On my website you could take a tour of the web
> > > interface with demo credentials So you can take a tour before using
> > > it.
> >
> > > Obviously this is Free for all ( at least untill i will not have to
> > > manage GygaBytes of data ) .
> > > The link is :http://alogcollector.andreabaccega.com/
> > > Let me know :)
> >
> > > --
> > > 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 cr...@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: A log collector - Online Bug collector For android developers

2010-01-06 Thread vekexasia
Yes. But it does not group all the exceptions per package and
versions... And it requires a working web server..

Did you take a look to the Dashboard and Detailed information with the
demo credentials?

On 6 Gen, 22:23, Dan Sherman  wrote:
> Not trying to take anything away from you, just wanted to mention theres
> another set of code doing the same remote tracing:
>
> http://code.google.com/p/android-remote-stacktrace/
>
>
>
> On Wed, Jan 6, 2010 at 3:46 PM, vekexasia  wrote:
> > Hi Guys,
> > In my free time (thanks to my asthma sickness) i was able to complete
> > an old project of mine that i think would interest a lot of you.
>
> > Long story short: I created a library which is able to track your
> > application crashes directly online!
>
> > The library, once imported on your android projects, will start to
> > track each crash online. It will report as much information as it
> > can.
> > Each new crash the web service will send you an e-mail warning
> > yourself about a new found bug.
>
> > Then you'll be able the following information directly on your
> > browser:
>
> > - The exception stacktrace
> > - The exception CausedBy stacktrace (if available)
> > - The versions of android which the crash has been occurred.
> > - The different phone models afflicted by the crash.
> > - The versions of your app bugged by that particular crash
>
> > Everything is packed by exception and package so there will be a lot
> > of information grouped by this 2 main fields.
> > Plus i've created a set of graphs .. The most usefull is the "crash
> > views" one which shows how many crash for that exception has been
> > occurred divided by day.
>
> > I hope this will help. On my website you could take a tour of the web
> > interface with demo credentials So you can take a tour before using
> > it.
>
> > Obviously this is Free for all ( at least untill i will not have to
> > manage GygaBytes of data ) .
> > The link is :http://alogcollector.andreabaccega.com/
> > Let me know :)
>
> > --
> > 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 > cr...@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: Crashed Service not restarting - !!! FAILED BINDER TRANSACTION !!! - Dianne could you help ?

2010-01-06 Thread Derek
Hi again,

Our service is still crashing for some reason not related to our
application. To make sure it's not RunTime exception we've used a :
try
{
  // Get WakeLock
  // Perform actions
}
catch (Throwable t)
{
  // log error (if any)
}
finally
{
  // Schedule a new service startup and PendingIntent an AlarmManager
  long tick = 6L;
  long nextUpdate = System.currentTimeMillis();
  nextUpdate += (tick - nextUpdate % tick);
  Intent updateIntent = new Intent();
  updateIntent.setClass(this, RefreshService.class);
  PendingIntent pendingIntent = PendingIntent.getService(this, 0,
updateIntent, 0);
  AlarmManager alarmManager = (AlarmManager)getSystemService
(Context.ALARM_SERVICE);
  alarmManager.set(AlarmManager.RTC, nextUpdate, pendingIntent);
  // Release WakeLock
  ...
}
stopSelf();

The service is still crashing randomly on real device (Android 1.6/HTC
Magic) and it does not restart. It's not a problem of Taskiller
because it is not installed.
Here are the logs:
01-06 21:18:00.653: INFO/ActivityManager(75): Stopping service:
xx.yy/.widget.RefreshService
01-06 21:18:06.283: DEBUG/dalvikvm(1318): GC freed 4957 objects /
283104 bytes in 110ms
// Problem starts here.
01-06 21:18:59.153: INFO/ActivityManager(75): Process xx.yy(pid 1318)
has died.
01-06 21:21:33.530: INFO/ActivityManager(75): Start proc xx.yyfor
service xx.yy/.widget.RefreshService: pid=1339 uid=10031 gids={3003,
1015}
01-06 21:21:33.720: INFO/dalvikvm(1339): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=38)
01-06 21:21:33.750: INFO/dalvikvm(1339): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=48)
01-06 21:21:34.520: INFO/ActivityManager(75): Stopping service:
xx.yy/.widget.RefreshService
01-06 21:23:11.526: ERROR/JavaBinder(75): !!! FAILED BINDER
TRANSACTION !!!
01-06 21:23:11.536: ERROR/JavaBinder(75): !!! FAILED BINDER
TRANSACTION !!!
01-06 21:23:11.635: INFO/ActivityManager(75): Process xx.yy(pid 1339)
has died.
01-06 21:23:11.686: WARN/ActivityManager(75): Scheduling restart of
crashed service xx.yy/.widget.RefreshService in 5000ms
01-06 21:23:16.736: INFO/ActivityManager(75): Start proc xx.yy for
service xx.yy/.widget.RefreshService: pid=1349 uid=10031 gids={3003,
1015}
01-06 21:23:16.825: INFO/dalvikvm(1349): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=38)
01-06 21:23:16.855: INFO/dalvikvm(1349): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=48)
// But service never restarts !

We've run the following command according to Dianne advice: "adb shell
dumpsys activity.services" and we can see our service but it is not
executed.

Currently running services:
  activity.services
---
DUMP OF SERVICE activity.services:
Services in Current Activity Manager State:
  Active services:
  * ServiceRecord{43563d78 xx.yy/.widget.RefreshService}
intent={cmp=xx.yy/.widget.RefreshService}
packageName=xx.yy
processName=xx.uu
baseDir=/data/app/xx.yy.apk/data/app/xx.yy.apk dataDir=/data/data/
xx.yy
app=ProcessRecord{4348d8f8 1349:xx.yy/10031}
isForeground=false lastActivity=-675021
startRequested=true startId=1 executeNesting=0
executingStart=-675021 crashCount=0
totalRestartCount=1 restartCount=1 restartDelay=5000
restartTime=-675021 nextRestartTime=-675183

  * ServiceRecord{43471978
com.google.android.location/.NetworkLocationService}
intent={cmp=com.google.android.location/.NetworkLocationService}
packageName=com.google.android.location
processName=system
baseDir=/system/app/NetworkLocation.apk/system/app/
NetworkLocation.apk dataDir=/data/data/com.google.android.location
app=ProcessRecord{433869d8 75:system/1000}
isForeground=false lastActivity=-6811360
startRequested=true startId=1 executeNesting=0
executingStart=-6811353 crashCount=0
totalRestartCount=0 restartCount=0 restartDelay=0
restartTime=-6811360 nextRestartTime=-6857706

  * ServiceRecord{43430480
com.google.android.googleapps/.GoogleLoginService}
intent={cmp=com.google.android.googleapps/.GoogleLoginService}
packageName=com.google.android.googleapps
processName=com.google.process.gapps
baseDir=/system/app/GoogleApps.apk/system/app/GoogleApps.apk
dataDir=/data/data/com.google.android.googleapps
app=ProcessRecord{4337a268 149:com.google.process.gapps/10015}
isForeground=false lastActivity=-330241
startRequested=false startId=0 executeNesting=0
executingStart=-6812034 crashCount=0
totalRestartCount=0 restartCount=0 restartDelay=0
restartTime=-6816373 nextRestartTime=-6857714

* IntentBindRecord{4345a4d0}:
  intent={act=android.accounts.IAccountsService
cmp=com.google.android.googleapps/.GoogleLoginService}
  binder=android.os.binderpr...@4345adc8
  requested=true received=true hasBound=false doRebind=false

* IntentBindRecord{43430848}:
  intent={cmp=com.google.android.googleapps/.GoogleLoginService}
  binder=android.os.binderpr.

[android-developers] Re: Image not dithering

2010-01-06 Thread abhi
BTW  I am using a 320x640 device.

On Jan 6, 3:03 pm, abhi  wrote:
> Hi,
>
> I am using this 
> imagehttp://android.amberfog.com/wp-content/uploads/2009/11/001.png
> from this page:http://android.amberfog.com/?p=247to test dithering
> on my android phone. However, when I used the android:dither="true"
> option in my XML file and when I added android:tileMode="repeat" as
> well, it did not make any difference and the image did not change at
> all. Any idea as to why this is happening? Does dithering depend on
> the device being used or something like that?
>
> 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: I don't see how to do this....

2010-01-06 Thread Maps.Huge.Info (Maps API Guru)
As another side note, if you want to preemptively prevent force close
messages, the best thing to do is test everything for a valid data
type before using it. Many unexpected conditions can be caught and
handled if you do this, failure to test everything that may have an
unexpected value will at some time catch you. The last thing you want
is a dozen one star "FC - uninstalled" comments in the market because
of a missed test.

-John Coryat

"Radar Now!"

"What Zip Code?"
-- 
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 delete applications from the Android simulator.

2010-01-06 Thread John Gaby
Thanks.

On Jan 6, 11:57 am, polyclefsoftware  wrote:
> Delete apps on the emulator just like you would on a hardware phone.
>
> Press the Menu button. Select Settings, then Applications, then Manage
> Applications. Select the app you want to uninstall. There will be an
> "Uninstall" button for that app. Just click it and it will uninstall.
>
> Alternatively, you can type "adb uninstall com.mypackagname".
>
> On Jan 6, 10:52 am, John Gaby  wrote:
>
> > I know that this is probably a stupid question, but I am completely
> > new to Android development.  I have worked through a number of the
> > examples, and now have a bunch of apps on my simulated phone.  I would
> > like to remove some of those apps (to reduce the clutter), but cannot
> > figure out how to do it.  If I click on the app icon and hold down the
> > mouse button, the screen changes to the main screen, and there appears
> > to be a trash can at the bottom.  However, dragging the icon to the
> > trash can seems to have no effect.
>
> > 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: Targeting >=1.6(!), can't get rid of READ_PHONE_STATE and WRITE_EXTERNAL_STORAGE

2010-01-06 Thread Maps.Huge.Info (Maps API Guru)
Are you trying to load you app outside the market? If so, then this is
more of a feature than a bug. I believe that Google has added these
permissions into non-market apps. If you use the market, the
permissions are correct.

-John Coryat

"Radar Now!"

"What Zip Code?"
-- 
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] A log collector - Online Bug collector For android developers

2010-01-06 Thread Dan Sherman
Not trying to take anything away from you, just wanted to mention theres
another set of code doing the same remote tracing:

http://code.google.com/p/android-remote-stacktrace/

On Wed, Jan 6, 2010 at 3:46 PM, vekexasia  wrote:

> Hi Guys,
> In my free time (thanks to my asthma sickness) i was able to complete
> an old project of mine that i think would interest a lot of you.
>
>
> Long story short: I created a library which is able to track your
> application crashes directly online!
>
> The library, once imported on your android projects, will start to
> track each crash online. It will report as much information as it
> can.
> Each new crash the web service will send you an e-mail warning
> yourself about a new found bug.
>
> Then you'll be able the following information directly on your
> browser:
>
>
> - The exception stacktrace
> - The exception CausedBy stacktrace (if available)
> - The versions of android which the crash has been occurred.
> - The different phone models afflicted by the crash.
> - The versions of your app bugged by that particular crash
>
>
> Everything is packed by exception and package so there will be a lot
> of information grouped by this 2 main fields.
> Plus i've created a set of graphs .. The most usefull is the "crash
> views" one which shows how many crash for that exception has been
> occurred divided by day.
>
> I hope this will help. On my website you could take a tour of the web
> interface with demo credentials So you can take a tour before using
> it.
>
> Obviously this is Free for all ( at least untill i will not have to
> manage GygaBytes of data ) .
> The link is : http://alogcollector.andreabaccega.com/
> Let me know :)
>
> --
> 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: Using an image in a listview

2010-01-06 Thread Patrick Plaatje
Hi Brion,

if this arraylist would be a rather big list, it would be costly
indeed, and it is a good suggestion. This list consists of just 10
items (feedmessage objects) though. These feedmessages are just a set
of getters and setters (of just small String objects) and are not doin
any costly operations internally.

I will try your suggestion though to see if this will help. I'm kinda
clueless on what is so costly

Thanx for the suggestions, and will let you know tomorrow!

Best,

Patrick

2010/1/6 Brion Emde :
> I see some problems here:
>
> // Bind the data efficiently with the holder.
> holder.titleText.setText(Html.fromHtml(((FeedMessage)Items.get
> (position)).g etTitle()));
> holder.descriptionText.setText(Html.fromHtml(((FeedMessage)Items.get
> (positi on)).getDescription()));
> Drawable d = null;
> FeedMessage fm = (FeedMessage) Items.get(position);
>
> if that Items.get(position) is costly, you're wasting it, above. How
> about:
>
>                // Bind the data efficiently with the holder.
>                Drawable d = null;
>                FeedMessage fm = (FeedMessage) Items.get(position);
>                holder.titleText.setText(Html.fromHtml(fm.getTitle
> ()));
>                holder.descriptionText.setText(Html.fromHtml
> (fm.getDescription()));
>
>
>
> On Jan 6, 12:57 pm, Patrick Plaatje  wrote:
>> Hi,
>>
>> i've used the holder method, but adding or omitting this didn;t give
>> me an increase or decrease in performance, my getView method is below:
>>
>>         @Override
>>         public View getView(int position, View convertView, ViewGroup 
>> parent) {
>>
>>                 // A ViewHolder keeps references to children views to avoid 
>> unneccessary calls
>>                 // to findViewById() on each row.
>>                 ViewHolder holder;
>>
>>                 holder = new ViewHolder();
>>
>>                 // When convertView is not null, we can reuse it directly, 
>> there is no need
>>                 // to reinflate it. We only inflate a new View when the 
>> convertView supplied
>>                 // by ListView is null.
>>                 if (convertView == null){
>>                         convertView = 
>> mInflater.inflate(R.layout.article_row, null);
>>
>>                 // Creates a ViewHolder and store references to the two 
>> children views
>>                 // we want to bind data to.
>>                         holder.titleText = (TextView) 
>> convertView.findViewById(R.id.article_title);
>>                         holder.descriptionText = (TextView)
>> convertView.findViewById(R.id.article_description);
>>                         holder.icon = (ImageView) 
>> convertView.findViewById(R.id.article_thumb);
>>
>>                         convertView.setTag(holder);
>>                 } else {
>>                         // get holder back...much faster than inflate
>>                         holder = (ViewHolder) convertView.getTag();
>>                 }
>>
>>                 // Bind the data efficiently with the holder.
>>                 
>> holder.titleText.setText(Html.fromHtml(((FeedMessage)Items.get(position)).g 
>> etTitle()));
>>                 
>> holder.descriptionText.setText(Html.fromHtml(((FeedMessage)Items.get(positi 
>> on)).getDescription()));
>>
>>                 Drawable d = null;
>>                 FeedMessage fm = (FeedMessage) Items.get(position);
>>
>>         if(fm.getEnclosures().size() > 0){
>>                 String urlString = fm.getEnclosures().get(0);
>>             dm.fetchDrawableOnThread(urlString, holder.icon);
>>         } else {
>>                 d = 
>> _context.getResources().getDrawable(R.drawable.thumb_holder);
>>                 holder.icon.setImageDrawable(d);
>>         }
>>         if(fm.getGuid() != null){
>>                 convertView.setId(position);
>>         }
>>
>>                 return convertView;
>>         }
>>
>>         static class ViewHolder {
>>                 TextView descriptionText;
>>                 TextView titleText;
>>                 ImageView icon;
>>         }
>>
>> regards,
>>
>> Patrick
>>
>> 2010/1/6 Vince :
>>
>>
>>
>>
>>
>> > What does your getView code look like. Are re-inflating your row view
>> > every time it's called, are there multiple views for the rows etc?
>>
>> > Vince
>>
>> > On Jan 6, 10:18 am, Patrick Plaatje  wrote:
>> >> Hi all,
>>
>> >> for my app i'm using a listview to display rss news articles. All goes
>> >> well, and the implementation is almost done. But when using my app,
>> >> i'm not really satisfied with the "smoothness" and user experience of
>> >> it. The main problem is that when i scroll through the listview, which
>> >> contains an image for each row in the listview, the scrolling isn;t
>> >> smooth, it executes the getview override every time. I already threw
>> >> out the "holder startegy", as it slowed the scrolling...
>>
>> >> any thoughts?
>>
>> >> Thanx,
>>
>> >> Patrick
>>
>> > --
>> > You received this message because you are su

[android-developers] Re: A log collector - Bug collector per android developers

2010-01-06 Thread vekexasia
Yes. I made a mistake.. Posted in italian :(

Btw, what do you think about that ?

On 6 Gen, 21:53, TreKing  wrote:
> Oh, apparently already posted an English version ... weird. Don't mind me...
>
> --- 
> --
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking
>
>
>
> On Wed, Jan 6, 2010 at 2:48 PM, TreKing  wrote:
> > English Translation, per Google Translate:
>
> > Hello guys ..
> > In my free time thanks to an acute asthmatic bronchitis are
> > Afini managed a project which I'm sure will interest you.
> > Basically I created a library that allows you to track bugs
> > your applications online. Let me explain ..
>
> > The library, once imported into your projects android,
> > begin to track every online crash reporting
> > as much information as possible.
>
> > In any * new * bug the web service will send you an e-mail alerting
> > which was found a new bug to which the interface was not
> > knowledge and give you the opportunity to have information about:
> > - Stack dell'eccezzione
> > - The stack that caused the exception (if available)
> > - The versions of android where the exception occurred,
> > - Phone models where the crash occurred
> > - The version of your application
>
> > Everything is grouped by exception and packages so that
> > you can see what are the exceptions that crashing your
> > applications.
>
> > There is also a nice chart that allows you to understand the temporal
> > how many times your application has crashed for that reason all
> > divided by days:)
>
> > In short, I created a nice tool, I hope .. On the website there
> > also the chance to see the operation of the interface
> > graphics with real data simply by using a demo account.
>
> > Forgot: here is the link:http://alogcollector.andreabaccega.com/
>
> > Let me know:)
>
> > --- 
> > --
> > TreKing - Chicago transit tracking app for Android-powered devices
> >http://sites.google.com/site/rezmobileapps/treking
>
> > 2010/1/6 vekexasia 
>
> >>  Ciao ragazzi..
> >> Nel mio tempo libero grazie ad una bronchite acuta asmatica son
> >> riuscito afinire un progetto che son sicuro vi interesserà.
> >> In pratica ho creato una libreria che permette di tracciare i bugs
> >> delle vostre applicazioni online. Mi spiego meglio..
>
> >> La libreria, una volta importata nei vostri progetti android,
> >> comincerà a tracciare ogni crash dell'applicazione online riportando
> >> quante più informazioni possibili.
>
> >> Ad ogni *nuovo* bug il servizio web vi manderà una e-mail avvisandovi
> >> che è stato trovato un nuovo bug del quale l'interfaccia non era a
> >> conoscenza e vi darà la possibilità di avere informazioni riguardo:
> >> - Lo stack dell'eccezzione
> >> - Lo stack che ha causato l'eccezione  (se disponibile)
> >> - Le versioni di android dove l'eccezione è avvenuta,
> >> - I modelli di telefono dove il crash è avvenuto
> >> - La versione della vostra applicazione
>
> >> Il tutto viene raggruppato per eccezione e package in modo che
> >> possiate vedere quali sono le eccezioni che mandano in crash le vostre
> >> applicazioni.
>
> >> Inoltre è presente un bel grafico temporale che vi permette di capire
> >> quante volte la vostra applicazione è crashata per quel motivo tutto
> >> diviso per giorni :)
>
> >> Insomma ho creato un bel tool, almeno spero.. Sul sito internet c'è
> >> anche la possibilità di vedere il funzionamento dell'interfaccia
> >> grafica con dati veri semplicemente usando un account di demo.
>
> >> Dimenticavo: ecco il link :http://alogcollector.andreabaccega.com/
>
> >> Fatemi sapere :)
>
> >> --
> >> 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 >>  cr...@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: Using an image in a listview

2010-01-06 Thread Brion Emde
I see some problems here:

// Bind the data efficiently with the holder.
holder.titleText.setText(Html.fromHtml(((FeedMessage)Items.get
(position)).g etTitle()));
holder.descriptionText.setText(Html.fromHtml(((FeedMessage)Items.get
(positi on)).getDescription()));
Drawable d = null;
FeedMessage fm = (FeedMessage) Items.get(position);

if that Items.get(position) is costly, you're wasting it, above. How
about:

// Bind the data efficiently with the holder.
Drawable d = null;
FeedMessage fm = (FeedMessage) Items.get(position);
holder.titleText.setText(Html.fromHtml(fm.getTitle
()));
holder.descriptionText.setText(Html.fromHtml
(fm.getDescription()));



On Jan 6, 12:57 pm, Patrick Plaatje  wrote:
> Hi,
>
> i've used the holder method, but adding or omitting this didn;t give
> me an increase or decrease in performance, my getView method is below:
>
>         @Override
>         public View getView(int position, View convertView, ViewGroup parent) 
> {
>
>                 // A ViewHolder keeps references to children views to avoid 
> unneccessary calls
>                 // to findViewById() on each row.
>                 ViewHolder holder;
>
>                 holder = new ViewHolder();
>
>                 // When convertView is not null, we can reuse it directly, 
> there is no need
>                 // to reinflate it. We only inflate a new View when the 
> convertView supplied
>                 // by ListView is null.
>                 if (convertView == null){
>                         convertView = mInflater.inflate(R.layout.article_row, 
> null);
>
>                 // Creates a ViewHolder and store references to the two 
> children views
>                 // we want to bind data to.
>                         holder.titleText = (TextView) 
> convertView.findViewById(R.id.article_title);
>                         holder.descriptionText = (TextView)
> convertView.findViewById(R.id.article_description);
>                         holder.icon = (ImageView) 
> convertView.findViewById(R.id.article_thumb);
>
>                         convertView.setTag(holder);
>                 } else {
>                         // get holder back...much faster than inflate
>                         holder = (ViewHolder) convertView.getTag();
>                 }
>
>                 // Bind the data efficiently with the holder.
>                 
> holder.titleText.setText(Html.fromHtml(((FeedMessage)Items.get(position)).g 
> etTitle()));
>                 
> holder.descriptionText.setText(Html.fromHtml(((FeedMessage)Items.get(positi 
> on)).getDescription()));
>
>                 Drawable d = null;
>                 FeedMessage fm = (FeedMessage) Items.get(position);
>
>         if(fm.getEnclosures().size() > 0){
>                 String urlString = fm.getEnclosures().get(0);
>             dm.fetchDrawableOnThread(urlString, holder.icon);
>         } else {
>                 d = 
> _context.getResources().getDrawable(R.drawable.thumb_holder);
>                 holder.icon.setImageDrawable(d);
>         }
>         if(fm.getGuid() != null){
>                 convertView.setId(position);
>         }
>
>                 return convertView;
>         }
>
>         static class ViewHolder {
>                 TextView descriptionText;
>                 TextView titleText;
>                 ImageView icon;
>         }
>
> regards,
>
> Patrick
>
> 2010/1/6 Vince :
>
>
>
>
>
> > What does your getView code look like. Are re-inflating your row view
> > every time it's called, are there multiple views for the rows etc?
>
> > Vince
>
> > On Jan 6, 10:18 am, Patrick Plaatje  wrote:
> >> Hi all,
>
> >> for my app i'm using a listview to display rss news articles. All goes
> >> well, and the implementation is almost done. But when using my app,
> >> i'm not really satisfied with the "smoothness" and user experience of
> >> it. The main problem is that when i scroll through the listview, which
> >> contains an image for each row in the listview, the scrolling isn;t
> >> smooth, it executes the getview override every time. I already threw
> >> out the "holder startegy", as it slowed the scrolling...
>
> >> any thoughts?
>
> >> Thanx,
>
> >> Patrick
>
> > --
> > 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
>
> --
> Met vriendelijke groet,
>
> Patrick Plaatje
>
> NDC|VBK de uitgevers
> Sixmastraat 32, 8915 PA Leeuwarden
> Postbus 394, 8901 BD Leeuwarden
> T   (058) - 284 5044
> M  (06) - 158 966 34
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send ema

[android-developers] Re: SAXParser invalid token exception because of '&' inside attribute value

2010-01-06 Thread tlegras

(wow, it seems it took 1 or 2 day before these thread appears here, so
sorry for the multipost i posted another one in the mean time)

Thanks for your help.
I tried first 3) but give up and then tried pure nekohtml solution
which works perfectly well :)

Thierry.

On 3 jan, 01:18, Frank Weiss  wrote:
> There have been a few similar questions. The basic issue is that SAX parsers
> requires valid XML or XHTML as input. If you have control (or can influence
> the authors of) the service, make the output valid, which as you well know,
> means that <, >, ", ', & need to be escaped. In PHP, this is easily done
> with the htmlspecialchars function. Tip: use validator.w3.org to see what's
> wrong with the document.
>
> If you can't change the service or it is HTML anyway, here are some
> suggestions:
>
> 1) Use NekoHtml to preprocess the the flakey markup into a DOM. You can then
> user SAXParser, XPath, XSLT, etc. to get the data. I haven't tried it on
> Andorid - it may be a bit heavy-weight, but otherwise is a great way to deal
> with flakey markup.
> 2) See if you can modify the SAXParser itself (can you say Open Source?) to
> relax the particular issues. If the source docuemnt is really bad
> (unbalanced tags, etc.) this is probably going to get too hairy.
> 3) Use regex to parse the page.
>
> There are probably some other creative solutions. Which one is best depends
> on the details of the source document and what you want want to do with it.
>
> On Fri, Jan 1, 2010 at 6:12 AM, tlegras  wrote:
> > Happy new years :)
>
> > I am using SAXParser to parse an html page (any better solution?) and
> > have this exception:
>
> >            W/System.err( 1358): org.apache.harmony.xml.ExpatParser
> > $ParseException: At line 1, column 59: not well-formed (invalid token)
>
> > I have reduced the page to this:
>
> >            
>
> > and what causes the exception is the '&' inside the href attribute
> > value.
>
> > Here is a minimalist test code:
>
> >            DefaultHandler emptySaxHandler = new DefaultHandler() {};
> >            String xmlstr = " > console.pl?id=382730&idt=1cf6b94aa1a4cf84
> > \">";
>
> >            SAXParserFactory factory = SAXParserFactory.newInstance();
> >            SAXParser saxParser = factory.newSAXParser();
> >            saxParser.parse(new ByteArrayInputStream(xmlstr.getBytes
> > ()),emptySaxHandler);
>
> > is this a normal behaviour or kind of bug? if normal, what should do
> > to preprocess the string before parsing?
>
> > Thks for any help,
> > Thierry.
>
> > --
> > 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] Image not dithering

2010-01-06 Thread abhi
Hi,

I am using this image 
http://android.amberfog.com/wp-content/uploads/2009/11/001.png
from this page: http://android.amberfog.com/?p=247 to test dithering
on my android phone. However, when I used the android:dither="true"
option in my XML file and when I added android:tileMode="repeat" as
well, it did not make any difference and the image did not change at
all. Any idea as to why this is happening? Does dithering depend on
the device being used or something like that?

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] Re: Can someone with a Motorola Droid call AccountManager.getAccounts() please?

2010-01-06 Thread Mariano Kamp
>
> It turns out that the reason the authToken from the AccountManager
> wasn't working was because it was expired. It was dated Dec. 9th,
> which is probably the day I first got my authentication code working.
> I guess it cached the authToken and has been using the same one ever
> since.
>
How do you know it was dated and that it was from the 9th?
Anyway, I don't think that is the case for me. I did all my testing on the
same day and always got a token, but that token doesn't seem to be valid.

I acquire a token like this:

String token = accountManager.blockingGetAuthToken(acct, "ah", false);

and then try something like this:

curl --header "Cookie: SID=" --header "Accept-Encoding:
gzip" "
http://www.google.com/reader/atom/user/-/state/com.google/reading-list"; -D
header | tidy -i -xml | mate

And this usually returns an xml file, but only if I pass in an auth token
from the ClientLogin. But not this time.

I get those headers then:

HTTP/1.1 302 Moved Temporarily
Content-Type: text/html; charset=UTF-8
Location:
https://www.google.com/accounts/ServiceLogin?hl=en&nui=1&service=reader&continue=

Date: Wed, 06 Jan 2010 20:42:00 GMT
Expires: Wed, 06 Jan 2010 20:42:00 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1381
Server: GFE/2.0

And this message in the content stream:

302 Redirection

  body {font-family: arial,sans-serif}
  div.nav {margin-top: 1ex}
  div.nav A {font-size: 10pt; font-family: arial,sans-serif}
  span.nav {font-size: 10pt; font-family: arial,sans-serif; font-weight:
bold}
  div.nav A,span.big {font-size: 12pt; color: #cc}
  div.nav A {font-size: 10pt; color: black}
  A.l:link {color: #6f6f6f}
  

Google  
 


Error
 
Redirection
Further action needs to be taken by your user agent in order to fulfill the
request.



  Following the "expired" logic this should work, right?:

String oldToken = accountManager.peekAuthToken(acct, "ah");
if (oldToken != null) {
  System.out.println("oldToken="+oldToken);
  accountManager.invalidateAuthToken("com.google",oldToken);
  System.out.println("invalidated.");
}
String sid = accountManager.blockingGetAuthToken(acct, "ah", false);

  But it doesn't. Same effect. And also these two additional permissions
(four in total then) are also needed then:






> So now the questions are: How do I clear out the cached authToken? How
> often would I need to do this? Is there a way of getting a new
> authToken that isn't going to require that the user agree to a system
> prompt every time?
>
> I'm going to try the invalidateAuthToken and updateUserCredentials
> methods. If the user is going to be prompted every time the authToken
> needs to be refreshed, using the authToken from AccountManager simply
> isn't going to be a worthwhile solution to authenticating a Google
> Service.
>
> --
> 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: How to test if app is shown on Market for all screensizes

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

Re: [android-developers] A log collector - Bug collector per android developers

2010-01-06 Thread TreKing
Oh, apparently already posted an English version ... weird. Don't mind me...

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


On Wed, Jan 6, 2010 at 2:48 PM, TreKing  wrote:

> English Translation, per Google Translate:
>
> Hello guys ..
> In my free time thanks to an acute asthmatic bronchitis are
> Afini managed a project which I'm sure will interest you.
> Basically I created a library that allows you to track bugs
> your applications online. Let me explain ..
>
> The library, once imported into your projects android,
> begin to track every online crash reporting
> as much information as possible.
>
> In any * new * bug the web service will send you an e-mail alerting
> which was found a new bug to which the interface was not
> knowledge and give you the opportunity to have information about:
> - Stack dell'eccezzione
> - The stack that caused the exception (if available)
> - The versions of android where the exception occurred,
> - Phone models where the crash occurred
> - The version of your application
>
> Everything is grouped by exception and packages so that
> you can see what are the exceptions that crashing your
> applications.
>
> There is also a nice chart that allows you to understand the temporal
> how many times your application has crashed for that reason all
> divided by days:)
>
> In short, I created a nice tool, I hope .. On the website there
> also the chance to see the operation of the interface
> graphics with real data simply by using a demo account.
>
> Forgot: here is the link: http://alogcollector.andreabaccega.com/
>
> Let me know:)
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
>
> 2010/1/6 vekexasia 
>
>>  Ciao ragazzi..
>> Nel mio tempo libero grazie ad una bronchite acuta asmatica son
>> riuscito afinire un progetto che son sicuro vi interesserà.
>> In pratica ho creato una libreria che permette di tracciare i bugs
>> delle vostre applicazioni online. Mi spiego meglio..
>>
>> La libreria, una volta importata nei vostri progetti android,
>> comincerà a tracciare ogni crash dell'applicazione online riportando
>> quante più informazioni possibili.
>>
>> Ad ogni *nuovo* bug il servizio web vi manderà una e-mail avvisandovi
>> che è stato trovato un nuovo bug del quale l'interfaccia non era a
>> conoscenza e vi darà la possibilità di avere informazioni riguardo:
>> - Lo stack dell'eccezzione
>> - Lo stack che ha causato l'eccezione  (se disponibile)
>> - Le versioni di android dove l'eccezione è avvenuta,
>> - I modelli di telefono dove il crash è avvenuto
>> - La versione della vostra applicazione
>>
>> Il tutto viene raggruppato per eccezione e package in modo che
>> possiate vedere quali sono le eccezioni che mandano in crash le vostre
>> applicazioni.
>>
>> Inoltre è presente un bel grafico temporale che vi permette di capire
>> quante volte la vostra applicazione è crashata per quel motivo tutto
>> diviso per giorni :)
>>
>> Insomma ho creato un bel tool, almeno spero.. Sul sito internet c'è
>> anche la possibilità di vedere il funzionamento dell'interfaccia
>> grafica con dati veri semplicemente usando un account di demo.
>>
>> Dimenticavo: ecco il link : http://alogcollector.andreabaccega.com/
>>
>> Fatemi sapere :)
>>
>> --
>> 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] A log collector - Bug collector per android developers

2010-01-06 Thread TreKing
English Translation, per Google Translate:

Hello guys ..
In my free time thanks to an acute asthmatic bronchitis are
Afini managed a project which I'm sure will interest you.
Basically I created a library that allows you to track bugs
your applications online. Let me explain ..

The library, once imported into your projects android,
begin to track every online crash reporting
as much information as possible.

In any * new * bug the web service will send you an e-mail alerting
which was found a new bug to which the interface was not
knowledge and give you the opportunity to have information about:
- Stack dell'eccezzione
- The stack that caused the exception (if available)
- The versions of android where the exception occurred,
- Phone models where the crash occurred
- The version of your application

Everything is grouped by exception and packages so that
you can see what are the exceptions that crashing your
applications.

There is also a nice chart that allows you to understand the temporal
how many times your application has crashed for that reason all
divided by days:)

In short, I created a nice tool, I hope .. On the website there
also the chance to see the operation of the interface
graphics with real data simply by using a demo account.

Forgot: here is the link: http://alogcollector.andreabaccega.com/

Let me know:)

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


2010/1/6 vekexasia 

> Ciao ragazzi..
> Nel mio tempo libero grazie ad una bronchite acuta asmatica son
> riuscito afinire un progetto che son sicuro vi interesserà.
> In pratica ho creato una libreria che permette di tracciare i bugs
> delle vostre applicazioni online. Mi spiego meglio..
>
> La libreria, una volta importata nei vostri progetti android,
> comincerà a tracciare ogni crash dell'applicazione online riportando
> quante più informazioni possibili.
>
> Ad ogni *nuovo* bug il servizio web vi manderà una e-mail avvisandovi
> che è stato trovato un nuovo bug del quale l'interfaccia non era a
> conoscenza e vi darà la possibilità di avere informazioni riguardo:
> - Lo stack dell'eccezzione
> - Lo stack che ha causato l'eccezione  (se disponibile)
> - Le versioni di android dove l'eccezione è avvenuta,
> - I modelli di telefono dove il crash è avvenuto
> - La versione della vostra applicazione
>
> Il tutto viene raggruppato per eccezione e package in modo che
> possiate vedere quali sono le eccezioni che mandano in crash le vostre
> applicazioni.
>
> Inoltre è presente un bel grafico temporale che vi permette di capire
> quante volte la vostra applicazione è crashata per quel motivo tutto
> diviso per giorni :)
>
> Insomma ho creato un bel tool, almeno spero.. Sul sito internet c'è
> anche la possibilità di vedere il funzionamento dell'interfaccia
> grafica con dati veri semplicemente usando un account di demo.
>
> Dimenticavo: ecco il link : http://alogcollector.andreabaccega.com/
>
> Fatemi sapere :)
>
> --
> 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] A log collector - Online Bug collector For android developers

2010-01-06 Thread vekexasia
Hi Guys,
In my free time (thanks to my asthma sickness) i was able to complete
an old project of mine that i think would interest a lot of you.


Long story short: I created a library which is able to track your
application crashes directly online!

The library, once imported on your android projects, will start to
track each crash online. It will report as much information as it
can.
Each new crash the web service will send you an e-mail warning
yourself about a new found bug.

Then you'll be able the following information directly on your
browser:


- The exception stacktrace
- The exception CausedBy stacktrace (if available)
- The versions of android which the crash has been occurred.
- The different phone models afflicted by the crash.
- The versions of your app bugged by that particular crash


Everything is packed by exception and package so there will be a lot
of information grouped by this 2 main fields.
Plus i've created a set of graphs .. The most usefull is the "crash
views" one which shows how many crash for that exception has been
occurred divided by day.

I hope this will help. On my website you could take a tour of the web
interface with demo credentials So you can take a tour before using
it.

Obviously this is Free for all ( at least untill i will not have to
manage GygaBytes of data ) .
The link is : http://alogcollector.andreabaccega.com/
Let me know :)
-- 
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: Performance issue: Dalvik VM is >20x slower than most modern Java VMs

2010-01-06 Thread Ecthelion
Do you have any references for the statement below? And does "next sdk
release" refer to the Android 2.1 SDK?

Thanks

On 6 Jan., 19:49, "Fred Grott(Android Expert, http://mobilebytes.wordpress.com)"
 wrote:
> the next sdk release is suppose to have a Dalvik JIT i nit doubling
> speed/performance..
-- 
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] A log collector - Bug collector per android developers

2010-01-06 Thread vekexasia
Ciao ragazzi..
Nel mio tempo libero grazie ad una bronchite acuta asmatica son
riuscito afinire un progetto che son sicuro vi interesserà.
In pratica ho creato una libreria che permette di tracciare i bugs
delle vostre applicazioni online. Mi spiego meglio..

La libreria, una volta importata nei vostri progetti android,
comincerà a tracciare ogni crash dell'applicazione online riportando
quante più informazioni possibili.

Ad ogni *nuovo* bug il servizio web vi manderà una e-mail avvisandovi
che è stato trovato un nuovo bug del quale l'interfaccia non era a
conoscenza e vi darà la possibilità di avere informazioni riguardo:
- Lo stack dell'eccezzione
- Lo stack che ha causato l'eccezione  (se disponibile)
- Le versioni di android dove l'eccezione è avvenuta,
- I modelli di telefono dove il crash è avvenuto
- La versione della vostra applicazione

Il tutto viene raggruppato per eccezione e package in modo che
possiate vedere quali sono le eccezioni che mandano in crash le vostre
applicazioni.

Inoltre è presente un bel grafico temporale che vi permette di capire
quante volte la vostra applicazione è crashata per quel motivo tutto
diviso per giorni :)

Insomma ho creato un bel tool, almeno spero.. Sul sito internet c'è
anche la possibilità di vedere il funzionamento dell'interfaccia
grafica con dati veri semplicemente usando un account di demo.

Dimenticavo: ecco il link : http://alogcollector.andreabaccega.com/

Fatemi sapere :)
-- 
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: Will native libs built with the NDK work with the Nexus One?

2010-01-06 Thread ITWizard
Ciao Francois,

you will not be able to debug/step-into the native lib. The best thing
you could consider to add log-files to your native lib, and check the
logs if crashing.
JVM is slow, compared to C, but if your game is turn-based this is not
an issue - in this case i would recommend Java for all code.
If your game is real-time, than probably a good idea is to first start
with the presentations on this topic from Google:

- http://www.youtube.com/watch?v=U4Bk5rmIpic

- Chris Pruett is also doing a game, and he plans to release all
source code sometimes soon :) so a good idea is to check out his site
http://replicaisland.blogspot.com/2009/11/android-game-development-resources.html

- there are lots of 3rd party game-engines for android, but most of
them are basic, and you have to check out the licensing terms

- for some tutorials on using the NDK - you can also consider our
website - hope you find them useful
http://www.itwizard.ro/category/android-cc

Hope this helps.
Best regards






On Jan 6, 4:39 am, Francois Hamel  wrote:
> Basically is the ARMv7 instruction set somehow an extension of the
> ARMv5 or is it completely different? I'd like to get started building
> somewhat large components of my game in it since the JVM seems to be
> slow as hell from what I've read.
>
> And if anyone did something with it how did you manage to debug/step
> into your native lib while debugging your application written in java?
> Am I forced to build a Win32 application as well using my lib for
> debug purposes?
-- 
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] Targeting >=1.6(!), can't get rid of READ_PHONE_STATE and WRITE_EXTERNAL_STORAGE

2010-01-06 Thread greg1x
Hi!

I'm trying to get rid of the mentioned auto-permissions in my signed
apk, but I can't.
I know it is an issue with targetting 1.5, but this isn't my case. I'm
targeting >=1.6.
I've checked everything:

In my manifest:


http://schemas.android.com/apk/res/android";
  package="com.aaa.bbb"
  android:versionCode="1"
  android:versionName="1.0.0">



Eclipse generates the proper value in default.properties:
target=android-4

What else could I check? Please help!
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

[android-developers] Re: Can someone with a Motorola Droid call AccountManager.getAccounts() please?

2010-01-06 Thread polyclefsoftware
Well, an Android dev in Google's online office hours helped me
troubleshoot this today.

It turns out that the reason the authToken from the AccountManager
wasn't working was because it was expired. It was dated Dec. 9th,
which is probably the day I first got my authentication code working.
I guess it cached the authToken and has been using the same one ever
since.

So now the questions are: How do I clear out the cached authToken? How
often would I need to do this? Is there a way of getting a new
authToken that isn't going to require that the user agree to a system
prompt every time?

I'm going to try the invalidateAuthToken and updateUserCredentials
methods. If the user is going to be prompted every time the authToken
needs to be refreshed, using the authToken from AccountManager simply
isn't going to be a worthwhile solution to authenticating a Google
Service.
-- 
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 delete applications from the Android simulator.

2010-01-06 Thread polyclefsoftware
Delete apps on the emulator just like you would on a hardware phone.

Press the Menu button. Select Settings, then Applications, then Manage
Applications. Select the app you want to uninstall. There will be an
"Uninstall" button for that app. Just click it and it will uninstall.

Alternatively, you can type "adb uninstall com.mypackagname".

On Jan 6, 10:52 am, John Gaby  wrote:
> I know that this is probably a stupid question, but I am completely
> new to Android development.  I have worked through a number of the
> examples, and now have a bunch of apps on my simulated phone.  I would
> like to remove some of those apps (to reduce the clutter), but cannot
> figure out how to do it.  If I click on the app icon and hold down the
> mouse button, the screen changes to the main screen, and there appears
> to be a trash can at the bottom.  However, dragging the icon to the
> trash can seems to have no effect.
>
> 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] Re: Using an image in a listview

2010-01-06 Thread Patrick Plaatje
Hi,

i've used the holder method, but adding or omitting this didn;t give
me an increase or decrease in performance, my getView method is below:

@Override
public View getView(int position, View convertView, ViewGroup parent) {

// A ViewHolder keeps references to children views to avoid 
unneccessary calls
// to findViewById() on each row.
ViewHolder holder;

holder = new ViewHolder();

// When convertView is not null, we can reuse it directly, 
there is no need
// to reinflate it. We only inflate a new View when the 
convertView supplied
// by ListView is null.
if (convertView == null){
convertView = mInflater.inflate(R.layout.article_row, 
null);

// Creates a ViewHolder and store references to the two 
children views
// we want to bind data to.
holder.titleText = (TextView) 
convertView.findViewById(R.id.article_title);
holder.descriptionText = (TextView)
convertView.findViewById(R.id.article_description);
holder.icon = (ImageView) 
convertView.findViewById(R.id.article_thumb);

convertView.setTag(holder);
} else {
// get holder back...much faster than inflate
holder = (ViewHolder) convertView.getTag();
}


// Bind the data efficiently with the holder.

holder.titleText.setText(Html.fromHtml(((FeedMessage)Items.get(position)).getTitle()));

holder.descriptionText.setText(Html.fromHtml(((FeedMessage)Items.get(position)).getDescription()));

Drawable d = null;
FeedMessage fm = (FeedMessage) Items.get(position);

if(fm.getEnclosures().size() > 0){
String urlString = fm.getEnclosures().get(0);
dm.fetchDrawableOnThread(urlString, holder.icon);
} else {
d = 
_context.getResources().getDrawable(R.drawable.thumb_holder);
holder.icon.setImageDrawable(d);
}
if(fm.getGuid() != null){
convertView.setId(position);
}

return convertView;
}

static class ViewHolder {
TextView descriptionText;
TextView titleText;
ImageView icon;
}



regards,

Patrick

2010/1/6 Vince :
> What does your getView code look like. Are re-inflating your row view
> every time it's called, are there multiple views for the rows etc?
>
> Vince
>
> On Jan 6, 10:18 am, Patrick Plaatje  wrote:
>> Hi all,
>>
>> for my app i'm using a listview to display rss news articles. All goes
>> well, and the implementation is almost done. But when using my app,
>> i'm not really satisfied with the "smoothness" and user experience of
>> it. The main problem is that when i scroll through the listview, which
>> contains an image for each row in the listview, the scrolling isn;t
>> smooth, it executes the getview override every time. I already threw
>> out the "holder startegy", as it slowed the scrolling...
>>
>> any thoughts?
>>
>> Thanx,
>>
>> Patrick
>
> --
> 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
>



-- 
Met vriendelijke groet,


Patrick Plaatje

NDC|VBK de uitgevers
Sixmastraat 32, 8915 PA Leeuwarden
Postbus 394, 8901 BD Leeuwarden
T   (058) - 284 5044
M  (06) - 158 966 34
-- 
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: I don't see how to do this....

2010-01-06 Thread furby
Aha! Thank you!

As soon as I read your response it hit me - I am testing on the
emulator, which will always give me a null provider! Which means no
matter what I do I am gonna get a null which means I can't get a
latitude... Which shows that I have had WAY too much time off of
programming between Christmas and New years!

Thanks a million!

On Jan 6, 2:26 pm, "Maps.Huge.Info (Maps API Guru)" 
wrote:
> You're not testing to see if you get a null provider, also I'm not
> sure asking to use POWER_LOW and ACCURACY_FINE will work as GPS uses a
> lot of power.
>
> I suggest dropping the POWER_LOW and testing provider for null.
>
> Also, unless you need a very accurate fix, the wireless network
> location service (ACCURACY_COARSE) is much faster, uses less power and
> also works indoors, you might consider using that as well.
>
> As a side note, you're not going to get a good fix using
> getLastKnownLocation without first attaching a listener to the GPS.
> The last known location might be 100 miles away, if the last time
> location services were used was a while ago. I've found
> getLastKnownLocation to be unreliable.
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"
-- 
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: scaling game images according display sizes

2010-01-06 Thread Andrea
Hi Robert, thanks for the reply.
Ok the images are loaded as Bitmaps (not drawable) and drawed on the
onDraw(Canvas c) method of a view. Inside that method I invalidate()
all the view. So the game runs as fast as it can. The game is using
dirty rects technique to redraw only the portions of the screen that
need to be changed. Here is the simply code structure:

//on a view
private void onDraw(Canvas c){

   //do staff

   invalidate();
}

if you need some other info, tell me it.

a.p.

Robert Green ha scritto:
> What's your design like?  How are you drawing everything?  If you tell
> me that, I can offer some suggestions.
>
> On Jan 6, 9:02 am, Andrea  wrote:
> > Hi
> > I developed a game with the g1 in my mind. Now I want to support large
> > screen sizes but I don't want to add in the apk different images for
> > different screen sizes because now the apk is 3mb and when installed
> > trought market it became 6mb (due to protection on). If i have to
> > double the images to support new screens, the apk would be too heavy
> > (about 13mb, i think) so I'm wondering to know if scaling images at
> > runtime by myself (without compatibility mode) maybe the best way for
> > supporting larger screens. Someone tried this solution? Compatbility
> > mode does a great work in scaling images but it slows down drastically
> > the framerate (i think because the scale operation is made every time
> > an image is used/moved and not only once on the load of the image
> > itself).
> >
> > 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] Re: Nexus 2.1 one sale, WHERE is the SDK!

2010-01-06 Thread David Sauter
> Reading the numerous N1 reviews over the last day, one recurring theme
> is (now that there's finally Android hardware to equal the iPhone) the
> app catalog is the major drawback to the platform. IOW, pissing off
> developers is the last thing Google should be doing right now.

Amusingly enough it's the defenses that Android has because it can
multitask that are killing high end development for it.  16MB heap
renders the phone just about useless for the high end stuff.

-- 
--
David Sauter
-- 
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] OpenGL fixed point vs. floating point

2010-01-06 Thread Peter Eastman
OpenGL ES allows values to be specified in either fixed point or
floating point format, but I haven't been able to find any information
about how this is actually implemented on Android devices.  Are there
actually two different pipelines, one for fixed point and one for
floating point?  If so, what happens if you mix and match them, such
as specifying your matrix in floating point but your vertices in fixed
point?  Alternatively, does it implement everything with just one
format internally, and convert the other format to it as necessary?
If so, then you presumably get the best performance if you always
specify values in the internal format so as to avoid conversions.  How
then can I determine which format is used internally?

I notice that the Matrix and Visibility classes only accept floating
point values for matrices.  Should I interpret that as a
recommendation to use floating point for matrices?

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

[android-developers] How to delete applications from the Android simulator.

2010-01-06 Thread John Gaby
I know that this is probably a stupid question, but I am completely
new to Android development.  I have worked through a number of the
examples, and now have a bunch of apps on my simulated phone.  I would
like to remove some of those apps (to reduce the clutter), but cannot
figure out how to do it.  If I click on the app icon and hold down the
mouse button, the screen changes to the main screen, and there appears
to be a trash can at the bottom.  However, dragging the icon to the
trash can seems to have no effect.

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: Using an image in a listview

2010-01-06 Thread Vince
What does your getView code look like. Are re-inflating your row view
every time it's called, are there multiple views for the rows etc?

Vince

On Jan 6, 10:18 am, Patrick Plaatje  wrote:
> Hi all,
>
> for my app i'm using a listview to display rss news articles. All goes
> well, and the implementation is almost done. But when using my app,
> i'm not really satisfied with the "smoothness" and user experience of
> it. The main problem is that when i scroll through the listview, which
> contains an image for each row in the listview, the scrolling isn;t
> smooth, it executes the getview override every time. I already threw
> out the "holder startegy", as it slowed the scrolling...
>
> any thoughts?
>
> Thanx,
>
> Patrick
-- 
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] Question about emulator and accented character input

2010-01-06 Thread Daniel Sternbergh
I'm puzzled by the difference between the accented characters that are
available on a long keypreess on the soft keyboard that pops up within
the device in the emulator, and those which are available on a long
keypress on the soft keyboard in the emulator itself.  The behavior
that I see is that the device's soft keyboard presents a subset of the
options -- for example, the Latin IME offers 7 alternates for "a" but
the keyboard offers 9.

The characters that I'm particularly interested (vowel with macron) in
are found in the keyboard's larger set but not in the IME's subset,
but I haven't been able to find any information on why the IME
provides only a subset, and whether the larger set is accessible to
devices with a physical keyboard, only to those devices, and not to
devices with only the IME/soft keyboard.
-- 
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] Interface fo wi-fi

2010-01-06 Thread Avanish
hi all,

can anyone please tell me what all are required as inputs to develop a
communication interface for wi-fi.

Avanish

-- 
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 get service state?

2010-01-06 Thread Coby
Hi!

I'm trying to get current service state of my phone (IN_SERVICE,
OUT_OF_SERVICE, EMERGENCY_ONLY, POWER_OFF). It can be easily fetched
with getState() method of ServiceState when a onServiceStateChanged
(ServiceState serviceState) callback is invoked:

public class ServiceStateListener extends PhoneStateListener{
@Override
public void onServiceStateChanged(ServiceState serviceState) {
switch(serviceState.getState()){
case ServiceState.STATE_IN_SERVICE:
Log.i("Listener", "In Service");
break;
case ServiceState.STATE_EMERGENCY_ONLY:
Log.i("Listener", "Emergency");
break;
case ServiceState.STATE_OUT_OF_SERVICE:
Log.i("Listener", "Out Of Service");
break;
case ServiceState.STATE_POWER_OFF:
Log.i("Listener", "Phone Off");
break;
}
}

But if you explicitly create a ServiceState object and try to get it's
state. It's always Out Of Service (returns 1), no matter what state
your phone is in right now:

@Override
public void onCreate() {
ServiceState serviceState = new ServiceState();
Log.i("onCreate", Integer.toString(serviceState.getState()));
}

I don't have much experience with Android. Any help is appreciated.
-- 
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 Books?...

2010-01-06 Thread kylestew
There really aren't any good Android books out there. I bought two of
them and they are just poor copies of what Google wrote for
developers. If you want to build games you should look for books on
making games with open gl es. You should be able to find info on the
internet about any Android specific open gl implementation.

Good luck


On Jan 5, 3:37 pm, Duey Oxburger  wrote:
> Can anyone recommend any good Android books for a beginner?  I'm
> mostly interested in games...
>
> Thx All,
>
> D
-- 
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] Adding a customized layer to the Maps application

2010-01-06 Thread NicoToc
Hi,

I've developed an app that is using a map as part of the application
and adding locations to it. Users are asking me to add the possibility
to see these locations on the Maps application.

Do you know how I can create an customized layer for the Maps
application?

Thanks for your help

Nicolas
-- 
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] hello

2010-01-06 Thread mainu
I came to know that it is not possible to send mms in android
emulator.Is it possible to send mms in android device. Is there any
API for mms?
   May I have any help from u people  regarding 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] Simultaneous Video recording, Calling and GPS

2010-01-06 Thread breakpoint
Our current application on Symbian S60 does simultaneous voice calls,
audio/video recording and GPS. With android sdk, can we develop such
application ?

Thanks,

Jawad.
-- 
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] Launching another application through the current application

2010-01-06 Thread Rajiv
Hello all

The problem I am facing is, I want to launch another application through the
current application.

In RIM there is a "ApplicationManager.getApplicationManager().launch("String
path")" method that launches directly RIM application mentioned in "String
path".

Is there any method like this in android or any other way to solve this
problem ??

Regards,
Rajiv
-- 
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] Composite USB Android Driver & user space Connection

2010-01-06 Thread Madhu Rao
Hi All,

i have one query related to android USB composite drivers,
can anybody tell me from where android_adb_enable (android.c) driver open
and release functions are getting called from userspace.

i can see following file opens the driver, is it correct? or is there any
other location?
system/core/adb/usb_linux_client.c

because when i disable the above code also composite driver is working fine,
so i just wonder from where it is getting called.

Thanks in Advance,
Madhu
-- 
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 run application in Back ground?

2010-01-06 Thread Ganeshkumar


Hello Friends,

I want to develope an application in which if SIM card is changed then
the application should sent SMS to a predefined number from the new
SIM. User should not know that SMS are being send from his/ her
mobile. For this application needs to run in background. How can I
achieve it?


Thank you 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] Re: ActiveSync warnings on exchange server caused by Droid users only

2010-01-06 Thread Kenjunior
Exact same senerio here...  SonicWall Pro2040 has timeout at
15 min.  Nothing broke just hate filling log files with useless
errors.

Confused,

 Ken

On Dec 7 2009, 10:30 am, ahahum  wrote:
> We have users setup on our coprorate email server connecting using
> activesync. Most users are windows mobile and iPhones. We currently
> have 2 droids for testing (one is mine!).
>
> I get warnings in my exchange server application logs like this. It
> only began when we started testing the droids.
>
> Event Type:     Warning
> Event Source:   Server ActiveSync
> Event Category: None
> Event ID:       3033
> Date:    12/2/2009
> Time:    3:32:30 PM
> User:    username
> Computer:       EXCHANGE
> Description:
> The average of the most recent [200] heartbeat intervals used by
> clients is less than or equal to [540]. Make sure that your firewall
> configuration is set to work correctly with Exchange ActiveSync and
> direct push technology. Specifically, make sure that your firewall is
> configured so that requests to Exchange ActiveSync do not expire
> before they have the opportunity to be processed. For more information
> about how to configure firewall settings when using Exchange
> ActiveSync, see Microsoft Knowledge Base article 905013, "Enterprise
> Firewall Configuration for Exchange ActiveSync Direct Push
> Technology" (Enterprise firewall configuration for Exchange ActiveSync
> Direct Push Technology).
>
> I have modified my firewall here to meet MS's recommendations for
> timeout values - mine are at 900 seconds. It seems that the droid's
> activesync is doing something a little different than the standard
> activesync session with the server.
>
> Does anyone else manage an exchange server and have access to these
> logs? Please look to see if you're getting the same warning. It's
> logged about 1 time per hour. The only thing that I haven't tried is
> restarting the server after the changes on our firewall. I don't
> expect this to be an issue.
>
> Thanks!
>
> Adam
-- 
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: JmDNS succeeds on simulator, fails on phone

2010-01-06 Thread jsilland
Can you post a snippet of code that demonstrates how to make jmdns
work on the emulator? Other threads on this list appear to claim that
various networking restrictions in the emulator prevent jmdns from
working properly but it seems projects have successfully used it in on
real devices. If you got the emulator to resolve a service published
on the host machine, I'd be happy to see the code =]

Cheers,
-jsi

On Dec 31 2009, 6:06 pm, SFSDCris  wrote:
> I'm attempting to use JmDNS (zeroconf / Bonjour) to resolve a local
> network hosts ip address.
>
> JmDNS succeeds on the simulator, but fails on the phone.
> The phone is an HTC Magic (from the Google I/O conference)
>
> Both are running Android 1.5
>
> Any ideas?
-- 
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: ListView not responding to Click or KeyPress

2010-01-06 Thread Ted
Hey!
I think I have the same problem, and I do not have any focusable
children. My layout for a Row in the ListView contains:

LinearLayout
   |
   +-- ImageView
   |
   +-- LinearLayout
   |
   +-- TextView
   |
   +-- TextView
   |
   +-- TextView

and the Main activity is like this:


public class Main extends Activity
{
ArrayList nodes;

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

ArrayList nodes = new ArrayList();
nodes.add(new Node("My name", "My text", "13:10", 0));

NodeRowAdapter nra = new NodeRowAdapter(this, nodes);

ListView listView1 = (ListView) findViewById
(R.id.ListViewNodes);
listView1.setOnItemClickListener(new OnItemClickListener() {

public void onItemClick(AdapterView parent, View view, int
position, long id)
{
System.out.println ("get onItem Click position=
"+position);
}
});
listView1.setAdapter(nra);
}
}


It seems to me as nothing at all happens when I click the item in the
ListView...

On 4 Dec 2009, 19:43, Romain Guy  wrote:
> This is unnecessary. This problem will occur if your list item
> contains focusable children (like buttons, edittexts, etc.)
>
>
>
>
>
> On Thu, Dec 3, 2009 at 4:20 PM, hwii77  wrote:
> > maybe maybe try this: Add android:clickable="true"  (and
> > android:focusable="true")
>
> > On Dec 2, 1:37 pm, n179911  wrote:
> >> Hi,
>
> >> I have a simple ListView in my layout.xml file.
>
> >>      >>             android:layout_width="fill_parent"
> >>             android:layout_height="wrap_content"
> >>         />
>
> >> And in my javacode, I add a setOnItemClickListener() to my listview:
>
> >> listView.setOnItemClickListener(new OnItemClickListener() {
>
> >>                 public void onItemClick(AdapterView parent, View view,
> >> int position, long id) {
> >>                     System.out.println ("get onItem Click position=
> >> "+position);
>
> >>                 }
> >>             });
>
> >> But when I run on G1. I don't see any print out when I click an item on the
> >> ListView on the phone.
> >> Or when I select an item using track ball and press CENTER.
>
> >> Can you please tell me why to resolve my problem?
>
> >> 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
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Eclipse with ADT plugin error

2010-01-06 Thread aneuryzma
Hi,

I installed Eclipse with ADT plugin (latest version). Doing so, I now
end up in a no longer working Eclipse. It states
"An error has occurred. See the logfile..."

The logfile reads like this:

!SESSION Tue Dec 08 13:40:49 CET 2009
--
!ENTRY org.eclipse.equinox.launcher 4 0 2009-12-08 13:40:49.687
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException:
org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
-- 
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: JmDNS succeeds on simulator, fails on phone

2010-01-06 Thread jsilland
Can you post a snippet of how you got it working on the emulator?
Based on other threads in this group, I'm inclined to think this is
not possible, mostly due to various networking limitations of the
emulator (http://groups.google.com/group/android-developers/
browse_thread/thread/77b45f357ff183d4/defa24b49242d44c?
hl=en&lnk=gst&q=jmdns#defa24b49242d44c). I would really like to see
some code using jmdns that can resolve a service running separately on
the development machine.

Cheers,
-jsi

On Dec 31 2009, 6:06 pm, SFSDCris  wrote:
> I'm attempting to useJmDNS(zeroconf / Bonjour) to resolve a local
> network hosts ip address.
>
> JmDNSsucceeds on the simulator, but fails on the phone.
> The phone is an HTC Magic (from the Google I/O conference)
>
> Both are running Android 1.5
>
> Any ideas?
-- 
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: Unable to figure out what WindowManagerservice and PhoneWindowManager difference

2010-01-06 Thread Guobin
Possibly separate Policy from Mechanism

WindowManagerService extends IWindowManager.Stub: System private
interface to the window manager.

WindowManagerPolicy interface: supplies all UI-specific behavior of
the window manager.  An instance of it is created by the window
manager when it starts up, and allows customization of window
layering, special window types, key dispatching, and layout.



On Jan 5, 9:29 pm, Kunal  wrote:
> Hi,
>
> The PhoneWindowManager  implements WindowManagerPolicy while the
> WindowManagerService also implements the WindowState of the
> WindowManagerPolicy
>
> Can somebody provide me with the inputs of how PhoneWindowManager and
> WindowManagerService be differentiated?
>
> Thanks,
> Kunal
-- 
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: Enable / Disable android widgets runtime.

2010-01-06 Thread Jurg
i am (also) having trouble enabling/disabling widgets at runtime.

as reported before you can enable/disable component with the
packagemanager. but for the widget the behaviour i see is not what i
expect.

the widget will be referenced in the widget menu on the home screen
when the widget is enabled by default. if you disable it by default
and enable it at runtime there is not change in the widget menu.

what do i have to do to 'force' this change to the widget menu?

groet,
jurg.
-- 
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: Nexus 2.1 one sale, WHERE is the SDK!

2010-01-06 Thread David Sauter
On Tue, Jan 5, 2010 at 3:12 PM, Dianne Hackborn  wrote:
> While I will not argue that we need to be better about getting SDKs out
> earlier, for developers the changes in 2.1 are really not that significant.

Does it raise the hard coded heap limit?

-- 
--
David Sauter
-- 
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 ES 2.0 on Eclair

2010-01-06 Thread r2d2Proton
I would like to bump this. . .

I was thinking the same thing - use the NDK to gain access to the 2.0
functions. I imagine that the OpenGL ES 2.0 functions are exposed in
Imagination Technologies shared object file.

Games should be considered an NDK level application. Wasn't anybody
watching Microsoft when they tried this? Remember Direct-Draw?


On Dec 28 2009, 11:10 am, rollbak  wrote:
> So, that means that with NDK i can? Can you explain this further
> please?
>
> Thanks,
>
> Lucas
>
> On Dec 28, 3:09 pm, Romain Guy  wrote:
>
>
>
> > Java apps cannot directly accessOpenGLES2.0 APIs at the moment.
>
> > On Thu, Dec 24, 2009 at 7:32 PM, Lawrencelee  
> > wrote:
> > > Eclair has supportedOpenGLES2.0. But I can not find related JNI
> > > wrapper forOpenGLESAPI. How a Java application useOpenGLES2.0
> > > functions?
>
> > > --
> > > 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
>
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to GIF image for a finate time

2010-01-06 Thread TonyDoc
Convert it to multiple png's & use androids animation manager.

On Jan 6, 5:31 am, RamaMohan  wrote:
> Hi all,
> I want to show  a loading Image of GIF type  for a finite time .how to
> do this.
> Please tell me the solution if anyone knows.
>
> Thanks,
> Ram
-- 
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] Geolocation in Browser works in 1.6 (Gears) but not 2.0 (HTML5/W3C) - Tested in emulator and real devices.

2010-01-06 Thread Ben Hedrington
I created this little Geolocation experiment site http://www.bctx.info/wx
it works great on my Android 1.6 (Magic, I/O Phone) it prompts the
user to share, returns lat, log and is snappy. 1.6 uses Gears for
this. I tried it on an up to date Droid and a 2.0 emulator image and
it detects the "navigator.geolocation" element (excellent!) and waits
for the user to share but no popup appears on the device and it cannot
proceed. Any thoughts?

The test site: http://www.bctx.info/wx

-Ben
-- 
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 an item form ListView

2010-01-06 Thread Manoj
Hi
I am using ListView with checkbox as items and want to access the
checkbox status.
Would anybody help me on this topic.


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