[android-developers] Re: what hardware platform do you use?

2010-07-10 Thread Al Sutton
Can I suggest calling an end to the thread? We're now way off topic
from what the OP wants, and most posts to it seem to end up as troll
food.

Al.

On Jul 11, 7:03 am, Dianne Hackborn  wrote:
> It is number of unique devices.  It wouldn't be a count of each connection.
>  That would be...  stupid.
>
> On Sat, Jul 10, 2010 at 10:47 PM, Indicator Veritatis 
> wrote:
>
>
>
>
>
> > So then does the dashboard count each MEID/IMEI connecting within the
> > given time period only once, regardless of how many times it connects
> > and reconnects to the Market? If not, then no, it is not "pretty much
> > the exact data they want", because it is skewed by how often devices
> > connect and disconnect, or by how many apps they download.
>
> > The vague language used on the dashboard, saying evasive-sounding
> > things like "relative number of access devices" and "based on the
> > number of Android devices that have accessed" do NOT answer this
> > question, they leave a LOT of room for doubt.
>
> > On Jul 9, 5:48 pm, Dianne Hackborn  wrote:
> > > On Fri, Jul 9, 2010 at 2:25 PM, Indicator Veritatis  > >wrote:
>
> > > > Why, even the figure Google likes to use, the source for my 45%  using
> > > > 1.5 or 1.6, is far from ideal: but it is almost certainly a better
> > > > measure of the number of phones out there with given version# than
> > > > downloads of even a wildly popular app.
>
> > > The Google numbers are based on the total count of all devices running
> > > Market...  which, for people publishing apps to Market, is pretty much
> > the
> > > exact data they want.
>
> > > --
> > > 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 > cr...@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: what hardware platform do you use?

2010-07-10 Thread Indicator Veritatis
Then we can certainly agree that the dashboard figures are a much
better measure of how many 1.5 and 1.6 devices are out there than the
downloads of any one popular app.

And yes, that other count would have been stupid; but I have seen even
more stupid things hidden under such vague language as "relative
number of access devices" and "based on the number of Android devices
that have accessed".

So if you agree that that would be stupid, then you should also agree
that such vague language is also stupid. Please see what you can do to
get it changed.

On Jul 10, 11:03 pm, Dianne Hackborn  wrote:
> It is number of unique devices.  It wouldn't be a count of each connection.
>  That would be...  stupid.
>
> On Sat, Jul 10, 2010 at 10:47 PM, Indicator Veritatis 
> wrote:
>
> > So then does the dashboard count each MEID/IMEI connecting within the
> > given time period only once, regardless of how many times it connects
> > and reconnects to the Market? If not, then no, it is not "pretty much
> > the exact data they want", because it is skewed by how often devices
> > connect and disconnect, or by how many apps they download.
>
> > The vague language used on the dashboard, saying evasive-sounding
> > things like "relative number of access devices" and "based on the
> > number of Android devices that have accessed" do NOT answer this
> > question, they leave a LOT of room for doubt.
>
> > On Jul 9, 5:48 pm, Dianne Hackborn  wrote:
> > > On Fri, Jul 9, 2010 at 2:25 PM, Indicator Veritatis  > >wrote:
>
> > > > Why, even the figure Google likes to use, the source for my 45%  using
> > > > 1.5 or 1.6, is far from ideal: but it is almost certainly a better
> > > > measure of the number of phones out there with given version# than
> > > > downloads of even a wildly popular app.
>
> > > The Google numbers are based on the total count of all devices running
> > > Market...  which, for people publishing apps to Market, is pretty much
> > the
> > > exact data they want.
>
> > > --
> > > 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
>
> --
> 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] Clearing Overlays

2010-07-10 Thread Brad Gies
I've had problems with this on occassion also...but just clearing the 
items from each Overlay achieves the same thing without problems.


myOverlay.items.clear();

If you have more than one Overlay, and want to clear them all, just loop 
through them and clear the items.





On 10/07/2010 9:19 PM, Michael wrote:

Hello,
I'm unable to clear my overlays without error. I run
mapView.getOverlays().clear() as I've seen but to no avail. Is there
any way I can effectively remove these markers? I think it will help
resolve a concurrentmodificationexception. Thanks!
Michael

   


--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.ihottonight.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problems with audio playback on froyo

2010-07-10 Thread cpedia
But the socket method still doesn't work.

If I need to inject cookie with this method. Anyone can give some
advice?

On Jul 7, 11:17 pm, Rich  wrote:
> Okay! Sorry I got all uppity.
>
> Here's the 
> solution:http://code.google.com/p/npr-android-app/source/diff?spec=svn77&r=77&;...
>
> Rich
>
> On Jul 7, 11:04 am, Rich  wrote:
>
> > I'm bumping this because a fundamental component of the Android system
> > is broken, there have been numerous reports and not a single person
> > from the Android dev team have spoken about this after weeks. Please
> > reply soon! There are hundreds of broken apps on the market.
>
> > R
>
> > On Jun 18, 4:45 pm, Rich  wrote:
>
> > > Same thing here - you're not the only one. The newMediaPlayeris
> > > absolute garbage, trying to decipher the error codes is like reading
> > > tea leaves (And they told us this was going to be 
> > > fixed:http://www.mail-archive.com/android-developers@googlegroups.com/msg20...
> > > - they just made it worse!) Further discussion here:
>
> > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > and
>
> > >http://forum.rhapsody.com/rhapsody/topics/app_force_closes_in_froyo_w...
>
> > > No proposed workarounds, not a peep from any Google employees.
>
> > > Very disappointing response so far. Fortunately 2.2 isn't deployed on
> > > any retail devices, but it sure sucks if you've only got a Nexus on
> > > 2.2
>
> > > Let me know if you come up with some solution,
> > > Rich
>
> > > On Jun 2, 5:29 pm, RC  wrote:
>
> > > > I'm having a problem withMediaPlayerplaying a stream. It goes along
> > > > fine and then I get the following.
>
> > > > I/AwesomePlayer(   59): prefetcher is done preparing
> > > > E/MediaPlayer( 6358): error (1, -2147483648)
> > > > E/MediaPlayer( 6358): Error (1,-2147483648)
> > > > W/TimedEventQueue(   59): Event 2 was not found in the queue, already
> > > > cancelled?
> > > > V/TuneWiki( 6358): Client closed connection!
> > > > V/TuneWiki( 6358): java.net.SocketException: Connection reset by peer
> > > > V/TuneWiki( 6358):     at
> > > > org.apache.harmony.luni.platform.OSNetworkSystem.writeSocketImpl(Native
> > > > Method)
>
> > > > This is only happening in the newFroYo(Android 2.2) release where
> > > > the media player was changed.
>
> > > > All streaming works up to Android 2.1, and with Android 2.2 we get
> > > > squelches, pops, and other bad noise and then the connection
> > > > terminates.
>
> > > > I have looked at one possibility being the change from HTTP/1.0 to
> > > > HTTP/1.1 requests. I'm not sure if Stagefright can be told to make
> > > > HTTP/1.0 connections but it appears to work for a couple seconds and
> > > > then everything falls apart and the media player quits.
>
> > > > Anyone have thoughts about what has changed and what might be needed
> > > > to work with the new media player properly?

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


[android-developers] Re: HELP

2010-07-10 Thread Indicator Veritatis
Really? Then what is http://source.android.com/source/using-eclipse.html
all about? It says "Platform development", and uses several other key
phrases that make it clear it is not just about building Android
applications.

In particular, it says, " if you are looking for information on how to
use Eclipse to develop applications that run on Android, this is not
the right page for you. "

On Jul 9, 11:11 pm, Al Sutton  wrote:
> You can't build the OS in eclipse unless you want to create a new
> build system, but you can create and build apps to run on Android in
> it.
>
> Al.
>
> On Jul 9, 11:28 pm, TreKing  wrote:
>
> > On Fri, Jul 9, 2010 at 4:34 PM, Mark  wrote:
> > > I know that part
>
> > I couldn't tell by your question, which I quote: "How do I get the code for
> > Android?"
>
> > > Can it be built in Eclipse?
>
> > Ah, see, that's quite a different question, isn't it? If that's what you
> > wanted to know, I think that's what you should have asked.
>
> > I haven't bothered to build the Android source, but I presume there are
> > instructions on the site to do so.
>
> > > I told you I am come from Microsoft. (I’ve been converted) now LOL
>
> > Welcome. In the Microsoft World, one must also do some Googling and read
> > instructions from time to time =)
>
> > --- 
> > --
> > TreKing - Chicago transit tracking app for Android-powered 
> > deviceshttp://sites.google.com/site/rezmobileapps/treking
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 get all the children views of a layout

2010-07-10 Thread Indicator Veritatis
Strictly speaking, you are correct, of course. But since the OP said
'"layout_width"', not 'layout_width', I assumed he was really thinking
about the actual numeric value the width takes, rather than the XML
attribute "layout_width". But I did not preserve this distinction in
my own writing, so I wrote the wrong thing. Not to mention it was a
dubious assumption to begin with, though it did make sense out of his
asking for it to be set programmatically, while in his sample XML he
was already setting it explicitly.

Of course the real XML attribute "layout_width" is set by the user and
used by the layout manager.

But this raises a natural question, one I am sure has occurred to many
others learning Android: what were they thinking when they named this
parameter "layout_width"? Doesn't the very name naturally suggest a
numeric value measuring the width, rather than rule for deriving that
value from elsewhere?

On Jul 9, 1:57 pm, Romain Guy  wrote:
> Setting layout_width is NOT the layout manager's job. It's set by the
> user to tell the layout manager how to compute the children's
> dimensions.
>
>
>
> On Fri, Jul 9, 2010 at 1:56 PM, Matt  wrote:
>
> > On Jul 9, 4:44 pm, Indicator Veritatis  wrote:
> >> Let's hope there is a better solution! After all, setting layout_width
> >> IS the layout manager's job.
>
> > Right... and the layout manager does set the width.  You can do many
> > things:
>
> > 1. Set the layout_width to "fill_parent" to always have it as wide as
> > the screen size.
> > 2. Create more than one layout, and put them in different directories
> > based on the screen attributes.
> >http://developer.android.com/guide/topics/resources/providing-resourc...
> > 3. Set the layout_width to a standard size, such as 100dip.  Not
> > recommended, honestly.
> > 4. Use RelativeLayout to set your views positions.
> > 5. There's plenty more ways to do it without programmatically setting
> > your layout widths, and without knowing exactly what you want to do I
> > think the above is good for now.
>
> > -Matt
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> 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


Re: [android-developers] Re: what hardware platform do you use?

2010-07-10 Thread Dianne Hackborn
It is number of unique devices.  It wouldn't be a count of each connection.
 That would be...  stupid.

On Sat, Jul 10, 2010 at 10:47 PM, Indicator Veritatis wrote:

> So then does the dashboard count each MEID/IMEI connecting within the
> given time period only once, regardless of how many times it connects
> and reconnects to the Market? If not, then no, it is not "pretty much
> the exact data they want", because it is skewed by how often devices
> connect and disconnect, or by how many apps they download.
>
> The vague language used on the dashboard, saying evasive-sounding
> things like "relative number of access devices" and "based on the
> number of Android devices that have accessed" do NOT answer this
> question, they leave a LOT of room for doubt.
>
> On Jul 9, 5:48 pm, Dianne Hackborn  wrote:
> > On Fri, Jul 9, 2010 at 2:25 PM, Indicator Veritatis  >wrote:
> >
> > > Why, even the figure Google likes to use, the source for my 45%  using
> > > 1.5 or 1.6, is far from ideal: but it is almost certainly a better
> > > measure of the number of phones out there with given version# than
> > > downloads of even a wildly popular app.
> >
> > The Google numbers are based on the total count of all devices running
> > Market...  which, for people publishing apps to Market, is pretty much
> the
> > exact data they want.
> >
> > --
> > 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
>



-- 
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: what hardware platform do you use?

2010-07-10 Thread Indicator Veritatis
So then does the dashboard count each MEID/IMEI connecting within the
given time period only once, regardless of how many times it connects
and reconnects to the Market? If not, then no, it is not "pretty much
the exact data they want", because it is skewed by how often devices
connect and disconnect, or by how many apps they download.

The vague language used on the dashboard, saying evasive-sounding
things like "relative number of access devices" and "based on the
number of Android devices that have accessed" do NOT answer this
question, they leave a LOT of room for doubt.

On Jul 9, 5:48 pm, Dianne Hackborn  wrote:
> On Fri, Jul 9, 2010 at 2:25 PM, Indicator Veritatis wrote:
>
> > Why, even the figure Google likes to use, the source for my 45%  using
> > 1.5 or 1.6, is far from ideal: but it is almost certainly a better
> > measure of the number of phones out there with given version# than
> > downloads of even a wildly popular app.
>
> The Google numbers are based on the total count of all devices running
> Market...  which, for people publishing apps to Market, is pretty much the
> exact data they want.
>
> --
> 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 define some smart layout?

2010-07-10 Thread Jeruliu
Matty's sample works, thanks.

On Jul 9, 11:14 pm, Matty  wrote:
> This simple layout seems to work for me:
>
> 
>          xmlns:android="http://schemas.android.com/apk/res/android";
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         android:orientation="vertical"
>         android:gravity="center">
>                          android:id="@+id/ListView01"
>                 android:layout_width="fill_parent"
>                 android:layout_height="fill_parent"
>                 android:layout_weight="1" />
>                          android:text="@+id/Button01"
>                 android:id="@+id/Button01"
>                 android:layout_width="wrap_content"
>                 android:layout_height="wrap_content" />
> 
>
> On Jul 9, 5:35 am, Jeruliu  wrote:
>
> > I will have a list view on the top and a button on the bottom in the
> > view.
>
> > Regardless the height of the list view i would like to fix the button
> > position on the bottom all the time.
>
> > If the list view is too long then make it scrollable.
>
> > How to do this? 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: How to access shared preference outside of Activity

2010-07-10 Thread Jeruliu
Thanks, you solved my problem, again.

On Jul 9, 7:40 pm, Mark Murphy  wrote:
> On Fri, Jul 9, 2010 at 5:03 AM, Jeruliu  wrote:
> > Thanks, actually i need to access the shared preference in a class
> > that extends from BroadcastReceiver, how can i call the context then?
>
> PreferenceManager.getDefaultSharedPreferences(), passing in the
> Context supplied to you in onReceive() of your BroadcastReceiver.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Smooth Image Rotation with Gesture Control?

2010-07-10 Thread ocdtrekkie
I might give a try at the OpenGL method, I actually took an OpenGL
class, it's just the mobile stuff I'm trying to grasp. ;)

Ansca, btw, looks very nice.  But as a college student doing this for
fun, and releasing for free, I can't afford a solution like that.  But
it looks pretty neat, definitely something I might keep in mind for
the future.  ;)

On Jul 7, 10:03 am, Absinthe  wrote:
> This would be really easy to implement using Ansca Corona 
> (http://www.anscamobile.com). We take care of all the OpenGL rendering as well
> as the multi-screen resolution issues. Can't help you with copyrights
> though.
>
> 
>
> --Eric
>
> On Jul 5, 8:49 pm, ocdtrekkie  wrote:
>
> > Ah crud, now I feel fairly stupid.  ;)  People responded and I didn't
> > see it and posted a seperate request.  I'm gonna upload the design
> > document for it, I've got the UI "designed", I just can't figure out
> > how to program it so it will behave right.  I've read a lot of
> > examples/tutorials/help things regarding image rotation, but I haven't
> > seen anything that's the same sort of thing, even though I would
> > imagine it's a fairly simple idea.
>
> >http://imgs.ocdtrekkie.com/MobileDHDConcept2.jpg
>
> > This is only a portion of the UI, but it's the one I need help with.
> > Basically I have a fancy circular image (it's a ring), and I want to
> > situate it about there on the screen, and then let people rotate it
> > with their finger.  (Only a certain portion of the ring will be
> > visible on screen at a time, as you can see).  Looking at the
> > different Layout formats though, I'm wondering if I have to go to
> > OpenGL for something like this, or if it can be done without it.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Clearing Overlays

2010-07-10 Thread Michael
Hello,
I'm unable to clear my overlays without error. I run
mapView.getOverlays().clear() as I've seen but to no avail. Is there
any way I can effectively remove these markers? I think it will help
resolve a concurrentmodificationexception. Thanks!
Michael

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


Re: [android-developers] Re: Possible to achieve using relative layout?

2010-07-10 Thread Connick
Thanks for the input. Actually that will do the trick as I'd like to keep an
area on the far right for a sync progress image anyway.


On Sat, Jul 10, 2010 at 9:14 PM, Streets Of Boston
wrote:

> Good luck with that one... i tried but no luck.
>
> If you think about it, it makes sense that this is not 'easy' to do
> with the standard controls (like the text view).
>
> The text-view knows about its parent (the rel. layout), not about its
> siblings (imageview).
> If you center the text-view in the parent, the largest extent of the
> text-view is the left-and right border of the parent. The text-view
> doesn't know about the imageview and where it exactly is and can not
> position itself or its text relative to the image-view borders.
>
> You can also specify instead that the text-view is right-aligned and
> is 'to-the-right-of' the imageview and the text inside the text-view
> is centered. However, that will put the text off-center, a bit too
> much to the right.
>
> I 'solved' it by putting an equal amount of empty space (an empty
> View) to the right of the text-view:
>  imageview: left aligned, with specific width.
>  textview: right-of imageview, left-of emptyview. Text is centered.
>  emptyview: right aligned, with same width as imageview.
> This solution is not perfect, since the text will never go all the way
> to the right. But then, again, this does make some sense, since the
> text doesn't go all the way to the left either. If the text would
> extend all the way to the right and not all the way to the left, the
> text would appear off-center.
>
>
> On Jul 10, 5:29 pm, Connick  wrote:
> > I have a relative layout with an imageview aligned to parent left and a
> > textview centered horizontally/vertically in the parent. Is there a way I
> > can indicate that the textview should not overlap the imageview should
> the
> > text be long enough to fill the parent?
> >
> > Cheers,
> > Stace
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Importing existing projects to Android

2010-07-10 Thread kypriakos

So I generated a new project, and of course the R.java is in place as
expected, imported the
src dirs from the other project into the src dir of this one, checked
all of them and no errors
are displayed, but still when I run the app (without the Activity
class calling any of these
imported classes) it keeps complaining about the project having
errors. Neither the IDE or
the Android SDK display any errors so this is a bit strange. The
manifest file looks good,
and so do the other system files (default.properties etc.).
It seems to me that may be the libraries I am importing through the
source classes
I imported are not accepted by the SDK - for example the axis libs,
which seem to
help the classes that import them not to display any compile errors,
may not be digested
nicely by the Android SDK - would that be the problem?

On Jul 8, 5:03 pm, Robert Craig  wrote:
> Just try save the project again. It seems to be the case that those files
> get generated when it builds. A save in eclipse builds the package.On Thu, 
> Jul 8, 2010 at 3:42 PM, kypriakos  wrote:
>
> > It seems that the gen dir is empty and that no generated java classes
> > are not being generated (no R.java etc.). I am assuming the Clean
> > Project
> > removed them (??). How can they be regenerated?
>
> > Thanks again
>
> > On Jul 8, 3:37 pm, kypriakos  wrote:
> > > Never mind - I needed to manually clean up the build path file as well
> > > to
> > > match the fact that the lib didn't have those files anymore. So now I
> > > can
> > > compile the project with no errors either visible (with x next to the
> > > dir or
> > > any file in the project tree) or in the Error Log that Eclipse
> > > provides.
> > > However, still the plug in will complain when I try to run it with the
> > > same
> > > error msg 'The project contains errors ' ... makes no sense.
>
> > > On Jul 8, 3:18 pm, kypriakos  wrote:
>
> > > > David - thanks very much for the detailed and very informative
> > > > response. I appreciate it.
> > > > I looked into the Error Log of the IDE and I did see that certain
> > > > libraries (external libraries
> > > > that I needed to reference through my code, such as BouncyCastle etc.)
> > > > had also a txt
> > > > file with them that the Android plug in didn't like. By removing them
> > > > I was able to remove
> > > > those errors. However, what's interesting now is that after I also did
> > > > a Clean on the pioject,
> > > > all of the bin classes I had in the bin directory are not being
> > > > regenerated. I checked the IDE's
> > > > configuration and it does has the project to build automatically. I
> > > > can see the workspace
> > > > build progress flash at the bottom bar but no classes (even after
> > > > refreshing the view) generated
> > > > in the bin. This makes no sense unless those txt files are necessary
> > > > for using their corresponding
> > > > libs:
> > > > (1) if that is the case, where could I include those txt licenses in
> > > > the case of Android
> > > > (2) if not then what would cause the classes that about 10 mins were
> > > > generating output binaries
> > > > to do it now as we.
>
> > > > Thanks aga
>
> > > > On Jul 7, 7:03 am, "Bagatelle: David Lee Evans" 
> > > > wrote:
>
> > > > > On Jul 7, 1:07 am, Demetris  wrote:
>
> > > > > > Hi all,
>
> > > > > > I generated a standard Android under Eclipse (using the plugin) and
> > I
> > > > > > imported code from an existing project (J2SE-based). I was able to
> > > > > > iron out all the complaints from the Android SDK 2.1 (compile
> > errors).
> > > > > > However, the runtime (emulator startup) the IDE displays a message
> > > > > > saying that the project contains errors, please fix them before
> > running
> > > > > > it. But all that there is there are warnings - is Android
> > "unforgiving"
> > > > > > about Java warnings or is there something else I should be looking
> > into
> > > > > > in there - no class has any compile errors.
>
> > > > > > Thanks
>
> > > > > Without seeing the exact Eclipse error output, I am assuming the
> > > > > following.
> > > > > When you view your project in the package explorer window, your
> > > > > project has
> > > > >     an error X icon next to it, but looking at the project tree
> > > > > structure there is no offending
> > > > >     error X icon next to any other directory. So I going to suggest a
> > > > > shotgun approach
> > > > >     to fix your problem, probably all you have tried.
>
> > > > >     1)The always first move that I always do is clean the project,
> > > > > sometimes the Eclipse ADT gets a little confuse about the state of
> > the
> > > > > project.
>
> > > > >     2) Since you imported the project from another source project,
> > > > > check the AndroidManifest.xml file for incompatibility problems
> > > > >        makes sure is the attribute tag android:minSdkVersion if
> > > > > defined is appropriate for the project.
>
> > > > >     3) Then there is the hidden .project file that ant uses to bui

[android-developers] How should I do this?

2010-07-10 Thread Sean Chitwood
Hi--
    I'm trying to write a simple podcast application that allows a
show to have a branded application that people can use to listen to
the show, read show notes and even call a phone number if the show has
a voice mail box.
    Most everything is going great, I made some mistakes (like
implementing everything as asynctasks) and learned from them. I
re-implemented a majority of the background processing as a couple of
services.
    The problem I am currently faced with is that I have a
DownloadShowsService that downloads the MP3 and a PDF file and inserts
the MP3 into the contentstore. I want the Activity that starts the
service to update when the service is finished downloading the file.
   Currently I have this code:

Intent i = new Intent();
i.setAction(Intent.ACTION_RUN);
i.setClass(ShowDetail.this, DownloadShowsService.class);



i.putExtra(Constants.TITLE_FIELD, mShow.getTitle());
i.putExtra(Constants.ENCLOSURE_FIELD, mShow.getMp3Path());
i.putExtra(Constants.NOTES_URL, mShow.getPdfPath());
i.putExtra(BaseColumns._ID, mShow.getId());

bindService(i, mConnection, Context.BIND_AUTO_CREATE);
startService(i);
/* Make sure dssShow has been assigned to when we bind to it */
if(dssShow != null)

        {

            dssShow.addListener(new PropertyChangeListener(){

          public void propertyChange(PropertyChangeEvent event) {

            if(event.getPropertyName() == "finished" &&
(Boolean)event.getOldValue() == true)
        {
       ShowDetail.this.readShowData();
}

          }
         });

 }



The dssShow is always null immediately after the service starts.

So I am running against the limits of my knowledge of Android and
decided to ask for some help.

Does anyone have any suggestions?

Would seeing more code help?


I have to admit to being a bit confused by the whole SOA thing.

--Sean

Calendar: http://www.google.com/calendar/embed?src=darkmane%40gmail.com
Livejournal: http://darkmane.livejournal.com

Every 5 minutes you spend writing code in a new language is more
useful than 5 hours reading blog posts about how great the language
is.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Importing existing projects to Android

2010-07-10 Thread kypriakos

RIght but that didn't do it Craig. It does build the files I have
imported
successfully but the R class does not get generated. I have a feeling
a hidden issue somewhere (even though the Error Log does not show
anything in Eclipse) is preventing this generation. I may try to
create
a new empty project and import these classes over again.

On Jul 8, 5:03 pm, Robert Craig  wrote:
> Just try save the project again. It seems to be the case that those files
> get generated when it builds. A save in eclipse builds the package.On Thu, 
> Jul 8, 2010 at 3:42 PM, kypriakos  wrote:
>
> > It seems that the gen dir is empty and that no generated java classes
> > are not being generated (no R.java etc.). I am assuming the Clean
> > Project
> > removed them (??). How can they be regenerated?
>
> > Thanks again
>
> > On Jul 8, 3:37 pm, kypriakos  wrote:
> > > Never mind - I needed to manually clean up the build path file as well
> > > to
> > > match the fact that the lib didn't have those files anymore. So now I
> > > can
> > > compile the project with no errors either visible (with x next to the
> > > dir or
> > > any file in the project tree) or in the Error Log that Eclipse
> > > provides.
> > > However, still the plug in will complain when I try to run it with the
> > > same
> > > error msg 'The project contains errors ' ... makes no sense.
>
> > > On Jul 8, 3:18 pm, kypriakos  wrote:
>
> > > > David - thanks very much for the detailed and very informative
> > > > response. I appreciate it.
> > > > I looked into the Error Log of the IDE and I did see that certain
> > > > libraries (external libraries
> > > > that I needed to reference through my code, such as BouncyCastle etc.)
> > > > had also a txt
> > > > file with them that the Android plug in didn't like. By removing them
> > > > I was able to remove
> > > > those errors. However, what's interesting now is that after I also did
> > > > a Clean on the pioject,
> > > > all of the bin classes I had in the bin directory are not being
> > > > regenerated. I checked the IDE's
> > > > configuration and it does has the project to build automatically. I
> > > > can see the workspace
> > > > build progress flash at the bottom bar but no classes (even after
> > > > refreshing the view) generated
> > > > in the bin. This makes no sense unless those txt files are necessary
> > > > for using their corresponding
> > > > libs:
> > > > (1) if that is the case, where could I include those txt licenses in
> > > > the case of Android
> > > > (2) if not then what would cause the classes that about 10 mins were
> > > > generating output binaries
> > > > to do it now as we.
>
> > > > Thanks aga
>
> > > > On Jul 7, 7:03 am, "Bagatelle: David Lee Evans" 
> > > > wrote:
>
> > > > > On Jul 7, 1:07 am, Demetris  wrote:
>
> > > > > > Hi all,
>
> > > > > > I generated a standard Android under Eclipse (using the plugin) and
> > I
> > > > > > imported code from an existing project (J2SE-based). I was able to
> > > > > > iron out all the complaints from the Android SDK 2.1 (compile
> > errors).
> > > > > > However, the runtime (emulator startup) the IDE displays a message
> > > > > > saying that the project contains errors, please fix them before
> > running
> > > > > > it. But all that there is there are warnings - is Android
> > "unforgiving"
> > > > > > about Java warnings or is there something else I should be looking
> > into
> > > > > > in there - no class has any compile errors.
>
> > > > > > Thanks
>
> > > > > Without seeing the exact Eclipse error output, I am assuming the
> > > > > following.
> > > > > When you view your project in the package explorer window, your
> > > > > project has
> > > > >     an error X icon next to it, but looking at the project tree
> > > > > structure there is no offending
> > > > >     error X icon next to any other directory. So I going to suggest a
> > > > > shotgun approach
> > > > >     to fix your problem, probably all you have tried.
>
> > > > >     1)The always first move that I always do is clean the project,
> > > > > sometimes the Eclipse ADT gets a little confuse about the state of
> > the
> > > > > project.
>
> > > > >     2) Since you imported the project from another source project,
> > > > > check the AndroidManifest.xml file for incompatibility problems
> > > > >        makes sure is the attribute tag android:minSdkVersion if
> > > > > defined is appropriate for the project.
>
> > > > >     3) Then there is the hidden .project file that ant uses to build
> > > > > the project, make sure that file exist because if it does not,
> > > > >        it will give you the exact same symptoms that you have
> > > > > describe. It should have been create for you by the Eclipse IDE when
> > > > >        you created an Android project.
>
> > > > >      And about Android warnings, my projects have a lot of them ;-)
> > > > > but this has never caused the emulator to start up, so unless
> > > > >      you have some special flag set that I have never h

Re: [android-developers] Re: Killi Process with files on SD card

2010-07-10 Thread Mark Murphy
Where is this CursorUtils class that you are using? I don't see it in
the SDK or source code.

Thanks!

On Sat, Jul 10, 2010 at 9:23 PM, Streets Of Boston
 wrote:
> Register your broadcast receiver like this:
>
> IntentFilter intentFilter = new
> IntentFilter(Intent.ACTION_MEDIA_EJECT);
> intentFilter.addAction(Intent.ACTION_MEDIA_MOUNTED);
> intentFilter.addDataScheme("file");
> intentFilter.addDataAuthority("*", null);
> intentFilter.addDataPath((mIsExternal
>                           ?CursorUtils.EXTERNAL_STORAGE_ROOT
>                           :CursorUtils.PHONE_STORAGE_ROOT).getAbsolutePath(),
> PatternMatcher.PATTERN_LITERAL);
> context.registerReceiver(this, intentFilter);
>
> Then close all your files when you get an ACTION_MEDIA_EJECT
> and re-open them (if necessary) on ACTION_MEDIA_MOUNTED.
> (in the 'public void onReceive(Context context, Intent intent)' method
> of this broadcast receiver).
>
> (EXTERNAL_STORAGE_ROOT is the standard value for external-storage
> (usually "/sdcard") and PHONE_STORAGE_ROOT is "/emmc" (for HTC
> Incredible and such phones)).
>
> I'm not sure if this is the 'official' way of doing it, but it works
> for me. :)

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


[android-developers] Re: Killi Process with files on SD card

2010-07-10 Thread Streets Of Boston
Register your broadcast receiver like this:

IntentFilter intentFilter = new
IntentFilter(Intent.ACTION_MEDIA_EJECT);
intentFilter.addAction(Intent.ACTION_MEDIA_MOUNTED);
intentFilter.addDataScheme("file");
intentFilter.addDataAuthority("*", null);
intentFilter.addDataPath((mIsExternal
   ?CursorUtils.EXTERNAL_STORAGE_ROOT
   :CursorUtils.PHONE_STORAGE_ROOT).getAbsolutePath(),
PatternMatcher.PATTERN_LITERAL);
context.registerReceiver(this, intentFilter);

Then close all your files when you get an ACTION_MEDIA_EJECT
and re-open them (if necessary) on ACTION_MEDIA_MOUNTED.
(in the 'public void onReceive(Context context, Intent intent)' method
of this broadcast receiver).

(EXTERNAL_STORAGE_ROOT is the standard value for external-storage
(usually "/sdcard") and PHONE_STORAGE_ROOT is "/emmc" (for HTC
Incredible and such phones)).

I'm not sure if this is the 'official' way of doing it, but it works
for me. :)

On Jul 10, 3:50 pm, ls02  wrote:
> I register for this broadcast. However the process is killed before I
> receive any broadcast event.
>
> On Jul 10, 2:59 pm, Dianne Hackborn  wrote:
>
>
>
> > There is a broadcast sent when the SD card is being unmounted (sorry I don't
> > remember the name off-hand).  You should close all your files at that point.
> >  If you don't, the platform needs to kill the process because Linux can't
> > unmount the file system while any files remain open on it.
>
> > On Sat, Jul 10, 2010 at 10:35 AM, ls02  wrote:
> > > I found that Android kills my app process that has files open on SD
> > > card when the card is mounted when the device connects to a computer.
> > > It is done without any notification, I see in the log something like
> > > KillProcessWithFilesOpenedOnCard message, my app receives no
> > > notification, has no chance to gracefully shutdown. Moreover Android
> > > restarts my app immediately after killing it with latest Activity not
> > > the default activity launched in default standard mode. It does it
> > > while the card is still mounted and device is still connected to a
> > > computer.
>
> > > Can someone explain this all to me, how it I supposed to work, and if
> > > there is any way to alter this weird rude behavior? Particularly, if
> > > there is way to get any notification before the process is killed by
> > > the OS and to prevent relaunching it while the card is still mounted?
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Re: SDK 1.6 installation problem with "Install_parse_failed_no_ceritifcates"

2010-07-10 Thread eric
I've experienced this before.

Try renaming one of your drawables and rebuild the apk.  That worked
for me.


On Jul 7, 2:46 pm, androidshare  wrote:
> Hi, All,
>
> Our application package can install on devices and emulator with SDK
> 2.0.1, but fail to install on devices and emulator with SDK 1.6. The
> error messages is " Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]",
>
> Does anybody known what cases this problem?
>
> thanks,
>
> Bruce.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Possible to achieve using relative layout?

2010-07-10 Thread Streets Of Boston
Good luck with that one... i tried but no luck.

If you think about it, it makes sense that this is not 'easy' to do
with the standard controls (like the text view).

The text-view knows about its parent (the rel. layout), not about its
siblings (imageview).
If you center the text-view in the parent, the largest extent of the
text-view is the left-and right border of the parent. The text-view
doesn't know about the imageview and where it exactly is and can not
position itself or its text relative to the image-view borders.

You can also specify instead that the text-view is right-aligned and
is 'to-the-right-of' the imageview and the text inside the text-view
is centered. However, that will put the text off-center, a bit too
much to the right.

I 'solved' it by putting an equal amount of empty space (an empty
View) to the right of the text-view:
  imageview: left aligned, with specific width.
  textview: right-of imageview, left-of emptyview. Text is centered.
  emptyview: right aligned, with same width as imageview.
This solution is not perfect, since the text will never go all the way
to the right. But then, again, this does make some sense, since the
text doesn't go all the way to the left either. If the text would
extend all the way to the right and not all the way to the left, the
text would appear off-center.


On Jul 10, 5:29 pm, Connick  wrote:
> I have a relative layout with an imageview aligned to parent left and a
> textview centered horizontally/vertically in the parent. Is there a way I
> can indicate that the textview should not overlap the imageview should the
> text be long enough to fill the parent?
>
> Cheers,
> Stace

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Resolving activities

2010-07-10 Thread CMWiii
"name" was just chosen for the psuedo code.  It is a component name of
the form" packagename/classname",
hence the unflatten.

On Jul 10, 5:24 pm, Dianne Hackborn  wrote:
> What is "Name"?
>
> ComponentName has a constructor that takes a package name and class name; in
> the activity info these are .packageName and .name.
>
>
>
> On Sat, Jul 10, 2010 at 3:52 PM, CMWiii  wrote:
> > Same result:
>
> >  used:
> > myIntent.setComponent(ComponentName.unflattenFromString(Name));
>
> > On Jul 10, 3:38 pm, Mark Murphy  wrote:
> > > Try setComponent() instead of setPackage().
>
> > > On Sat, Jul 10, 2010 at 6:28 PM, CMWiii  wrote:
>
> > > > In a test app I pass an intent to resolveActivity to find out what is
> > > > the
> > > > best fit for the intent.
>
> > > > For example:
>
> > > >   Intent myIntent = new Intent();
>
> > > >   myIntent.setPackage(PackageName);
> > > >   myIntent.addCategory(Intent.CATEGORY_LAUNCHER);
> > > >   myIntent.setAction(Intent.ACTION_MAIN);
>
> > > >   PackageManager manager = getPackageManager();
>
> > > >   ResolveInfo ri = manager.resolveActivity(exceptionIntent,0);
>
> > > >   if (ri != null) {
> > > >         Intent newIntent = new Intent();
>
> > > >         newIntent.setClassName(PackageName,
> > > > ri.activityInfo.applicationInfo.className);
> > > >         newIntent.setFlags(ri.activityInfo.flags);
>
> > > >         startActivity(newIntent);
> > > >      }
>
> > > > The result of all this is an error:
> > > > "android.content.ActivityNotFoundException: Unable to find explicit
> > > > activity
> > > >                                               class ..."
>
> > > > Any suggestions or thoughts on why I am getting back an activity that
> > > > then can't be
> > > > found by startActivity?
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com|
> >http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
> > > Available!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> 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] Re: Resolving activities

2010-07-10 Thread Dianne Hackborn
What is "Name"?

ComponentName has a constructor that takes a package name and class name; in
the activity info these are .packageName and .name.

On Sat, Jul 10, 2010 at 3:52 PM, CMWiii  wrote:

> Same result:
>
>  used:
> myIntent.setComponent(ComponentName.unflattenFromString(Name));
>
>
> On Jul 10, 3:38 pm, Mark Murphy  wrote:
> > Try setComponent() instead of setPackage().
> >
> >
> >
> > On Sat, Jul 10, 2010 at 6:28 PM, CMWiii  wrote:
> >
> > > In a test app I pass an intent to resolveActivity to find out what is
> > > the
> > > best fit for the intent.
> >
> > > For example:
> >
> > >   Intent myIntent = new Intent();
> >
> > >   myIntent.setPackage(PackageName);
> > >   myIntent.addCategory(Intent.CATEGORY_LAUNCHER);
> > >   myIntent.setAction(Intent.ACTION_MAIN);
> >
> > >   PackageManager manager = getPackageManager();
> >
> > >   ResolveInfo ri = manager.resolveActivity(exceptionIntent,0);
> >
> > >   if (ri != null) {
> > > Intent newIntent = new Intent();
> >
> > > newIntent.setClassName(PackageName,
> > > ri.activityInfo.applicationInfo.className);
> > > newIntent.setFlags(ri.activityInfo.flags);
> >
> > > startActivity(newIntent);
> > >  }
> >
> > > The result of all this is an error:
> > > "android.content.ActivityNotFoundException: Unable to find explicit
> > > activity
> > >   class ..."
> >
> > > Any suggestions or thoughts on why I am getting back an activity that
> > > then can't be
> > > found by startActivity?
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com|
> http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
> >
> > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
> > Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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: Resolving activities

2010-07-10 Thread CMWiii
The line:

ResolveInfo ri = manager.resolveActivity(exceptionIntent,0);

should read:

ResolveInfo ri = manager.resolveActivity(myIntent,0);

On Jul 10, 3:28 pm, CMWiii  wrote:
> In a test app I pass an intent to resolveActivity to find out what is
> the
> best fit for the intent.
>
> For example:
>
>    Intent myIntent = new Intent();
>
>    myIntent.setPackage(PackageName);
>    myIntent.addCategory(Intent.CATEGORY_LAUNCHER);
>    myIntent.setAction(Intent.ACTION_MAIN);
>
>    PackageManager manager = getPackageManager();
>
>    ResolveInfo ri = manager.resolveActivity(exceptionIntent,0);
>
>    if (ri != null) {
>          Intent newIntent = new Intent();
>
>          newIntent.setClassName(PackageName,
> ri.activityInfo.applicationInfo.className);
>          newIntent.setFlags(ri.activityInfo.flags);
>
>          startActivity(newIntent);
>       }
>
> The result of all this is an error:
> "android.content.ActivityNotFoundException: Unable to find explicit
> activity
>                                                class ..."
>
> Any suggestions or thoughts on why I am getting back an activity that
> then can't be
> found by startActivity?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Resolving activities

2010-07-10 Thread CMWiii
Same result:

 used:
myIntent.setComponent(ComponentName.unflattenFromString(Name));


On Jul 10, 3:38 pm, Mark Murphy  wrote:
> Try setComponent() instead of setPackage().
>
>
>
> On Sat, Jul 10, 2010 at 6:28 PM, CMWiii  wrote:
>
> > In a test app I pass an intent to resolveActivity to find out what is
> > the
> > best fit for the intent.
>
> > For example:
>
> >   Intent myIntent = new Intent();
>
> >   myIntent.setPackage(PackageName);
> >   myIntent.addCategory(Intent.CATEGORY_LAUNCHER);
> >   myIntent.setAction(Intent.ACTION_MAIN);
>
> >   PackageManager manager = getPackageManager();
>
> >   ResolveInfo ri = manager.resolveActivity(exceptionIntent,0);
>
> >   if (ri != null) {
> >         Intent newIntent = new Intent();
>
> >         newIntent.setClassName(PackageName,
> > ri.activityInfo.applicationInfo.className);
> >         newIntent.setFlags(ri.activityInfo.flags);
>
> >         startActivity(newIntent);
> >      }
>
> > The result of all this is an error:
> > "android.content.ActivityNotFoundException: Unable to find explicit
> > activity
> >                                               class ..."
>
> > Any suggestions or thoughts on why I am getting back an activity that
> > then can't be
> > found by startActivity?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
> Available!

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


[android-developers] canvas.addArc problem

2010-07-10 Thread Ricardo
Hi

why the Path addArc don´t work like canvas.drawArc?

This code works well:

canvas.drawArc(rect, startAngle, sweepAngle, true, paint);

But this code don´t fill the ARC like the previous one.

Path path = new Path();
path.addArc(rect, startAngle, sweepAngle);
canvas.drawPath(path, paint);

The boolean "useCenter" parameter in the canvas.drawArc does the
magic. If you use usecenter=false it works like the Path version...
How can I use the canvas.drawPath with this usecenter=true logic?

thank you

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


Re: [android-developers] Resolving activities

2010-07-10 Thread Mark Murphy
Try setComponent() instead of setPackage().

On Sat, Jul 10, 2010 at 6:28 PM, CMWiii  wrote:
>
> In a test app I pass an intent to resolveActivity to find out what is
> the
> best fit for the intent.
>
> For example:
>
>   Intent myIntent = new Intent();
>
>   myIntent.setPackage(PackageName);
>   myIntent.addCategory(Intent.CATEGORY_LAUNCHER);
>   myIntent.setAction(Intent.ACTION_MAIN);
>
>   PackageManager manager = getPackageManager();
>
>   ResolveInfo ri = manager.resolveActivity(exceptionIntent,0);
>
>   if (ri != null) {
>         Intent newIntent = new Intent();
>
>         newIntent.setClassName(PackageName,
> ri.activityInfo.applicationInfo.className);
>         newIntent.setFlags(ri.activityInfo.flags);
>
>         startActivity(newIntent);
>      }
>
> The result of all this is an error:
> "android.content.ActivityNotFoundException: Unable to find explicit
> activity
>                                               class ..."
>
> Any suggestions or thoughts on why I am getting back an activity that
> then can't be
> found by startActivity?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


[android-developers] Resolving activities

2010-07-10 Thread CMWiii

In a test app I pass an intent to resolveActivity to find out what is
the
best fit for the intent.

For example:

   Intent myIntent = new Intent();

   myIntent.setPackage(PackageName);
   myIntent.addCategory(Intent.CATEGORY_LAUNCHER);
   myIntent.setAction(Intent.ACTION_MAIN);

   PackageManager manager = getPackageManager();

   ResolveInfo ri = manager.resolveActivity(exceptionIntent,0);

   if (ri != null) {
 Intent newIntent = new Intent();

 newIntent.setClassName(PackageName,
ri.activityInfo.applicationInfo.className);
 newIntent.setFlags(ri.activityInfo.flags);

 startActivity(newIntent);
  }

The result of all this is an error:
"android.content.ActivityNotFoundException: Unable to find explicit
activity
   class ..."

Any suggestions or thoughts on why I am getting back an activity that
then can't be
found by startActivity?

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


[android-developers] Re: Problem with Intents (I think)

2010-07-10 Thread CMWiii
Sorry for the delay in getting back to this but I found the problem
after revisiting the
code a few days later.  It actually worked correctly but two of the
applications (2 of 10)
I was testing against had a problem.  What they were doing was
actually starting another
instance of themselves which gave the appearance that my app was
hanging.  I was
able to verify this behavior outside of my testing.  Both products
came from the Market
and both agreed there was an issue.

Sorry for the time waster.

On Jul 8, 2:28 pm, TreKing  wrote:
> On Fri, Jul 2, 2010 at 11:45 PM, CMWiii  wrote:
> > It is always the same applications that prevent me from using ActA again.
>
> Specifying which apps would probably help.
>
> How are you launching ActA?
>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

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


Re: [android-developers] How to manage an event by 2 widgets

2010-07-10 Thread Mark Murphy
On Sat, Jul 10, 2010 at 5:22 PM, Sebastián Treu
 wrote:
>> Then clone the Gallery class in your project and make your changes there.
>
> I thought on that, but my 'clone' will be on my package and there's
> some protected variables that they don't have (or I can't find them)
> the proper getters and setters.

Odds are those will be on AbsSpinner, which you may have to clone as
well. If you would need to clone more than those two, then I'd
consider another direction.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


[android-developers] Possible to achieve using relative layout?

2010-07-10 Thread Connick
I have a relative layout with an imageview aligned to parent left and a
textview centered horizontally/vertically in the parent. Is there a way I
can indicate that the textview should not overlap the imageview should the
text be long enough to fill the parent?

Cheers,
Stace

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

Re: [android-developers] How to manage an event by 2 widgets

2010-07-10 Thread Sebastián Treu
Hi Mark, thanks for the reply.

>> If I modify the source code of Gallery.java I
>> can manage the fill of the Gallery for the specific items I want (i
>> already read the source code).
>
> Then clone the Gallery class in your project and make your changes there.


I thought on that, but my 'clone' will be on my package and there's
some protected variables that they don't have (or I can't find them)
the proper getters and setters.

Regards,
-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

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


Re: [android-developers] How to manage an event by 2 widgets

2010-07-10 Thread Mark Murphy
On Sat, Jul 10, 2010 at 4:22 PM, Sebastián Treu
 wrote:
> 1) How can I compile the modified API to generete a MyGallery.class to
> be added to android.jar?

You can't, short of building your own firmware.

> If I modify the source code of Gallery.java I
> can manage the fill of the Gallery for the specific items I want (i
> already read the source code).

Then clone the Gallery class in your project and make your changes there.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


[android-developers] How to manage an event by 2 widgets

2010-07-10 Thread Sebastián Treu
Hi all,

I want to change how a gallery looks like. I want to add 2 jogs at
each side, so looks like this:

http://omploader.org/vNHc2Yw/device.png

First approach was to add the "jogs" to the ImageAdapter (at the
beginning and at the end) for the Gallery. The Gallery will show the
items as usual, but It will apply the custom background, and also if
you specify spacing, you will get an ugly gallery. Also, I want the
jog not to be centered as the others images.

Then, I decided to download the whole api, and modify the Gallery
source in a way so to handle specially the first item and the last
item of the adapter. But, I don't know how to compile the api alone.
The Makefile in the root project will build 6gb of the whole android
platform. If someone can explain me how to build just the API, I will
be grateful.

The other approach was to compose Views. I thought to add ImageView's
to the left and right corner and to be scrolled when needed, but when
the Gallery capture the events I can't forward it to the holder of the
ImageViews. So, I extend Gallery, and I override onScroll() like this:

super.onScroll(e1,e2,distanceX,distanceY);
return false;

and also onTouchEvent() like this:

super.onTouchEvent(event);
return false;

but unfortunately when I return false wihtin onTouchEvent() the
Gallery does not scroll.

So, main questions are:

1) How can I compile the modified API to generete a MyGallery.class to
be added to android.jar? If I modify the source code of Gallery.java I
can manage the fill of the Gallery for the specific items I want (i
already read the source code).

2) In other approach, Is it posible to handle one event by 2 widgets?
If so, I could overlap the Gallery above a jog. The Gallery will
scroll as he knows, and I will scroll as I want.

3) If those approachs are bad, what will you recommend ?

PS: I don't get why the Gallery does not have this nice feature I want
to implement, kind of: setBorders(left, right) and etc. The problem on
extending Gallery, is that when you add a View (for instance, the
"jog"), you specify a position. Gallery fills the gallery getting the
Views of it container with: getChildAt(0) and getChildAt(numChildren
-1) when filling to right and left, respectively. Then, it gathers the
'unseen' Views from the Adapter. So the added view (the 'jog') will be
scrolled by Gallery, but when the view is no longer visible, the
Gallery itself has no way to get back that view, as it's not in the
Adapter.

Thanks in advance,
Best regards,
-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Killi Process with files on SD card

2010-07-10 Thread ls02
I register for this broadcast. However the process is killed before I
receive any broadcast event.

On Jul 10, 2:59 pm, Dianne Hackborn  wrote:
> There is a broadcast sent when the SD card is being unmounted (sorry I don't
> remember the name off-hand).  You should close all your files at that point.
>  If you don't, the platform needs to kill the process because Linux can't
> unmount the file system while any files remain open on it.
>
>
>
> On Sat, Jul 10, 2010 at 10:35 AM, ls02  wrote:
> > I found that Android kills my app process that has files open on SD
> > card when the card is mounted when the device connects to a computer.
> > It is done without any notification, I see in the log something like
> > KillProcessWithFilesOpenedOnCard message, my app receives no
> > notification, has no chance to gracefully shutdown. Moreover Android
> > restarts my app immediately after killing it with latest Activity not
> > the default activity launched in default standard mode. It does it
> > while the card is still mounted and device is still connected to a
> > computer.
>
> > Can someone explain this all to me, how it I supposed to work, and if
> > there is any way to alter this weird rude behavior? Particularly, if
> > there is way to get any notification before the process is killed by
> > the OS and to prevent relaunching it while the card is still mounted?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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] How can I find unneeded permission?

2010-07-10 Thread deg
I am doing radical surgery on a large existing Android app, creating a
much smaller app from just part of it.

The existing app requests many permissions that I no longer need. I
have removed the obvious ones, but I very likely have removed too many
or too few.

Is there any static way to determine what permissions an app needs?

(I know that I can remove all permissions and then repeatedly test
each code path, reinstating each missing permission that causes the
app to malfunction. But, surely, there is a better way!)

David

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Preload NinePatchs

2010-07-10 Thread Gyscos
Thanks for the answer ! :)

I didn't see how I could tell the Resource to first load the resource
in memory, and then create the drawables objects from it, without
creating myself the Bitmap / NinePatch objects...

If you're referring to the 'getDrawable' command, does this mean I
should use this for every button in the application, and hope that it
will only be slow for the first time ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Google Maps API in a Live Wallpaper

2010-07-10 Thread Hayden
Thanks for the info! Hmmm, static might work, though the image sizes
are limited to 640x640. From looking at some of the Google API terms,
using static maps or javascript does not allow for commercial use,
though the Google Maps API for Android does.  So, it appears I need to
figure out how to use the Android Google Maps API or find another map
provider :/

On Jul 10, 2:12 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> Have you considered using the Maps v3 JavaScript API (in a webview)?
> Would that work with a live wallpaper? There's a static map API with
> that as well. I believe the terms of the Google Maps API - v3 allow
> such a use, as long as you have it available free in the market that
> is.
>
> -John Coryat

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


Re: [android-developers] Re: Run app in full resolution?

2010-07-10 Thread Dianne Hackborn
For what it's worth, I think if you use the Eclipse IDE it has a nice GUI
for editing the manifest file.

On Sat, Jul 10, 2010 at 12:04 PM, Deren  wrote:

> Thanks, I had the targetsdkversion, but I tried to put it in the
> application-tag, that why it didnt work.
>
> On 10 Juli, 20:51, Dianne Hackborn  wrote:
> > (Or hopefully in the not too distant future, just forget about building
> > against 1.5.)
> >
> > On Sat, Jul 10, 2010 at 11:49 AM, Dianne Hackborn  >wrote:
> >
> >
> >
> > > Or just android:targetSdkVersion="4" or greater.
> >
> > > On Sat, Jul 10, 2010 at 11:36 AM, Mark Murphy  >wrote:
> >
> > >> Add the appropriate  element to your manifest.
> >
> > >> On Sat, Jul 10, 2010 at 2:28 PM, Deren  wrote:
> > >> > I have an application which is basically a surfaceview, where
> height/
> > >> > width is set to fill_parent. I run it on a htc desire, but when I
> > >> > check the size of the view (or the canvas I obtain), it says
> 340x533,
> > >> > so some kind of scaling seems to be done. Also, I load a bitmap,
> which
> > >> > seems to be scaled. Do I have to do anything special to run my app
> in
> > >> > full resolution?
> >
> > >> --
> > >> Mark Murphy (a Commons Guy)
> > >>http://commonsware.com|http://github.com/commonsguy
> > >>http://commonsware.com/blog|http://twitter.com/commonsguy
> >
> > >> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
> > >> Available!
> >
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> Groups "Android Developers" group.
> > >> To post to this group, send email to
> android-developers@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> android-developers+unsubscr...@googlegroups.com
> 
> >
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/android-developers?hl=en
> >
> > > --
> > > 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.
> >
> > --
> > 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
>



-- 
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: Run app in full resolution?

2010-07-10 Thread Deren
Thanks, I had the targetsdkversion, but I tried to put it in the
application-tag, that why it didnt work.

On 10 Juli, 20:51, Dianne Hackborn  wrote:
> (Or hopefully in the not too distant future, just forget about building
> against 1.5.)
>
> On Sat, Jul 10, 2010 at 11:49 AM, Dianne Hackborn wrote:
>
>
>
> > Or just android:targetSdkVersion="4" or greater.
>
> > On Sat, Jul 10, 2010 at 11:36 AM, Mark Murphy 
> > wrote:
>
> >> Add the appropriate  element to your manifest.
>
> >> On Sat, Jul 10, 2010 at 2:28 PM, Deren  wrote:
> >> > I have an application which is basically a surfaceview, where height/
> >> > width is set to fill_parent. I run it on a htc desire, but when I
> >> > check the size of the view (or the canvas I obtain), it says 340x533,
> >> > so some kind of scaling seems to be done. Also, I load a bitmap, which
> >> > seems to be scaled. Do I have to do anything special to run my app in
> >> > full resolution?
>
> >> --
> >> Mark Murphy (a Commons Guy)
> >>http://commonsware.com|http://github.com/commonsguy
> >>http://commonsware.com/blog|http://twitter.com/commonsguy
>
> >> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
> >> Available!
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> > --
> > 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.
>
> --
> 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] Re: Installed Application Size vs APK Filesize

2010-07-10 Thread Dianne Hackborn
On Fri, Jul 9, 2010 at 11:33 PM, keno  wrote:

> Dianne, can you give any guidance on when to use copy protection and
> when not to?
>

Personally I would say to never use it.

Then again, my arm was twisted to put that in, so I have a little bias
against it. ;)

-- 
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] Preload NinePatchs

2010-07-10 Thread Dianne Hackborn
The platform already does this for you -- just retrieve the Drawable through
the Resources object.

On Sat, Jul 10, 2010 at 6:32 AM, Gyscos  wrote:

> Hi people !
>
> I'm trying to use 9-patches in my application.
>
> At first, I created one NinePatchDrawable that I used in every Button,
> but this lead to some problems :
> http://pastebin.com/pBep1NM0
>
> This happened with any Drawable, including NinePatchDrawable or
> BitmapDrawable.
>
> Someone told me that it was because Drawable was storing some shared
> values, so I decided to use one Drawable per button...
>
> But since I was going to use many NinePatchDrawable with the same
> NinePatch, I thought it might be a better idea to first create a
> NinePatch, and then distribute NinePatchDrawable based on this
> NinePatch.
>
> But the NinePatchDrawable(Resouce, NinePatch) constructor produces a
> null-pointer exception because no padding is entered... (By the way,
> why is this constructor public then ?... Since it directly calls
> setNinePatchState, wich calls computeBitmapSize, where the error
> occurs...).
>
> So what's the way to do it ? Directly call
> Resource.getDrawable() ?... :-/ But then it gets more difficult to
> control when the data is loaded... (When calling multiple times
> Resource.getDrawable() with the same file, only the first call loads
> the file, right ? The others are faster ?)
>
> What is the clean way to use Managers to handle this ?...
>
> 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

Re: [android-developers] Killi Process with files on SD card

2010-07-10 Thread Dianne Hackborn
There is a broadcast sent when the SD card is being unmounted (sorry I don't
remember the name off-hand).  You should close all your files at that point.
 If you don't, the platform needs to kill the process because Linux can't
unmount the file system while any files remain open on it.

On Sat, Jul 10, 2010 at 10:35 AM, ls02  wrote:

> I found that Android kills my app process that has files open on SD
> card when the card is mounted when the device connects to a computer.
> It is done without any notification, I see in the log something like
> KillProcessWithFilesOpenedOnCard message, my app receives no
> notification, has no chance to gracefully shutdown. Moreover Android
> restarts my app immediately after killing it with latest Activity not
> the default activity launched in default standard mode. It does it
> while the card is still mounted and device is still connected to a
> computer.
>
> Can someone explain this all to me, how it I supposed to work, and if
> there is any way to alter this weird rude behavior? Particularly, if
> there is way to get any notification before the process is killed by
> the OS and to prevent relaunching it while the card is still mounted?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Block incoming calls without disabling Bluetooth - i.e., DND (do not disturb) mode

2010-07-10 Thread WhitneyApps
I'm working on an app that should have the ability to disable incoming
calls for a user-specified period of time.  It should work much the
way a "DND" (do not disturb) button works on an office phone.

I've looked over the SDK, and I can't find any way to send phone calls
to voicemail without putting the phone in airplane mode.  That would
be OK if I could re-enable Bluetooth.  I'd like the user to be able to
listen to music via a Bluetooth headset while phone calls are blocked.

In summary, any of the following would work I could do them from my
app:

1) Programmatically send all calls to voicemail (like a "DND" button)
- this would be ideal since it would still be in the call log at the
end of the "do not disturb" time.

2) Intercept the incoming call in my app and bounce it

3) Disable all radios but Bluetooth (Wi-Fi would be OK too.)

4) Prevent the built-in phone call app from displaying its incoming
call screen (I can disable the ringer and vibration) even though the
call is received

Is any of these possible?  Or maybe another approach I haven't thought
of?

Just a side note: For Android phones to be the best possible
productivity tool, it should be possible to use a device for email/
Internet/apps without receiving constant interruptions from calls.
Humans have a significant context-switch time.

Thanks,

Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Run app in full resolution?

2010-07-10 Thread Dianne Hackborn
(Or hopefully in the not too distant future, just forget about building
against 1.5.)

On Sat, Jul 10, 2010 at 11:49 AM, Dianne Hackborn wrote:

> Or just android:targetSdkVersion="4" or greater.
>
>
> On Sat, Jul 10, 2010 at 11:36 AM, Mark Murphy wrote:
>
>> Add the appropriate  element to your manifest.
>>
>> On Sat, Jul 10, 2010 at 2:28 PM, Deren  wrote:
>> > I have an application which is basically a surfaceview, where height/
>> > width is set to fill_parent. I run it on a htc desire, but when I
>> > check the size of the view (or the canvas I obtain), it says 340x533,
>> > so some kind of scaling seems to be done. Also, I load a bitmap, which
>> > seems to be scaled. Do I have to do anything special to run my app in
>> > full resolution?
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://github.com/commonsguy
>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>
>> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
>> Available!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> 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.
>
>


-- 
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] Run app in full resolution?

2010-07-10 Thread Dianne Hackborn
Or just android:targetSdkVersion="4" or greater.

On Sat, Jul 10, 2010 at 11:36 AM, Mark Murphy wrote:

> Add the appropriate  element to your manifest.
>
> On Sat, Jul 10, 2010 at 2:28 PM, Deren  wrote:
> > I have an application which is basically a surfaceview, where height/
> > width is set to fill_parent. I run it on a htc desire, but when I
> > check the size of the view (or the canvas I obtain), it says 340x533,
> > so some kind of scaling seems to be done. Also, I load a bitmap, which
> > seems to be scaled. Do I have to do anything special to run my app in
> > full resolution?
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
> Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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 disconnect the incomming call

2010-07-10 Thread Denzil Ferreira (dferreira)
So that means that we can't make a call manager? Like incoming call ->
voicemail / reject call automatically and such?

On Jul 9, 4:49 pm, Matt  wrote:
> That seems like something that the Android OS would NOT want an
> application to be able to do.  So I doubt it's possible.
>
> On Jul 9, 6:30 am, "A N K ! T"  wrote:
>
>
>
> >  hey am trying to disconnect the incomming call
> > can anybody help me in this ..
> > --
> > Thanks
> > Ankit

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Run app in full resolution?

2010-07-10 Thread Mark Murphy
Add the appropriate  element to your manifest.

On Sat, Jul 10, 2010 at 2:28 PM, Deren  wrote:
> I have an application which is basically a surfaceview, where height/
> width is set to fill_parent. I run it on a htc desire, but when I
> check the size of the view (or the canvas I obtain), it says 340x533,
> so some kind of scaling seems to be done. Also, I load a bitmap, which
> seems to be scaled. Do I have to do anything special to run my app in
> full resolution?

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


[android-developers] Run app in full resolution?

2010-07-10 Thread Deren
I have an application which is basically a surfaceview, where height/
width is set to fill_parent. I run it on a htc desire, but when I
check the size of the view (or the canvas I obtain), it says 340x533,
so some kind of scaling seems to be done. Also, I load a bitmap, which
seems to be scaled. Do I have to do anything special to run my app in
full resolution?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Google Maps API in a Live Wallpaper

2010-07-10 Thread Maps.Huge.Info (Maps API Guru)
Have you considered using the Maps v3 JavaScript API (in a webview)?
Would that work with a live wallpaper? There's a static map API with
that as well. I believe the terms of the Google Maps API - v3 allow
such a use, as long as you have it available free in the market that
is.

-John Coryat

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


[android-developers] Re: IP infringements on the Market

2010-07-10 Thread Maps.Huge.Info (Maps API Guru)
50+ - I'm from a time that if you plagiarized to write a paper, you
got expelled from school. That mentality stuck.

-John Coryat

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


[android-developers] Re: ListView containing multiple, clickable, Views (i.e. like GMail)

2010-07-10 Thread jamesc
Replying to my own question.

It appears that I screwed-up when registering the Button's listener,
which presumably resulted in the unresponsive state observed.

On Jul 10, 3:30 pm, jamesc  wrote:
> Hi
>
> I've been wrestling with trying to achieve something similar to the
> GMail app's ListView entries (i.e. clicking/tapping on the whole entry
> will start a new Activity (in GMail's case the email proper), and
> there's a Button (of sorts) on the right side of the entry that should
> call back to the registered onClickListener.
>
> This is the (editted) structure of my ListView entry:
>
> 
>     
>         
>     
>
> 
>
> 
>
> I can click/tap the ListView entry (and it starts an Activity as
> required) *if the ImageButton isn't there*.  Adding the ImageButton,
> however, a) stops me from being able to tap the ListView entry to
> start an Activity, and b) results in the ImageButton not generating a
> onClick() callback (even though it appears to register OK).
>
> Clearly, there's an issue with how the ListView handles the various
> Views within it, and ends up not responding to any clicks/taps (I can
> highlight the ListView entries with the trackball, however), but I've
> no idea what it could be.
>
> Are there any pointers someone could give me?  Any help would be much
> appreciated.
>
> Cheers
>
> James

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


[android-developers] Google Maps API in a Live Wallpaper

2010-07-10 Thread Hayden
Is there a way to use the Google Maps API in a live wallpaper? From
looking at the API, it requires a MapActivity which I'm not sure how
can work with a WallpaperService.  It's obviously possible since there
is the Google Maps live wallpaper included in Google Maps for Android,
but wasn't sure if that was using API's not available outside of
Google.

What I want to use it for us pretty simple...use a static map
background at a set zoom level as the background and then drawing
things on top of it, so I don't even need user interaction with the
map.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ItemizedOverlay using both onTap methods

2010-07-10 Thread Brad Gies

Hi Pedro,

There are several ways to do it, but you probably want to do it when you 
create the overlay. If you are not using the overlayItem tag for 
anything else, just set the tag to the Geopoint, and then you can access 
it by casting the tag to a Geopoint after you get the item in the code 
below. As I said, there are lots of other ways.. but that is normally my 
preferred way, because it keeps the information you want with the item.




On 08/07/2010 9:28 AM, Pedro Teixeira wrote:
Is there anyway to get the values that created this overlay and 
compare them with the values of GeoPoint geo ? My code is 
aproximmating values so I never get the numbers right... I don't know 
which values can I use from the onTap method to compare with the ones 
that created the overlay itself besides the latitude and longitude 
values...

protected boolean onTap(int i) {
OverlayItem item=getItem(i);
GeoPoint geo=item.getPoint();
Point pt=map.getProjection().toPixels(geo, null);
View view=panel.getView();
((TextView)view.findViewById(R.id.latitude))
.setText(String.valueOf(geo.getLatitudeE6()/100.0));
((TextView)view.findViewById(R.id.longitude))
.setText(String.valueOf(geo.getLongitudeE6()/100.0));
((TextView)view.findViewById(R.id.x))
.setText(String.valueOf(pt.x));
((TextView)view.findViewById(R.id.y))
.setText(String.valueOf(pt.y));
panel.show(pt.y*2>map.getHeight());
return(true);
}



On Jul 5, 2010, at 11:03 PM, Mark Murphy wrote:


On Mon, Jul 5, 2010 at 5:58 PM, Pedro Teixeira
mailto:pedroteixeir...@gmail.com>> wrote:

Any news on how to implement this ? Is overriding the class that
extends itemizedOverlay on the onTap method enough?
I need to show information when the user clicks a marker and cant seem
to find possibilities


Here are examples of how I've done it:

http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/
http://github.com/commonsguy/cw-advandroid/tree/master/Maps/EvenNooerYawk/

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

Android Consulting: http://commonsware.com/consulting

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


Pedro Teixeira

www.pedroteixeira.org 

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


--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.ihottonight.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: IP infringements on the Market

2010-07-10 Thread michael
Hi Yahel, thanks for your view!

Personally I'm not worried about the ethics of say hurting Disney
either. I just don't want to get myself into legal trouble because I
don't fully understand the consequences. Maybe you are right though,
and I take it all too seriously -- I'm in the upper end (29) of your
"don't care" range (-:

/Michael.

On Jul 10, 6:47 pm, Yahel  wrote:
> Hi Michael,
>
> You need  a little more cynism :)
>
> What will happen to these infringers and their app if they get
> caught ?
> They will receive a cease-and-desist letter from the rights holders
> and maybe Google will ban the appMost likely not the developper,
> just the app.
>
> So thinking about it being very honest is usually a good thing but in
> business the ones that makes money are often the one that play with
> the rules.
>
> There is no real danger putting disney in your app as long as you know
> it will not be for long and you have a backup plan.
>
> I am not telling you to go for it as I reprove as much as you do. I'm
> just stating a fact. It's a crime with no punishement which can bring
> you a lot of downloads and/or purchases. You don't go for it, but
> don't be surprised that others do.
>
> I wonder if it's also a matter of age ? It would be interesting to see
> how old, Mark, Maps, I and yourself are and what age are the disney's
> infringer from hell. I guess when you are in the 16 - 30 range,
> respect for that kind of thing is a lot more flexible :) After all i'm
> small how could i hurt such a big company as Disney ?
>
> Anyway, keep fighting, keep adding functionalities and original ideas
> and then it won't matter anymore...Yeah not to convincing I agree :)
>
> Yahel

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: IP infringements on the Market

2010-07-10 Thread Yahel
Hi Michael,

You need  a little more cynism :)

What will happen to these infringers and their app if they get
caught ?
They will receive a cease-and-desist letter from the rights holders
and maybe Google will ban the appMost likely not the developper,
just the app.

So thinking about it being very honest is usually a good thing but in
business the ones that makes money are often the one that play with
the rules.

There is no real danger putting disney in your app as long as you know
it will not be for long and you have a backup plan.

I am not telling you to go for it as I reprove as much as you do. I'm
just stating a fact. It's a crime with no punishement which can bring
you a lot of downloads and/or purchases. You don't go for it, but
don't be surprised that others do.

I wonder if it's also a matter of age ? It would be interesting to see
how old, Mark, Maps, I and yourself are and what age are the disney's
infringer from hell. I guess when you are in the 16 - 30 range,
respect for that kind of thing is a lot more flexible :) After all i'm
small how could i hurt such a big company as Disney ?

Anyway, keep fighting, keep adding functionalities and original ideas
and then it won't matter anymore...Yeah not to convincing I agree :)

Yahel

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Killi Process with files on SD card

2010-07-10 Thread ls02
I found that Android kills my app process that has files open on SD
card when the card is mounted when the device connects to a computer.
It is done without any notification, I see in the log something like
KillProcessWithFilesOpenedOnCard message, my app receives no
notification, has no chance to gracefully shutdown. Moreover Android
restarts my app immediately after killing it with latest Activity not
the default activity launched in default standard mode. It does it
while the card is still mounted and device is still connected to a
computer.

Can someone explain this all to me, how it I supposed to work, and if
there is any way to alter this weird rude behavior? Particularly, if
there is way to get any notification before the process is killed by
the OS and to prevent relaunching it while the card is still mounted?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Send data from my android application to tomcat server

2010-07-10 Thread Brad Gies

HttpClient

On 07/07/2010 8:52 AM, NewB wrote:

Hello All,
   I'm trying to send a simple string (an access token I
receive in the same program from another server) from my android
emulator to my tomcat server running locally. Any ideas on where I
should be looking?

Thanks in advance!!!

   


--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.ihottonight.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: GPS accuracy reliability

2010-07-10 Thread jgostylo
In answer to some questions.  I am setting up the network location
finder and the GPS location finder using 2 separate
LocationListeners.  I have some logic that determines what the user
has activated so I only listen to gps if the have gps enabled and so
forth.

>From my user feedback it seems like the biggest location discrepancies
happen with GPS.  I have not been able to personally verify this.  I
don't need to be super picky about how accurate it is (500 meters
would suffice).  I am just wondering if GPS is putting people several
hundred miles away from their actual location is it also reliable to
say that its accuracy is over 200,000 meters?  That way I can throw
out anything that says it is less accurate than 500 meters.

If it is putting my user 200 miles away and saying that it thinks its
accuracy is within 100 meter then it really does me no good.  Maybe I
can be choosy and say that if it GPS then I demand 20 meter accuracy
but if it is network then I only demand 500 meter???

Thanks for the responses.

On Jul 10, 10:19 am, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> You can manage the orientation changes yourself and eliminate this
> source of device confusion, it's quite easy, just add
> android:configChanges="orientation" to your manifest's activity.
>
> As for the signal source, just make sure to check your provider for
> "gps" - if it says gps, it will be from that source.
>
> -John Coryat

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


[android-developers] Re: Mapping Application

2010-07-10 Thread vineet
Hi there, let me be specific.

We are building a ranging application for which the data will be
provided to mobile application by formats (say by Mobile Atlas Creator
http://mobac.dnsalias.org/)
now application will be when the users wish to go to remote areas, say
villages, forests, where they could not have access to mobile
network / internet.

At that time user could easily load data from the mobile and get its
location.

I tried the Osmdroid library to use open street data..
I tried http://www.anddev.org/openstreetmap_mapview_for_android-t2967.html
as it shows how to use android mapview.
It says it works similarly with MapView from google.

it do have openstreetmapview but there are some problems
firstly it gave IOException Error at  this line
this.mOsmv = new OpenStreetMapView(this,
OpenStreetMapRendererInfo.MAPNIK);

I believe Mapnik is not found, but there is no docs on how to use or
install the on android.. Further there is no MapActivity in osmdroid
package.
Could someone please help me out.

code is at page (http://www.anddev.org/map-tutorials-f18/openstreetmap-
mapview-for-android-t2967.html) as from author
i tried all, but its not working. The author is admnistrator of
anddev.org (plusminus) had stopped working on this... i think. i tried
mailing him also, but no reply

if you had used osmdroid, and actually ran the map activity,  could
someone please post ni sample activity code here...

Or any other approach.
Thnx in advance
On Jul 10, 2:00 am, TreKing  wrote:
> On Thu, Jul 8, 2010 at 4:34 PM, vineet  wrote:
> > Can some put light to this on how to implement this??
>
> Start here . Besides that,
> your question is too broad to really answer.
>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: IP infringements on the Market

2010-07-10 Thread Maps.Huge.Info (Maps API Guru)
Virtually every market category is just stuffed with copyright
violators. In my favorite category, "News & Weather" there is a
developer that has about 50 apps that all violate someone's copyright.
This developer basically scrapes a web site and publishes it as an
app, and runs his ads in it. Does CNN, FOX, ESPN, NBA, NFL or MLB know
or care? Good question. I'm guessing the Android market isn't enough
of a concern to these companies yet to police it.

Do I do anything about it? No. I also believe in live and let live. If
the major media outlets don't care about apps violating their IP, then
that's their problem. Eventually Karma will catch up to these
violators and the situation will take care of itself.

I recommend you do the same. It's a big world and no matter what you
do, you can never get rid of all the law breakers. Just be satisfied
that you live within the rules.

That's my take on this anyway.

-John Coryat

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


[android-developers] Re: GPS accuracy reliability

2010-07-10 Thread Maps.Huge.Info (Maps API Guru)
You can manage the orientation changes yourself and eliminate this
source of device confusion, it's quite easy, just add
android:configChanges="orientation" to your manifest's activity.

As for the signal source, just make sure to check your provider for
"gps" - if it says gps, it will be from that source.

-John Coryat

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


[android-developers] InstrumentationTestCase.sendKeys() fails on headless emulators

2010-07-10 Thread Matthias
Hi,

before reporting this as a bug, I thought I'd ask here (I also posted
on stackoverflow with no reply so far, but the Google developers don't
seem to be actively posting there anyway --
http://stackoverflow.com/questions/3214531/how-to-send-key-events-to-a-headless-emulator-in-an-instrumentation-test).

So the problem is:
We run a build server in our company on a headless Linux, so we have
to start the emulator with the -no-window flag when running the
instrumentation tests. When this flag is set, however, the
InstrumentationTestCase.sendKeys() method fails -- not with an
exception, but there is an obscure message in the device log:

Permission denied: injecting key event from pid 646 uid 10026 to
window Window{43d55100 paused=false} owned by uid 1000

this works fine on a "normal" emulator which does have a window.

We already tried fumbling with the INJECT_EVENTS permission, process
affinity and sharedUserId, but nothing works.

This basically makes our test suite useless on a build server, which
are typically headless. Is this a bug or are we missing something?

Thanks,
Matthias

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Trying to compile the Voice Dialer, need help...

2010-07-10 Thread Nazgulled
Yeah, yoy're right...

Thanks.

On Jul 10, 9:07 am, RichardC  wrote:
> Just a guess then (as i have never built from the source) you said you
> had
>
> >"I downloaded the HEAD revision of the Voice Dialer from GIT ("
>
> you probably need to download all of the source and build it from the
> root as most of the projects use components from other projects.
>
> On Jul 10, 3:41 am, Nazgulled  wrote:
>
> > I posted there already, nobody answers me too :(
>
> > On Jul 8, 12:42 pm, RichardC  wrote:
>
> > > You might stand more chance of a response 
> > > in:http://groups.google.com/group/android-platform
>
> > > /Richard
>
> > > On Jul 8, 9:38 am, Nazgulled  wrote:
>
> > > > Any help please?

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


[android-developers] Re: GPS accuracy reliability

2010-07-10 Thread JP

That was my thought. Unless location provider registration is managed
through the variety of app lifecycle state changes, it is easy to put
an app in a state where it acquires the device location using Network
based location providers, even though the user selected GPS and
unselected everything else (Namely, "Use wireless networks:). The
downside of unregistering and registering location providers with
every lifecycle state change (i.e. in onPause(), onResume() and so
forth) is when users manically switch device orientation back and
forth. This leads to a series of lifecycle breakdown and restart calls
that seem to have the potential of getting Android location provider
registration "confused". If you haven't done already, I'd recommend to
experiment with this for a few hours to get a feel how it all plays
out in relation to your apps.


On Jul 9, 7:50 am, "Maps.Huge.Info (Maps API Guru)" 
wrote:
> Question: How are you getting your location fix? Are you using
> "ACCURACY_FINE" and assuming it will use the GPS? Unless you
> specifically test for the provider being GPS, it might default to
> network, which would give you a position with limited accuracy. I've
> seen this bouncing around effect when the wireless location (network)
> provider is trying to figure out where the device is, as it zeros in
> on the location, it can hop all over the map.
>
> Bottom line: Don't assume that ACCURACY_FINE will be GPS, unless you
> have GPS satellites in view and the user has enabled GPS, you'll be
> using the network location service instead.
>
> -John Coryat

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


[android-developers] ListView containing multiple, clickable, Views (i.e. like GMail)

2010-07-10 Thread jamesc
Hi

I've been wrestling with trying to achieve something similar to the
GMail app's ListView entries (i.e. clicking/tapping on the whole entry
will start a new Activity (in GMail's case the email proper), and
there's a Button (of sorts) on the right side of the entry that should
call back to the registered onClickListener.

This is the (editted) structure of my ListView entry:










I can click/tap the ListView entry (and it starts an Activity as
required) *if the ImageButton isn't there*.  Adding the ImageButton,
however, a) stops me from being able to tap the ListView entry to
start an Activity, and b) results in the ImageButton not generating a
onClick() callback (even though it appears to register OK).

Clearly, there's an issue with how the ListView handles the various
Views within it, and ends up not responding to any clicks/taps (I can
highlight the ListView entries with the trackball, however), but I've
no idea what it could be.

Are there any pointers someone could give me?  Any help would be much
appreciated.

Cheers

James

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


Re: [android-developers] Re: ListView : TextView : text on left and right not working

2010-07-10 Thread Mark Murphy
On Sat, Jul 10, 2010 at 9:44 AM, elubin  wrote:
> Marquee doesn't help me and i don't want to use fixed width.  Is there
> a way to do this with a table?  RelativeLayout?  LinearLayout?

All three, probably, though TableLayout would be the messiest.

> I would think this is a normal request?  text on left and right, with
> the left text stretching as much as it can.

I don't find that layout to be especially "normal", but it is easily
done. Use LinearLayout and android:layout_weight="1" for the left one.
Or, use RelativeLayout with appropriate anchors, so the left text is
anchored to the left side and to the right text.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


[android-developers] Re: ListView : TextView : text on left and right not working

2010-07-10 Thread elubin
Marquee doesn't help me and i don't want to use fixed width.  Is there
a way to do this with a table?  RelativeLayout?  LinearLayout?

I would think this is a normal request?  text on left and right, with
the left text stretching as much as it can.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: GPS accuracy reliability

2010-07-10 Thread RichardC
Get enough data sets and you know where the tracks are :)

On Jul 10, 12:15 pm, Pent  wrote:
> > 2) in the backend applcation - Trains travel on tracks (hopefully) so
> > ignore all GPS positions that we cannot map on to a track.
>
> Oh I'm highly jealous, wish I could filter on tracks as well.
>
> Pent

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Preload NinePatchs

2010-07-10 Thread Gyscos
Hi people !

I'm trying to use 9-patches in my application.

At first, I created one NinePatchDrawable that I used in every Button,
but this lead to some problems :
http://pastebin.com/pBep1NM0

This happened with any Drawable, including NinePatchDrawable or
BitmapDrawable.

Someone told me that it was because Drawable was storing some shared
values, so I decided to use one Drawable per button...

But since I was going to use many NinePatchDrawable with the same
NinePatch, I thought it might be a better idea to first create a
NinePatch, and then distribute NinePatchDrawable based on this
NinePatch.

But the NinePatchDrawable(Resouce, NinePatch) constructor produces a
null-pointer exception because no padding is entered... (By the way,
why is this constructor public then ?... Since it directly calls
setNinePatchState, wich calls computeBitmapSize, where the error
occurs...).

So what's the way to do it ? Directly call
Resource.getDrawable() ?... :-/ But then it gets more difficult to
control when the data is loaded... (When calling multiple times
Resource.getDrawable() with the same file, only the first call loads
the file, right ? The others are faster ?)

What is the clean way to use Managers to handle this ?...

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: IP infringements on the Market

2010-07-10 Thread michael
Hi again,

> Doing so may well violate their DMCA safe harbor provisions and open
> them up to big-ticket lawsuits. I suspect that they are best served by
> following the DMCA rules, which requires takedown notices by the
> rights holders (e.g., Disney).

I didn't think of that but good point.

I agree that probably the best way to act against infringement
problems is to notify copyright holders. Speaking for myself, the
problem is not big enough for me to go through all that trouble. I
guess it is just a downside of a free market that we will have to live
with.

Cheers,
Michael.

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


Re: [android-developers] Re: IP infringements on the Market

2010-07-10 Thread Mark Murphy
On Sat, Jul 10, 2010 at 8:37 AM, michael
 wrote:
> However, I doubt flagging apps as inappropriate will have much of an
> effect.

I am sure you are correct. To be honest, I was just trying to make you
happy, because I am guessing that you won't like anything else that I
tell you.

AFAICT, the only proactive thing you can do to facilitate their
removal is make sure the rights-holders (e.g., Disney) are aware of
the possible copyright and trademark violations. They will file
takedown notices if and when it suits them, as is their right. Plus,
it also solves the problem of where they have indeed licensed those
materials, infrequent as that may be.

Beyond that, pick market segments where competition cannot gain an
advantage by misuse of other firms' trademarks and copyrights.

> Surely Google is already aware of the issue and choose not to
> do anything about it.

Doing so may well violate their DMCA safe harbor provisions and open
them up to big-ticket lawsuits. I suspect that they are best served by
following the DMCA rules, which requires takedown notices by the
rights holders (e.g., Disney). They certainly are willing to remove
apps when confronted with such a takedown notice (see the Tetris clone
removal wave of a month or two ago).

If you are interested in more on this subject, I encourage you to
review the outcome of the Viacom lawsuit against Google for copyright
violations on YouTube:

http://www.techdirt.com/articles/20100623/1333269937.shtml

If you wish to discuss the merits of the DMCA, or whether proactively
removing things that might violate copyright or trademark would breach
the safe harbor provisions, that's cool, but this is not the forum for
it.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


[android-developers] Re: IP infringements on the Market

2010-07-10 Thread michael
Thanks for your reply Mark.

However, I doubt flagging apps as inappropriate will have much of an
effect. Surely Google is already aware of the issue and choose not to
do anything about it. But who knows, maybe they would react if
infringing apps are flagged by sufficiently many people.

/Michael.

On Jul 10, 12:58 pm, Mark Murphy  wrote:
> On Sat, Jul 10, 2010 at 6:10 AM, michael
>
>  wrote:
> > Should infringing apps just
> > be accepted, or is there something we as a community can do to deal
> > with the problem?
>
> In the Market listing, click "Flag as inappropriate", then "Other objection".
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
> Available!

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


Re: [android-developers] IP infringements on the Market

2010-07-10 Thread Mark Murphy
On Sat, Jul 10, 2010 at 6:10 AM, michael
 wrote:
> Should infringing apps just
> be accepted, or is there something we as a community can do to deal
> with the problem?

In the Market listing, click "Flag as inappropriate", then "Other objection".

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


[android-developers] Re: GPS accuracy reliability

2010-07-10 Thread Pent
> 2) in the backend applcation - Trains travel on tracks (hopefully) so
> ignore all GPS positions that we cannot map on to a track.

Oh I'm highly jealous, wish I could filter on tracks as well.

Pent

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Camera preview - strange on Samsung Galaxy S (2.1update1)

2010-07-10 Thread Mathias Lin
@Dan: version is
[ro.build.fingerprint]: [Samsung/GT-I9000/GT-I9000/GT-I9000:2.1-
update1/ECLAIR/I9000XXJF3:user/release-keys]

@blindfold: yes, after commenting out the parameter p.set(ROTATION,
90) it looks ok now, thanks.  I just need to rotate the image
afterwards manually then, since it's in wrong angle, but that's no
problem.
Seems that Samsung has problems with these params.



On Jul 10, 3:32 pm, blindfold  wrote:
> I have no experience with Samsung, but did you try uncommenting all of
> p.set(ORIENTATION, PORTRAIT); p.set(ROTATION, 90);
> p.setPreviewSize(s.width,s.height); to see what happens?
>
>
>
> > Anybody experiencing such issue on the Samsung Galaxy S as well?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: 4001b180 exception

2010-07-10 Thread Al Sutton
That line alone probably isn't enough to give you a good answer.

Can you put the complete output from logcat onto a web server
somewhere and add the URL to this thread.

Al.

On Jul 10, 9:08 am, Abhyudai Shanker 
wrote:
> Hey Guys,
>
> In my mobile log, m getting the following exception:
>
> W/dalvikvm(  902): threadid=3: thread exiting with uncaught exception
> (group=0x4001b180)
>
> Does anyone happen to know what this exception refers to and how can I get
> rid of it. Coz, my complete program stops due to this exception.
>
> Regards,
>
> Abhyudai

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] IP infringements on the Market

2010-07-10 Thread michael
Hi folks,

I thought I would ask other developers for their opinions on the large
number of apps on the market which seem to infringe on third-party
intellectual property.

I have apps in the free Casual Game category, and a quick count
reveals that out of the 200 top apps, at least 30 very likely infringe
on third-party copyrights and/or trademarks. I believe similar numbers
apply to other categories.

This of course may place the developers of these apps at risk of
lawsuits, and is also a breach of the Market terms and conditions.

My worry, however, is that these apps constitute unfair competition:
they use "stolen" intellectual property to promote themselves, thus
out-ranking competing apps which play fair. For example, I would love
to use Disney material in one of my games. I asked Disney and did not
obtain a permission, hence I am not using their material. Yet my game
has to compete against other games which do use Disney material,
almost certainly without permission.

Maybe these are just the rantings of a slightly bitter developer of
not-massively-successful apps. But maybe my concerns also ring a bell
for other developers. What do you think? Should infringing apps just
be accepted, or is there something we as a community can do to deal
with the problem? It would also be good to hear the thoughts of
developers of infringing apps.

Best,
Michael.

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


[android-developers] Re: About the testing of Bluetooth

2010-07-10 Thread moneytoo
Currently such thing cannot be done easily. It's possible but you'd
have to write your own implementation of OBEX on top of RFCOMM.


On Jul 8, 11:17 am, Sam  wrote:
> Hi All,
>
> I have some questions about the testing of bluetooth.
>
> I have tried the bluetooth chat and it worked pretty well on my two
> Andriod 2.1 based mobile phones.
>
> However, this test can only be done only by someone who has 2 android
> phones and the version must be 2.1.
>
> I assume this is a big issue because i looked into the CTS related to
> Bluetooth topic and it doesnt explain much
>
> about it.
>
> The regular expectation for testing Bluetooth should be:
>
> # Scan for other Bluetooth devices
> # Query the local Bluetooth adapter for paired Bluetooth devices
> # Establish RFCOMM channels
> # Connect to other devices through service discovery
> # Transfer data to and from other devices
>
> In my case:
>
> I would like to implement the application to send the file(image file,
> mp3, whatever...) from my Android 2.1 mobile to any device with
> Bluetooth module.
>
> Can someone have any suggestion or experience for this problem?
>
> Your reply will be highly appreciated.
>
> Sam

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: double tap zoom on Google maps

2010-07-10 Thread zeeshan mirza
Can you see what i have replied rather than criticizing whether i can
develop this application or not. It is better to do something rather than
sitting and wasting time.

Regards,
Shan

On Sat, Jul 10, 2010 at 11:08 AM, Hugo Visser  wrote:

> Michael gave you the solution, if you can't understand that, maybe
> building this app is kinda out of your league.
>
> On Jul 10, 3:23 am, zeeshan mirza 
> wrote:
> > Anyone who can help me 
> >
> > BR,
> > shan
> >
> > On Fri, Jul 9, 2010 at 12:28 AM, zeeshan mirza <
> >
> >
> >
> > zeeshan.nabeel.mi...@gmail.com> wrote:
> > > I am now forwading touch event to gestureDetector but let me know what
> to
> > > add more ?
> >
> > > @Override
> >
> > > *public* *boolean* onTouchEvent(MotionEvent event){
> >
> > > *this*.detector.onTouchEvent(event);
> >
> > > *return* *super*.onTouchEvent(event);
> >
> > > }
> >
> > > @Override
> >
> > > *public* *boolean* onDoubleTap(MotionEvent e) {
> >
> > > // *TODO* Auto-generated method stub
> >
> > > mapView.getController().zoomIn();
> >
> > > *return* *false*;
> >
> > > }
> >
> > > @Override
> >
> > > *public* *boolean* onDoubleTapEvent(MotionEvent e) {
> >
> > > // *TODO* Auto-generated method stub
> >
> > > *return* *false*;
> >
> > > }
> >
> > >   On Wed, Jul 7, 2010 at 5:23 PM, Michael MacDonald <
>  > > googlec...@antlersoft.com> wrote:
> >
> > >> Maybe the problem is you are not forwarding touch events to the
> > >> GestureDetector
> >
> > >> I would expect to see something like
> >
> > >> @Override
> > >> public boolean onTouchEvent(MotionEvent evt) {
> > >> return detector.onTouchEvent(evt);
> >
> > >> }
> >
> > >> On 07/06/10 21:07, zeeshan mirza wrote:
> >
> > >> Here is my own code which i have written up till now. I am trying to
> > >> implement onDoubleTap() zoom in function in my application. My code is
> as
> > >> follows. LEt me know where is the problem ? and if possible please add
> the
> > >> correct code for double tap zoom in function.
> >
> > >> public class Maps extends MapActivity implements OnGestureListener,
> > >> OnDoubleTapListener{
> >
> > >>  private GestureDetector detector;
> > >>  MapView mapView;
> > >>  /** Called when the activity is first created. */
> > >>  @Override
> > >> public void onCreate(Bundle savedInstanceState) {
> > >> super.onCreate(savedInstanceState);
> > >> setContentView(R.layout.main);
> > >> //MapViewer mapViewer = new MapViewer(null, null);
> > >> mapView = (MapView) findViewById(R.id.mapview);
> > >> detector = new GestureDetector(this,this);
> > >> mapView.setBuiltInZoomControls(true);
> > >> }
> > >>  @Override
> > >>  protected boolean isRouteDisplayed() {
> > >>return false;
> > >>  }
> >
> > >>  public boolean onDoubleTap(MotionEvent e) {
> > >>   // TODO Auto-generated method stub
> > >>   mapView.getController().zoomIn();
> > >>   return false;
> > >>  }
> > >>  public boolean onDoubleTapEvent(MotionEvent e) {
> > >>   // TODO Auto-generated method stub
> > >>   return false;
> > >>  }
> > >>  public boolean onSingleTapConfirmed(MotionEvent e) {
> > >>   // TODO Auto-generated method stub
> > >>   return false;
> > >>  }
> > >>  public boolean onDown(MotionEvent e) {
> > >>   // TODO Auto-generated method stub
> > >>   return false;
> > >>  }
> > >>  public boolean onFling(MotionEvent e1, MotionEvent e2, float
> velocityX,
> > >>float velocityY) {
> > >>   // TODO Auto-generated method stub
> > >>   return false;
> > >>  }
> > >>  public void onLongPress(MotionEvent e) {
> > >>   // TODO Auto-generated method stub
> >
> > >>  }
> > >>  public boolean onScroll(MotionEvent e1, MotionEvent e2, float
> distanceX,
> > >>float distanceY) {
> > >>   // TODO Auto-generated method stub
> > >>   return false;
> > >>  }
> > >>  public void onShowPress(MotionEvent e) {
> > >>   // TODO Auto-generated method stub
> >
> > >>  }
> > >>  public boolean onSingleTapUp(MotionEvent e) {
> > >>   // TODO Auto-generated method stub
> > >>   return false;
> > >>  }
> > >> }
> >
> > >> On Fri, Jul 2, 2010 at 5:26 PM, TreKing  wrote:
> >
> > >>>  On Wed, Jun 30, 2010 at 2:44 PM, SilentCoders <
> > >>> zeeshan.nabeel.mi...@gmail.com> wrote:
> >
> >  I need a sample code which i can use in my application.
> >
> > >>> No, you need to do your own work and ask specific questions when you
> get
> > >>> stuck.
> >
> > >>> Start with the Google Maps API documentation, the Hello MapView (or
> > >>> whatever it's called) sample on the official documentation site.
> Review
> > >>> handling touch events and start putting something together. If you
> get stuck
> > >>> on something specific, come back, show what you've done and ask a
> specific
> > >>> question someone may be able to help you out with.
> >
> > >>>
> ---
> --
> > >>> TreKing - Chicago transit tracking app for Android-powered devices
> > >>>http://sites.

[android-developers] Re: double tap zoom on Google maps

2010-07-10 Thread Hugo Visser
Michael gave you the solution, if you can't understand that, maybe
building this app is kinda out of your league.

On Jul 10, 3:23 am, zeeshan mirza 
wrote:
> Anyone who can help me 
>
> BR,
> shan
>
> On Fri, Jul 9, 2010 at 12:28 AM, zeeshan mirza <
>
>
>
> zeeshan.nabeel.mi...@gmail.com> wrote:
> > I am now forwading touch event to gestureDetector but let me know what to
> > add more ?
>
> > @Override
>
> > *public* *boolean* onTouchEvent(MotionEvent event){
>
> > *this*.detector.onTouchEvent(event);
>
> > *return* *super*.onTouchEvent(event);
>
> > }
>
> > @Override
>
> > *public* *boolean* onDoubleTap(MotionEvent e) {
>
> > // *TODO* Auto-generated method stub
>
> > mapView.getController().zoomIn();
>
> > *return* *false*;
>
> > }
>
> > @Override
>
> > *public* *boolean* onDoubleTapEvent(MotionEvent e) {
>
> > // *TODO* Auto-generated method stub
>
> > *return* *false*;
>
> > }
>
> >   On Wed, Jul 7, 2010 at 5:23 PM, Michael MacDonald <
> > googlec...@antlersoft.com> wrote:
>
> >> Maybe the problem is you are not forwarding touch events to the
> >> GestureDetector
>
> >> I would expect to see something like
>
> >>     @Override
> >>     public boolean onTouchEvent(MotionEvent evt) {
> >>         return detector.onTouchEvent(evt);
>
> >>     }
>
> >> On 07/06/10 21:07, zeeshan mirza wrote:
>
> >> Here is my own code which i have written up till now. I am trying to
> >> implement onDoubleTap() zoom in function in my application. My code is as
> >> follows. LEt me know where is the problem ? and if possible please add the
> >> correct code for double tap zoom in function.
>
> >> public class Maps extends MapActivity implements OnGestureListener,
> >> OnDoubleTapListener{
>
> >>  private GestureDetector detector;
> >>  MapView mapView;
> >>  /** Called when the activity is first created. */
> >> �...@override
> >>     public void onCreate(Bundle savedInstanceState) {
> >>         super.onCreate(savedInstanceState);
> >>         setContentView(R.layout.main);
> >>         //MapViewer mapViewer = new MapViewer(null, null);
> >>         mapView = (MapView) findViewById(R.id.mapview);
> >>         detector = new GestureDetector(this,this);
> >>         mapView.setBuiltInZoomControls(true);
> >>     }
> >> �...@override
> >>  protected boolean isRouteDisplayed() {
> >>    return false;
> >>  }
>
> >>  public boolean onDoubleTap(MotionEvent e) {
> >>   // TODO Auto-generated method stub
> >>   mapView.getController().zoomIn();
> >>   return false;
> >>  }
> >>  public boolean onDoubleTapEvent(MotionEvent e) {
> >>   // TODO Auto-generated method stub
> >>   return false;
> >>  }
> >>  public boolean onSingleTapConfirmed(MotionEvent e) {
> >>   // TODO Auto-generated method stub
> >>   return false;
> >>  }
> >>  public boolean onDown(MotionEvent e) {
> >>   // TODO Auto-generated method stub
> >>   return false;
> >>  }
> >>  public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
> >>    float velocityY) {
> >>   // TODO Auto-generated method stub
> >>   return false;
> >>  }
> >>  public void onLongPress(MotionEvent e) {
> >>   // TODO Auto-generated method stub
>
> >>  }
> >>  public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
> >>    float distanceY) {
> >>   // TODO Auto-generated method stub
> >>   return false;
> >>  }
> >>  public void onShowPress(MotionEvent e) {
> >>   // TODO Auto-generated method stub
>
> >>  }
> >>  public boolean onSingleTapUp(MotionEvent e) {
> >>   // TODO Auto-generated method stub
> >>   return false;
> >>  }
> >> }
>
> >> On Fri, Jul 2, 2010 at 5:26 PM, TreKing  wrote:
>
> >>>  On Wed, Jun 30, 2010 at 2:44 PM, SilentCoders <
> >>> zeeshan.nabeel.mi...@gmail.com> wrote:
>
>  I need a sample code which i can use in my application.
>
> >>> No, you need to do your own work and ask specific questions when you get
> >>> stuck.
>
> >>> Start with the Google Maps API documentation, the Hello MapView (or
> >>> whatever it's called) sample on the official documentation site. Review
> >>> handling touch events and start putting something together. If you get 
> >>> stuck
> >>> on something specific, come back, show what you've done and ask a specific
> >>> question someone may be able to help you out with.
>
> >>> ---
> >>>  --
> >>> TreKing - Chicago transit tracking app for Android-powered devices
> >>>http://sites.google.com/site/rezmobileapps/treking
> >>> --
> >>>  You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To 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 subscri

[android-developers] Re: Prefill databases

2010-07-10 Thread vineet
See this link..
it may help
http://vineetyadav.com/tutorials/11-adding-prefilled-sqlite-database-to-android-app.html


On Jul 10, 1:10 am, Jaap  wrote:
> Hi,
>
> I have a program that needs a fixed database to do lookups of some
> data. Is there a way to easily fill such a database by just putting
> the data in a file or so
>
> Thanks
>
> Jaap

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


Re: [android-developers] How to get selected text from EditView and color it

2010-07-10 Thread YuviDroid
Ops, I just noticed now that you asked for 'text selection'...sorry! Still,
you can use the getText() to get the entire text, and then use the String
method: substring(int start, int end) to get only the selected text.




On Sat, Jul 10, 2010 at 10:55 AM, YuviDroid  wrote:

> Do you mean EditText or TextView?
> Anyway, in both cases to get the text:
>
> yourEditText.getText().toString();
>
> to change the text color you can use:
> yourEditText.setTextColor(Color.WHITE);
>
>
> Hope it helps.
>
>
> On Sat, Jul 10, 2010 at 8:32 AM, monty  wrote:
>
>> hey everyone
>>   Culd any1 please tell me how to get the selected text from a from
>> EditView .I am using getStartSelection and getEndSelction method to
>> get the start and end position.But after that how do i get the text
>> and where do i store it and then change its color.
>>
>> Monty
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> YuviDroid
> http://android.yuvalsharon.net
>



-- 
YuviDroid
http://android.yuvalsharon.net

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

Re: [android-developers] How to get selected text from EditView and color it

2010-07-10 Thread YuviDroid
Do you mean EditText or TextView?
Anyway, in both cases to get the text:

yourEditText.getText().toString();

to change the text color you can use:
yourEditText.setTextColor(Color.WHITE);


Hope it helps.

On Sat, Jul 10, 2010 at 8:32 AM, monty  wrote:

> hey everyone
>   Culd any1 please tell me how to get the selected text from a from
> EditView .I am using getStartSelection and getEndSelction method to
> get the start and end position.But after that how do i get the text
> and where do i store it and then change its color.
>
> Monty
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
YuviDroid
http://android.yuvalsharon.net

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

[android-developers] 4001b180 exception

2010-07-10 Thread Abhyudai Shanker
Hey Guys,

In my mobile log, m getting the following exception:

W/dalvikvm(  902): threadid=3: thread exiting with uncaught exception
(group=0x4001b180)

Does anyone happen to know what this exception refers to and how can I get
rid of it. Coz, my complete program stops due to this exception.

Regards,

Abhyudai

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Trying to compile the Voice Dialer, need help...

2010-07-10 Thread RichardC
Just a guess then (as i have never built from the source) you said you
had
>"I downloaded the HEAD revision of the Voice Dialer from GIT ("

you probably need to download all of the source and build it from the
root as most of the projects use components from other projects.

On Jul 10, 3:41 am, Nazgulled  wrote:
> I posted there already, nobody answers me too :(
>
> On Jul 8, 12:42 pm, RichardC  wrote:
>
> > You might stand more chance of a response 
> > in:http://groups.google.com/group/android-platform
>
> > /Richard
>
> > On Jul 8, 9:38 am, Nazgulled  wrote:
>
> > > Any help please?

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


[android-developers] Re: Camera preview - strange on Samsung Galaxy S (2.1update1)

2010-07-10 Thread blindfold
I have no experience with Samsung, but did you try uncommenting all of
p.set(ORIENTATION, PORTRAIT); p.set(ROTATION, 90);
p.setPreviewSize(s.width,s.height); to see what happens?

> Anybody experiencing such issue on the Samsung Galaxy S as well?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Knowing when someone sets device to 2G only

2010-07-10 Thread Al Sutton
Actually getting the setting is pretty difficult because it's not a
universal setting (CDMA devices don't have a preferred network type
setting), so the setting itself isn't exposed in a universal way.

You could try setting up a broadcast receiver for
ConnectivityManager.CONNECTIVITY_ACTION and testing to see if the
network type has changed and whether it ever switches to 3G using
TelephonyManager (http://developer.android.com/reference/android/
telephony/TelephonyManager.html)

If you want an example of how to set the receiver up you can find one
in the system browser app;

http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a=blob;f=src/com/android/browser/BrowserActivity.java;h=5e557893b5b61976ea23860e0d52fc14f1644a82;hb=307bddd3006fd4d0fd8f8c6b63cd781582e6fb09

lines 244-263.

Al.


On Jul 9, 5:11 pm, Craig  wrote:
> I support people in my organization who use android phones - I
> frequently run into people who have set their device to 2G only to
> save battery and forget that they made that choice.  Then they call me
> at a later date to complain that they aren't getting 3G connections.
> I've been looking for a way to write an application on the device that
> can pull that metric and send it to me.  I'm only able to find an api
> for Network the user is currently on - does anyone know if there is a
> way to determine if the user has made a preference choice for 2G
> only?  It's an option in the Wireless menu but I can't seem to find a
> way to see if that setting has been chosen.
> Thanks for the help
> Craig

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