[android-developers] Re: user agent of the device ..

2010-02-20 Thread Bob Kerns
If you're using a WebView, the answer is yes.

WebView webview = ...;
WebSettings settings = webview.getSettings();
String uastring = settings.getUserAgentString();

I don't know of a way to ask the Browser application itself -- but if
you're doing this level of stuff, you may be wanting more control
anyway, and want to use a WebView.

What would you do with this information in an app?

I guess you could run a little web server in your app, direct the
browser to it, pick up the UA string, and redirect to somewhere else.
Bleh. A whole lot of hackery for something that hardly ever changes.

On Feb 19, 11:21 pm, Dan Raaka  wrote:
> is there a way to get the User Agent of the Browser on the android
> device pro grammatically from within an app ?
>
> -Dan

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


[android-developers] Non-parallel construction of DatePicker and TimePicker

2010-02-20 Thread DonFrench
I was surprised and dismayed to discover that the DatePicker and
TimePicker classes, which are of parallel construction in almost every
way, differ in one significant way.  There is no
setOnDateChangedListener(...) method in DatePicker while there is a
setOnTimeChangedListener(...) method in TimePicker.  For two classes
that parallel one another in every other way, including the appearance
and operation of their corresponding Views, why do they diverge in
this fairly important aspect?   I eventually discovered that there is
a way to set the OnDateListener through the init(...) method, but COME
ON!  Was this just an oversight on Google's part?  I hope that they
fix this in a coming release.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 code works in HTC machines but fails in MOTO's

2010-02-20 Thread Bob Kerns
Gack. I see I said that. Thanks for correcting it.

I think what was going through my mind was that the handler purpose
would likely be updating the activity's view, and that idea got short-
circuited between forebrain and fingers.

Thanks for the catch.

On Feb 20, 6:27 pm, Mark Murphy  wrote:
> Bob Kerns wrote:
> > * Create your Handler in the context of whatever you want to associate
> > with handling it. For example, if you're updating a view in an
> > activity, create it in the onCreate() method for the view.
> > * Save your handler in an instance variable in that context. In other
> > words, the Handler is owned by the context in which it runs, not the
> > context in which messages are posted.
> > * When you run some code in some other context that wants to post back
> > -- pass it the Handler, so it can do so. (Often this will be from code
> > from the same class -- you can just refer to the instance variable).
>
> Excellent advice!
>
> (though, a nit: in your first bullet, perhaps you mean onCreate() for
> the activity, since there is no onCreate() for View)
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training in US: 14-18 June 2010:http://bignerdranch.com

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


[android-developers] How to start application after pressing particular key?

2010-02-20 Thread pramod.deore
How can I start my android application after pressing particular key?

Thanks

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


Re: [android-developers] File system access triggers / listener on Android devices

2010-02-20 Thread Petroleum Nasby
>
> I'm looking for some ways to intercept File System Access operations
> like Read and Write a file. So that i can catch these "events" from an
> Android App. (background service for ex.).
>

android.os.FileObserver may be helpful, but it sounds like you want an
interception rather than notification.

P. V. Nasby

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

2010-02-20 Thread Bob Kerns
Well, I say again that blocking/non-blocking really has nothing to do
with how quickly you can respond.

When you queue data up to be played, whether via a blocking call, or a
non-blocking call, at some point, you no longer have the ability to
abort. The distance in the pipeline between that point, and the actual
output, is your minimum latency.

If you queue up a transfer via a non-blocking call, you either have a
way to abort that transfer at that level, or not. Same with a blocking
call. The only difference is, in a blocking call any such abort has to
come from another thread -- and naturally would, since the thread that
is blocked is just doing transfers. The code that would be in the non-
blocking loop that would do the abort of a queued transfer, no longer
requires a polling test, or whatever, and can live in another thread
-- where it can safely block if needed -- say, waiting on user input.

Re: 2 vs 3 buffers -- actually I mentioned the more general case, of
which 3 is a special case. Any time you want to allow the source to
get further ahead of the sink, you can increase the number of buffers
> 2. There's nothing magic about 3; 2 is often quite enough, if the
source is reliably fast enough to fill it before the next flip. But if
you have a variable-speed source, you may need >2 buffers -- and if
you have a slow one, and no tolerance for undderruns, you might need
to even buffer the entire stream before starting.

So anyway -- I definitely don't agree that blocking is never a good
thing. It's a different thing, with distinct advantages to the coder.
I don't know of any inherent reason or case where one is faster than
the other -- when done properly, and designed to the same parameters.
E.g. if you can abort a transfer-in-progress in one, for a fair
comparison you should be able to abort a transfer-in-progress in the
other.

Now, two different implementations of either may have different
latency. Offloading the audio onto a chip inherently deepens the
pipeline. Presence/absence of the ability to cleanly abort a transfer.
Poor scheduler behavior can make a difference, too. I'm only comparing
ideal implementations when I say they're equivalent.

Ultimately, though, it only has to be "good enough" -- beyond that, I
value programmer productivity and bug-free code very highly.

On Feb 19, 11:37 pm, Steve Lhomme  wrote:
> On Fri, Feb 19, 2010 at 7:15 PM, Bob Kerns  wrote:

> > But aside from that, my experience is that the code based on the
> > blocking API will be simpler and have many fewer bugs, and roughly the
> > same performance characteristics if done right. (But as I mentioned
> > earlier, the need for threads means the blocking version won't scale
> > to large numbers of streams well, which is why serious web servers use
> > non-blocking APIs).
>
> Yeah, it's just a little usual based on what I've seen around.
> Blocking is never a good thing, especially on a phone that is supposed
> to respond fast. For example you don't want the audio to keep playing
> while receiving a call.
>
> Also about your 2 buffers explanation. 3 are often used, so you have
> the one writing, one ready to write (so as soon as one is written, you
> don't have to wait for the second one to start writing) and one been
> feed from the rest of the application.

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


Re: [android-developers] Layout resource: FWVGA vs. WVGA

2010-02-20 Thread Dianne Hackborn
The long qualifier is for something "significantly longer" than the original
standard HVGA screen, nothing more than that.

Absolutely positively do not use the old raw screen size qualifiers; this
simply do no work, and you can pretty much assume that you will not get what
you want in some specific device configurations.

Honestly, resource qualifiers are just not the level at which to work for
"oh there might be 50 more pixels available for me to put an extra row of
buttons."   I think you would be better of designing a single layout the
gracefully adjusts when there is less space.  You may want to write your own
layout manager for doing that kind of logic (we don't really have a layout
manager that can do "include this view if there is space" stuff), but that's
not hard to do.

On Sat, Feb 20, 2010 at 4:24 PM, freezy  wrote:

> Thanks for the fast reply Dianne.
>
> I think I understood the whole density/size vs pixels approach, but this is
> an issue about aspect ratios. Android already *has* that distinction with
> the long/notlong qualifier, just that the WVGA/FWVGA distinction is not
> made.
>
> My layout is maybe a special case. It is a presentation of a remote
> control[1] that simply would contain an additional row of buttons on FWGA
> (or let's say 1.78 vs 1.66 aspect ratio) resolutions. There is no keyboard
> whatsoever.
>
> So am I right that in this case all I have is the deprecated 123x456
> qualifier?
>
>
>
> [1]
> http://android-xbmcremote.googlecode.com/svn/trunk/Documentation/Images/v0.5.0/remote_portrait.png
>
>
>
> On Sun, Feb 21, 2010 at 1:04 AM, Dianne Hackborn wrote:
>
>> No, there deliberately isn't.  At that level, you really shouldn't be
>> creating distinct layouts -- I'd strongly encourage you to design a layout
>> that can resize appropriately to adjust for the screen.  (long is to
>> distinguish between HVGA and large screens like WVGA/FWVGA).
>>
>> Larger picture, you really should avoiding having layouts for different
>> screen sizes as much as possible.  You can already see with the number of
>> sizes we have that this is just not scalable: QVGA, HVGA, WVGA (both med and
>> high density), FWVGA (both med and high density), and of course both
>> portrait and landscape versions of all of those.  And in the future you
>> should expect even more varieties (wider screens, larger screens, maybe even
>> smaller screens).
>>
>> Also for a given size -- say FWVGA -- there is not a guarantee of exactly
>> how much space you may have.  For example a device may have a slightly
>> smaller or larger status bar that impacts the space you have.
>>
>> And then if you are taking user input, there is the whole impact of the
>> soft keyboard being displayed and thus reducing the space available for your
>> UI during that time.
>>
>> So we strongly encourage that developers make use of the dynamic layout
>> manager in the framework to design their UI to adjust for the exact space
>> they have available.
>>
>> On Sat, Feb 20, 2010 at 3:51 PM, freezy  wrote:
>>
>>> Hello there,
>>>
>>> This seems like a simple problem to me, but I can't figure it out. I have
>>> a fullscreen layout that displays differently if the screen is taller (854
>>> instead of 800 pixels). I've tried putting the xml into
>>> layout-notlong-hdpi and layout-long-dpi respectively, but both my WVGA
>>> and FWVGA emulators go for the "long" version (as described in the doc).
>>>
>>> Is there any way to distinguish between the two besides using the
>>> deprecated -800x480/-854x480 qualifiers?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
>

[android-developers] email multi attachments

2010-02-20 Thread sleith
Hi, is it possible to send email with multi attachments?
Because what i see is only Intent.EXTRA_STREAM to attach the file, and
it's only one file.
Thanks for the help :)

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


[android-developers] Re: $3.00 Marketplace chargeback ?!?!

2010-02-20 Thread Bob Kerns
Google Marketplace only accepts Google Checkout, so if you're selling
through Google Marketplace, you can't use PayPal either directly or
indirectly (it's in your agreement).

If you're selling from your website, or from one of the other Android
stores, you'll have to deal with PayPal's own set of rules and issues.
I'm not very familiar with those. I'm sure they must have charge
backs, but you'd have to investigate the details, preferably BEFORE
signing up and selling.

Theft is theft, but the people to blame are the thieves.

On Feb 20, 12:40 pm, Angel Cruz  wrote:
> Is this still true if payments are made with PayPal?  I am new to this
> field, and so forgive me if the question is naive.
>
> Even though this is a nuisance as some of you responded, this is still
> unacceptable (theft is theft).
>
>
>
> On Sat, Feb 20, 2010 at 12:29 PM, snctln  wrote:
>
> > On Feb 20, 1:56 pm, Streets Of Boston  wrote:
> > > Relax!!!
>
> > > It happened to me too a few times. It sucks, but this is just the cost
> > > of doing business. And it's in the Android Market agreement that you
> > > accepted.
>
> > Exactly my thoughts.  It sucks, i get one about once a month, so maybe
> > about a dozen or so since the market opened.  It is just the cost of
> > doing business on the Android Market.  I never really considered that
> > it might be due to stolen cards I just always assumed that it was more
> > of a case where the customer looks at their credit card statements and
> > sees "GOOGLE *SNCTLNSOFT" and doesn't realize that it was an Android
> > Market purchase so they call the bank and ask for a chargeback.
>
> > However it happens it definitely sucks, especially the first time you
> > get one, but in the end it is just a fraction of what I bring in every
> > day form the market so I try not to get too caught up with it.
>
> > ---Sean Catlin
> >www.snctln.com
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: GPS code works in HTC machines but fails in MOTO's

2010-02-20 Thread Mark Murphy
Bob Kerns wrote:
> * Create your Handler in the context of whatever you want to associate
> with handling it. For example, if you're updating a view in an
> activity, create it in the onCreate() method for the view.
> * Save your handler in an instance variable in that context. In other
> words, the Handler is owned by the context in which it runs, not the
> context in which messages are posted.
> * When you run some code in some other context that wants to post back
> -- pass it the Handler, so it can do so. (Often this will be from code
> from the same class -- you can just refer to the instance variable).

Excellent advice!

(though, a nit: in your first bullet, perhaps you mean onCreate() for
the activity, since there is no onCreate() for View)

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

Android Training in US: 14-18 June 2010: http://bignerdranch.com

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


[android-developers] Re: GPS code works in HTC machines but fails in MOTO's

2010-02-20 Thread Bob Kerns
I should add, however, that while I can't really tell from the code
fragments you sent -- it's likely you don't need to be using Handler's
either.

ASyncTask takes care of those for you. You'll need to allocate the
ASyncTask in the main thread as well.

On Feb 20, 6:13 pm, Bob Kerns  wrote:
> I think his use of the main Looper is OK -- though not something I
> would endorse, in part, because:
> I think the problem is in the lifetime of his handlers.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 code works in HTC machines but fails in MOTO's

2010-02-20 Thread Bob Kerns
I think his use of the main Looper is OK -- though not something I
would endorse, in part, because:
I think the problem is in the lifetime of his handlers.

Yidongsoft:

Normally, you allocate the Handler in your main thread -- and then
HANG ONTO THEM, generally in an instance field of your Activity or
Service. They'll pick up the main looper automatically if you create
them in the main thread.

Now, I don't know for sure that a Handler doesn't install some strong
reference to itself in the Looper. But I would expect it to only
install a weak reference -- that means, the GC will throw away the
Handler -- and its code -- sometime after you exit each of your
methods.

If this is hypothesis is correct, the reason you see different
behavior is likely that the HTC devices you're considering (such as
the Nexus One) have more RAM than the Moto DROID, which only has 256
MB. So things get GC'd quicker.

I'm not going to go read the code to find out, because there's a
pattern I see no need to deviate from:

* Create your Handler in the context of whatever you want to associate
with handling it. For example, if you're updating a view in an
activity, create it in the onCreate() method for the view.
* Save your handler in an instance variable in that context. In other
words, the Handler is owned by the context in which it runs, not the
context in which messages are posted.
* When you run some code in some other context that wants to post back
-- pass it the Handler, so it can do so. (Often this will be from code
from the same class -- you can just refer to the instance variable).

Try changing your code to work that way, and see if it works better.

I'm not going to look, because I base this guess on long experience
designing frameworks like this. And it's how I would do it. You WANT
your posted code to go away, if the Handler is no longer needed before
it gets to run. Actually, I'd be even MORE aggressive on the point,
and not give you any direct access to the Handler, and make you queue
it up via the object with which the Handler is associated -- e.g. an
Activity or Service.

Even if I'm wrong -- you don't want to write your code that way --
handing important information to an object for later use, and then
just letting go of it. If coding that way doesn't get you into trouble
here, it will somewhere else. And even if it doesn't get you into
trouble directly -- when you get in trouble with something else,
you'll look at this code, and NOT KNOW whether you have this problem
or not.

So regardless of whether this is your bug or not -- it's Bad Practice.
Or to put a more positive spin on things: It's Good Practice to
associate a Handler with the context in which things are being
Handled, and initialize them with that object, in the same thread.

On Feb 20, 7:10 am, Mark Murphy  wrote:
> yidongsoft wrote:
> > My code to obtain GPS coordinate works perfect in HTC cells. But I
> > find it doesn't work in Moto Droid. I debug it and find eveything
> > seems fine. But the coordinate never obtained.
>
> 
>
> > No error message, No fatal return. Every things invoked well, but
> > onLocationChanged() never be run, getLastKnownLocation() always return
> > null - No GPS information get at all. I check all the settings.
> > GPS device is opened and every thing is OK. The same code works in my
> > HTC magic, G2.
>
> I can tell you that this code works on a DROID:
>
> http://github.com/commonsguy/cw-android/tree/master/Internet/Weather/
>
> as does this code:
>
> http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/
>
> and this code:
>
> http://github.com/commonsguy/cw-advandroid/tree/master/WebView/GeoWeb1/
>
> and this code:
>
> http://github.com/commonsguy/cw-advandroid/tree/master/WebView/GeoWeb2/
>
> In terms of where things may be going wrong in your code, it is
> difficult to say. I have managed to write a whole lot of Android code
> without having to touch a Looper, so I'd start there.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training

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


Re: [android-developers] Layout resource: FWVGA vs. WVGA

2010-02-20 Thread freezy
Thanks for the fast reply Dianne.

I think I understood the whole density/size vs pixels approach, but this is
an issue about aspect ratios. Android already *has* that distinction with
the long/notlong qualifier, just that the WVGA/FWVGA distinction is not
made.

My layout is maybe a special case. It is a presentation of a remote
control[1] that simply would contain an additional row of buttons on FWGA
(or let's say 1.78 vs 1.66 aspect ratio) resolutions. There is no keyboard
whatsoever.

So am I right that in this case all I have is the deprecated 123x456
qualifier?



[1]
http://android-xbmcremote.googlecode.com/svn/trunk/Documentation/Images/v0.5.0/remote_portrait.png



On Sun, Feb 21, 2010 at 1:04 AM, Dianne Hackborn wrote:

> No, there deliberately isn't.  At that level, you really shouldn't be
> creating distinct layouts -- I'd strongly encourage you to design a layout
> that can resize appropriately to adjust for the screen.  (long is to
> distinguish between HVGA and large screens like WVGA/FWVGA).
>
> Larger picture, you really should avoiding having layouts for different
> screen sizes as much as possible.  You can already see with the number of
> sizes we have that this is just not scalable: QVGA, HVGA, WVGA (both med and
> high density), FWVGA (both med and high density), and of course both
> portrait and landscape versions of all of those.  And in the future you
> should expect even more varieties (wider screens, larger screens, maybe even
> smaller screens).
>
> Also for a given size -- say FWVGA -- there is not a guarantee of exactly
> how much space you may have.  For example a device may have a slightly
> smaller or larger status bar that impacts the space you have.
>
> And then if you are taking user input, there is the whole impact of the
> soft keyboard being displayed and thus reducing the space available for your
> UI during that time.
>
> So we strongly encourage that developers make use of the dynamic layout
> manager in the framework to design their UI to adjust for the exact space
> they have available.
>
> On Sat, Feb 20, 2010 at 3:51 PM, freezy  wrote:
>
>> Hello there,
>>
>> This seems like a simple problem to me, but I can't figure it out. I have
>> a fullscreen layout that displays differently if the screen is taller (854
>> instead of 800 pixels). I've tried putting the xml into
>> layout-notlong-hdpi and layout-long-dpi respectively, but both my WVGA
>> and FWVGA emulators go for the "long" version (as described in the doc).
>>
>> Is there any way to distinguish between the two besides using the
>> deprecated -800x480/-854x480 qualifiers?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Question on modifying application framework + importing to the Windows SDK

2010-02-20 Thread Dianne Hackborn
On Fri, Feb 19, 2010 at 5:31 PM, RCP2278  wrote:

> According to the
> devguide, there is an activity method onCreateThumbnail() which gets
> called just before that activity is about to suspend (or call just
> before onPause()).  However, for some reason, the onCreateThumbnail()
> is not getting called (I created an override method on my activity and
> set a breakpoint and verified its not getting called; similarly the
> thumbnail field in the activityInfo is set to null after the activity
> suspended).  So I googled for the reason and one of the responses I
> found was because it was disabled in the framework.  I think I'm able
> to locate where it was disabled, so just for my curiosity purposes, I
> tried to modify it so I can verify if it will now call
> onCreateThumbnail().  But this is where I got stuck because I have
> implemented my apk on Windows.
>

Well you can play with it, but this code was turned off prior to 1.0 (it was
done for an earlier version of the UI that was thrown out), so it has never
been turned on sense then and I would not guarantee it working well or not
causing the entire system to crash at random points. :}

Sorry about the confusing of that API still being there, it should have been
removed as part of the initial SDK cleanup.

-- 
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] Layout resource: FWVGA vs. WVGA

2010-02-20 Thread Dianne Hackborn
No, there deliberately isn't.  At that level, you really shouldn't be
creating distinct layouts -- I'd strongly encourage you to design a layout
that can resize appropriately to adjust for the screen.  (long is to
distinguish between HVGA and large screens like WVGA/FWVGA).

Larger picture, you really should avoiding having layouts for different
screen sizes as much as possible.  You can already see with the number of
sizes we have that this is just not scalable: QVGA, HVGA, WVGA (both med and
high density), FWVGA (both med and high density), and of course both
portrait and landscape versions of all of those.  And in the future you
should expect even more varieties (wider screens, larger screens, maybe even
smaller screens).

Also for a given size -- say FWVGA -- there is not a guarantee of exactly
how much space you may have.  For example a device may have a slightly
smaller or larger status bar that impacts the space you have.

And then if you are taking user input, there is the whole impact of the soft
keyboard being displayed and thus reducing the space available for your UI
during that time.

So we strongly encourage that developers make use of the dynamic layout
manager in the framework to design their UI to adjust for the exact space
they have available.

On Sat, Feb 20, 2010 at 3:51 PM, freezy  wrote:

> Hello there,
>
> This seems like a simple problem to me, but I can't figure it out. I have a
> fullscreen layout that displays differently if the screen is taller (854
> instead of 800 pixels). I've tried putting the xml into
> layout-notlong-hdpi and layout-long-dpi respectively, but both my WVGA and
> FWVGA emulators go for the "long" version (as described in the doc).
>
> Is there any way to distinguish between the two besides using the
> deprecated -800x480/-854x480 qualifiers?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Layout resource: FWVGA vs. WVGA

2010-02-20 Thread freezy
Hello there,

This seems like a simple problem to me, but I can't figure it out. I have a
fullscreen layout that displays differently if the screen is taller (854
instead of 800 pixels). I've tried putting the xml into layout-notlong-hdpiand
layout-long-dpi respectively, but both my WVGA and FWVGA emulators go for
the "long" version (as described in the doc).

Is there any way to distinguish between the two besides using the deprecated
-800x480/-854x480 qualifiers?

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

2010-02-20 Thread Dianne Hackborn
On Fri, Feb 19, 2010 at 10:58 AM, jotobjects  wrote:

> What is the reason that a BroadcastReceiver would function differently
> depending on registration in Manifest vs. registerReceiver() ?
>

For broadcasts that are generated often and fairly continually, we don't
want to end up with a bunch of applications being launched each time they
are sent.

We also don't let applications register in their manifest for screen on off
for a similar reason -- we don't want to start having to launch a bunch of
apps each time the screen is turned on causing a noticeable delay.

-- 
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] MapView, can't focus, unfocus, refocus an overlayitem

2010-02-20 Thread Fabian Sturm
Hi,

I already posted that I have trouble unfocusing and refocusing an
overlayitem in a mapview. I now have added a bug report with a complete
example showing the problem. Maybe someone can spot the problem in the
code or in the mapview?

http://code.google.com/p/android/issues/detail?id=6752

Thanks a lot, Fabian

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


[android-developers] .classroot file missing

2010-02-20 Thread Ilan
I'm trying to build and debug with eclipse but the .classroot file is
missing from the build. The development/ide/eclipse is folder is
empty.

Any help will be appreciated.
Cheers,
Ilan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 close an activity when the user clicks on home button

2010-02-20 Thread Achanta
Thankyou,

I needed finishTaskonLaunch as that is more suitable than
clearTaskOnLaunch for my case as I need to close the activity itself
which I am opening in a separate task.

On Feb 20, 10:56 am, intbt  wrote:
> it may be as simple as adding
>
> android:clearTaskOnLaunch="true"
>
> in your Manifest under the main activity tag to re-initialize after
> returning to Home screen.
>
> intbt
>
> On Feb 20, 4:54 am, Mark Murphy  wrote:
>
> > Achanta wrote:
> > > But since I started trying to log everything to see the activity life
> > > cycle, what I observed is that onStop method is not actually being
> > > called when I click on home button.
>
> > :: blink, blink ::
>
> > > Its being called as soon as i open
> > > my app again, which is not how I wanted it to do. The locationUpdates
> > > should stop the moment the user hits home button.
>
> > I just tried it on an app I'm working on (Android 2.1), and onStop() was
> > called at the point I pressed the HOME button.
>
> > Are you doing anything unusual in your manifest vis a via
> > android:launchMode or similar settings?
>
> > > The other thing is that I expected my stack to be as it is and as soon
> > > as I open my app after hitting on home button, the activity which I
> > > was previously in will be opened. But it restarted the app itself.
>
> > > This is what I observed in my app.
> > > Say I have a main activity A and another Activity B.
> > > I come to Activity B from Activity A.
> > > Then I click on home button.
> > > It closes the app but does not yet call onStop on B.
> > > Now I open my app and it now calls onStop on Activity B.
> > > It starts Activity A again.
> > > Now only when I click on button for activity B, it calls onRestart
> > > method on Activity B.
>
> > I just tried it with this same scenario (Activity A -> Activity B ->
> > HOME), and again, onStop() was called at the point I pressed HOME.
>
> > > So am I doing something wrong or is it supposed to work in that way or
> > > is it a bug?
>
> > Well, there appears to be something afoot either with your app or with
> > your environment. onStop(), at least as of Android 2.1, seems to behave
> > as documented for fairly ordinary stuff. Mind you that my test code does
> > not mess with android:launchMode or flags on activity starting or
> > whatever, so if you are, that's something to experiment with.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Development Wiki:http://wiki.andmob.org
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 close an activity when the user clicks on home button

2010-02-20 Thread Achanta

> I just tried it on an app I'm working on (Android 2.1), and onStop() was
> called at the point I pressed the HOME button.

I am using Android 1.6 as I need to support all the phones which are
working on that version also. And in this version or atleast for my
situation its not working so.

>
> Are you doing anything unusual in your manifest vis a via
> android:launchMode or similar settings?
Yes I was using launchMode=singleTask. I actually wanted
singleInstance but somehow Voice recognizer is giving a connection
problem when I use singleInstance.

So just to see if it is working in the way you suggested, I tried
removing all the launchMode etc in manifest and just left the activity
name and label. This time onStop method or the onRestart method are
never ever called.

But these are being called when I set finishTaskOnLaunch to true in
the manifest.

Thank you anyway for the help and the suggestions. I atleast got it to
work to the most extent if not stopping the updates and the activity
on clicking home button.
>
> > The other thing is that I expected my stack to be as it is and as soon
> > as I open my app after hitting on home button, the activity which I
> > was previously in will be opened. But it restarted the app itself.
>
> > This is what I observed in my app.
> > Say I have a main activity A and another Activity B.
> > I come to Activity B from Activity A.
> > Then I click on home button.
> > It closes the app but does not yet call onStop on B.
> > Now I open my app and it now calls onStop on Activity B.
> > It starts Activity A again.
> > Now only when I click on button for activity B, it calls onRestart
> > method on Activity B.
>
> I just tried it with this same scenario (Activity A -> Activity B ->
> HOME), and again, onStop() was called at the point I pressed HOME.
>
> > So am I doing something wrong or is it supposed to work in that way or
> > is it a bug?
>
> Well, there appears to be something afoot either with your app or with
> your environment. onStop(), at least as of Android 2.1, seems to behave
> as documented for fairly ordinary stuff. Mind you that my test code does
> not mess with android:launchMode or flags on activity starting or
> whatever, so if you are, that's something to experiment with.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org

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

2010-02-20 Thread Angel Cruz
Is this still true if payments are made with PayPal?  I am new to this
field, and so forgive me if the question is naive.

Even though this is a nuisance as some of you responded, this is still
unacceptable (theft is theft).



On Sat, Feb 20, 2010 at 12:29 PM, snctln  wrote:

>
>
> On Feb 20, 1:56 pm, Streets Of Boston  wrote:
> > Relax!!!
> >
> > It happened to me too a few times. It sucks, but this is just the cost
> > of doing business. And it's in the Android Market agreement that you
> > accepted.
>
> Exactly my thoughts.  It sucks, i get one about once a month, so maybe
> about a dozen or so since the market opened.  It is just the cost of
> doing business on the Android Market.  I never really considered that
> it might be due to stolen cards I just always assumed that it was more
> of a case where the customer looks at their credit card statements and
> sees "GOOGLE *SNCTLNSOFT" and doesn't realize that it was an Android
> Market purchase so they call the bank and ask for a chargeback.
>
> However it happens it definitely sucks, especially the first time you
> get one, but in the end it is just a fraction of what I bring in every
> day form the market so I try not to get too caught up with it.
>
> ---Sean Catlin
> www.snctln.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2010-02-20 Thread snctln


On Feb 20, 1:56 pm, Streets Of Boston  wrote:
> Relax!!!
>
> It happened to me too a few times. It sucks, but this is just the cost
> of doing business. And it's in the Android Market agreement that you
> accepted.

Exactly my thoughts.  It sucks, i get one about once a month, so maybe
about a dozen or so since the market opened.  It is just the cost of
doing business on the Android Market.  I never really considered that
it might be due to stolen cards I just always assumed that it was more
of a case where the customer looks at their credit card statements and
sees "GOOGLE *SNCTLNSOFT" and doesn't realize that it was an Android
Market purchase so they call the bank and ask for a chargeback.

However it happens it definitely sucks, especially the first time you
get one, but in the end it is just a fraction of what I bring in every
day form the market so I try not to get too caught up with it.

---Sean Catlin
www.snctln.com

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


[android-developers] Re: Advice on Swipe Direction and Velocity

2010-02-20 Thread skink


On Feb 20, 8:56 pm, joshbeck  wrote:
> Actually, I'm working with openGL. So, it looks like
> I'm supposed to set up a GestureListener and override
> onFling to increment Y or X.

yes, this is the easiest way

> Then use Y and X from there to rotate my
> object and
> slow it down and stop it using a math function.
>

no, Scroller does it for you, it has even fling method so you can
easly pass params from gesture listener to start it

pskink

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

2010-02-20 Thread skink


On Feb 20, 8:28 pm, joshbeck  wrote:
> Ok, I've done some reading and I have a working theory:
>
> It's done using something this:
>
>   @Override
>         public boolean onKeyDown(int keyCode, KeyEvent event) {
>                 switch (keyCode)
> {
>
>         case KeyEvent.KEYCODE_DPAD_DOWN:
>              (increment static value X by Y );
>              break;
>
> {
>
> This way a faster swipe results in a higher value?
>
> Sound logical or am I off?
>
> Thanks again,
> Josh Beck
>
> On Feb 20, 12:52 pm, joshbeck  wrote:
>
>
>
> > Hello all,
>
> > I'm looking for a starting point on this:
>
> > Here's a good example:
> >    -When you create a 'ListView', as the user swipes up or down the
> > list scrolls
> > in accordance with how fast the user swiped. Give it a fast swipe, and
> > the list scrolls farther, faster.
>
> > Same thing is true within the web browser.
>
> > Now, I've downloaded the native source code for OS.  So, I have that
> > as a resource to
> > poke around and see exactly how this is being accompished natively.
>
> > Question:
>
> > Is swipe direction/velocity documented anywhere. --Example code would
> > be helpful.
>
> > I'd like to start by applying an OnTouchEvent(); to a 2D canvas and
> > simply rotate
> > the canvas based on swipe velocity.
>
> > Any tips are appreciated.
>
> > Thanks,
> > Josh Beck

i haven't seen sources but what you posted is all about key events not
touch events

i think that list view's swipe model is based on gesture detector &
scroller - at least it could be the easiest way to implement it

pskink

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

2010-02-20 Thread joshbeck
Actually, I'm working with openGL. So, it looks like
I'm supposed to set up a GestureListener and override
onFling to increment Y or X. Then use Y and X from there to rotate my
object and
slow it down and stop it using a math function.



On Feb 20, 1:28 pm, joshbeck  wrote:
> Ok, I've done some reading and I have a working theory:
>
> It's done using something this:
>
>   @Override
>         public boolean onKeyDown(int keyCode, KeyEvent event) {
>                 switch (keyCode)
> {
>
>         case KeyEvent.KEYCODE_DPAD_DOWN:
>              (increment static value X by Y );
>              break;
>
> {
>
> This way a faster swipe results in a higher value?
>
> Sound logical or am I off?
>
> Thanks again,
> Josh Beck
>
> On Feb 20, 12:52 pm, joshbeck  wrote:
>
>
>
> > Hello all,
>
> > I'm looking for a starting point on this:
>
> > Here's a good example:
> >    -When you create a 'ListView', as the user swipes up or down the
> > list scrolls
> > in accordance with how fast the user swiped. Give it a fast swipe, and
> > the list scrolls farther, faster.
>
> > Same thing is true within the web browser.
>
> > Now, I've downloaded the native source code for OS.  So, I have that
> > as a resource to
> > poke around and see exactly how this is being accompished natively.
>
> > Question:
>
> > Is swipe direction/velocity documented anywhere. --Example code would
> > be helpful.
>
> > I'd like to start by applying an OnTouchEvent(); to a 2D canvas and
> > simply rotate
> > the canvas based on swipe velocity.
>
> > Any tips are appreciated.
>
> > Thanks,
> > Josh Beck

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

2010-02-20 Thread Streets Of Boston
Relax!!!

It happened to me too a few times. It sucks, but this is just the cost
of doing business. And it's in the Android Market agreement that you
accepted.

If you were to handle the credit-card transations yourself, you would
be complaining much louder.
Just do a google search for 'chargeback' on credit cards and see what
small businesses (e.g. convenient stores, pop-and-moms stores) think
about this issue. Compared to them, this $3 is peanuts.

Google handles credit card transactions and checks for fraud and such.
This is not full-proof, but if you would have to deal with it
yourself... not fun.

For purchases of $10 or more, Google will initiate an investigation.
But under that, you'll get an automatic $3 chargeback.

Basically what happened to you is that your app has been 'stolen'
twice. Again, it sucks and i do hope that it won't happen again to you
(or me or anybody else). You've been victim of a petty crime...

On Feb 20, 8:49 am, Greg Donald  wrote:
> Why do I incur a $3.00 Marketplace chargeback when someone else steals
> a credit card and buys my app?
>
> I'm not the one who stole the credit card, WTF?  That's insane.  I
> just lost $6.00 on two bogus sales.  That's a really significant when
> I'm only selling apps at $0.99/app.
>
> Broken Marketplace stats since fucking December, now I'm being raped
> by Google over some petty thieves.
>
> This is messed up.
>
> --
> Greg Donald
> destiney.com | gregdonald.com

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


[android-developers] Re: Advice on Swipe Direction and Velocity

2010-02-20 Thread joshbeck
Ok, I've done some reading and I have a working theory:

It's done using something this:

  @Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode)
{

case KeyEvent.KEYCODE_DPAD_DOWN:
 (increment static value X by Y );
 break;

{

This way a faster swipe results in a higher value?

Sound logical or am I off?

Thanks again,
Josh Beck

On Feb 20, 12:52 pm, joshbeck  wrote:
> Hello all,
>
> I'm looking for a starting point on this:
>
> Here's a good example:
>    -When you create a 'ListView', as the user swipes up or down the
> list scrolls
> in accordance with how fast the user swiped. Give it a fast swipe, and
> the list scrolls farther, faster.
>
> Same thing is true within the web browser.
>
> Now, I've downloaded the native source code for OS.  So, I have that
> as a resource to
> poke around and see exactly how this is being accompished natively.
>
> Question:
>
> Is swipe direction/velocity documented anywhere. --Example code would
> be helpful.
>
> I'd like to start by applying an OnTouchEvent(); to a 2D canvas and
> simply rotate
> the canvas based on swipe velocity.
>
> Any tips are appreciated.
>
> Thanks,
> Josh Beck

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

2010-02-20 Thread skink


On Feb 20, 7:52 pm, joshbeck  wrote:
> Hello all,
>
> I'm looking for a starting point on this:
>
> Here's a good example:
>    -When you create a 'ListView', as the user swipes up or down the
> list scrolls
> in accordance with how fast the user swiped. Give it a fast swipe, and
> the list scrolls farther, faster.
>
> Same thing is true within the web browser.
>
> Now, I've downloaded the native source code for OS.  So, I have that
> as a resource to
> poke around and see exactly how this is being accompished natively.
>
> Question:
>
> Is swipe direction/velocity documented anywhere. --Example code would
> be helpful.
>
> I'd like to start by applying an OnTouchEvent(); to a 2D canvas and
> simply rotate
> the canvas based on swipe velocity.
>
> Any tips are appreciated.
>
> Thanks,
> Josh Beck

hi,

see Scroller class

pskink

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

2010-02-20 Thread jotobjects

On Feb 19, 2:11 pm, jotobjects  wrote:
> // 2-This does not work - exception is "can't find Activity to handle
> Intent"
> Intent intent = new Intent(Intent.ACTION_VIEW);
> intent.addCategory("foo.singletask.intent.category.FOO");

Fixed that problem - if a category is listed in the 
then CATEGORY_DEFAULT is required to also to be listed (not sure
why).  This is the intent_filter that works -





RECAPPING THE ORIGINAL SUBJECT:

+ For launchMode=singleTask if there is an intent_filter in the
manifest the task stack is always cleared after returning to Home and
re-launching (returns to main activity instead of last activity).

+ For launchMode=standard re-launch from Home instead returns to last
activity in task (as expected).

+ If there is no intent_filter listed then even with
launchMode=singleTask re-launch from Home returns to the last activity
in the task.

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


[android-developers] Advice on Swipe Direction and Velocity

2010-02-20 Thread joshbeck
Hello all,

I'm looking for a starting point on this:

Here's a good example:
   -When you create a 'ListView', as the user swipes up or down the
list scrolls
in accordance with how fast the user swiped. Give it a fast swipe, and
the list scrolls farther, faster.

Same thing is true within the web browser.

Now, I've downloaded the native source code for OS.  So, I have that
as a resource to
poke around and see exactly how this is being accompished natively.

Question:

Is swipe direction/velocity documented anywhere. --Example code would
be helpful.

I'd like to start by applying an OnTouchEvent(); to a 2D canvas and
simply rotate
the canvas based on swipe velocity.

Any tips are appreciated.

Thanks,
Josh Beck

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


[android-developers] Playing a music (mp3) file over the web using an intent

2010-02-20 Thread Jason
Hi,

I'm trying to make it so that the default music player application on
the cell phone will launch and play an mp3 at a web address.

If I do this:

Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("http://www.chillinglizard.com/
KROQ_test/zak.mp3");

intent.setData(uri);

startActivity(intent);

First the browser will launch and then the browser will launch the
media player.  But I don't want to launch the browser at all, I would
like the media player to launch only.

So, I also tried

Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("http://www.chillinglizard.com/
KROQ_test/zak.mp3");

intent.setData(uri);
intent.setAction(AUDIO_SERVICE);
intent.setType("audio/*");

startActivity(intent);

But when I do this, nothing happens.

Anyone know how to get the media player to launch directly?  It might
have to start downloading the mp3 to the sdcard and then launch the
media player and have it run off the local copy on the sdcard. But if
I did that, then I would have to handle all the buffering instead of
letting the media player do 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


Re: [android-developers] Re: https connection problem

2010-02-20 Thread Michael Rueger

On 2/20/2010 6:53 PM, jotobjects wrote:

What actual change did you make to the server?  The link you provided
is for MSIE client connections so it is not clear what change you made
for Android client connections.


Oh, right, I actually meant to post that using
ssl-unclean-shutdown

is enough to make it work.
In my case I added
SetEnvIf User-Agent ".*test-ssl.*" ssl-unclean-shutdown

as the test program I posted used that as the agent string.


Also have you created an Android bug with this information?  Your case


Good point, will do.


should be reproducible if you provide details about the server version
and configuration.


Apache/2.2.8 (Ubuntu)


Michael

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


[android-developers] Re: How to close an activity when the user clicks on home button

2010-02-20 Thread intbt
it may be as simple as adding

android:clearTaskOnLaunch="true"

in your Manifest under the main activity tag to re-initialize after
returning to Home screen.

intbt



On Feb 20, 4:54 am, Mark Murphy  wrote:
> Achanta wrote:
> > But since I started trying to log everything to see the activity life
> > cycle, what I observed is that onStop method is not actually being
> > called when I click on home button.
>
> :: blink, blink ::
>
> > Its being called as soon as i open
> > my app again, which is not how I wanted it to do. The locationUpdates
> > should stop the moment the user hits home button.
>
> I just tried it on an app I'm working on (Android 2.1), and onStop() was
> called at the point I pressed the HOME button.
>
> Are you doing anything unusual in your manifest vis a via
> android:launchMode or similar settings?
>
> > The other thing is that I expected my stack to be as it is and as soon
> > as I open my app after hitting on home button, the activity which I
> > was previously in will be opened. But it restarted the app itself.
>
> > This is what I observed in my app.
> > Say I have a main activity A and another Activity B.
> > I come to Activity B from Activity A.
> > Then I click on home button.
> > It closes the app but does not yet call onStop on B.
> > Now I open my app and it now calls onStop on Activity B.
> > It starts Activity A again.
> > Now only when I click on button for activity B, it calls onRestart
> > method on Activity B.
>
> I just tried it with this same scenario (Activity A -> Activity B ->
> HOME), and again, onStop() was called at the point I pressed HOME.
>
> > So am I doing something wrong or is it supposed to work in that way or
> > is it a bug?
>
> Well, there appears to be something afoot either with your app or with
> your environment. onStop(), at least as of Android 2.1, seems to behave
> as documented for fairly ordinary stuff. Mind you that my test code does
> not mess with android:launchMode or flags on activity starting or
> whatever, so if you are, that's something to experiment with.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org

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

2010-02-20 Thread jotobjects
What actual change did you make to the server?  The link you provided
is for MSIE client connections so it is not clear what change you made
for Android client connections.

Also have you created an Android bug with this information?  Your case
should be reproducible if you provide details about the server version
and configuration.

On Feb 12, 2:02 pm, Michael Rueger  wrote:
> On 2/12/2010 6:27 PM, social hub wrote:
>
> > What did u see in wireshark. is this your test server. do you have any
> > specific details about the server side
>
> ok, the idea with the server side pointed me in the right direction.
> Sort of...
>
> I found notes about connection problems with older IE versions:
>
> http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#msie
>
> So adding these settings to my test server seems to solve the problem.
>
> It still looks like a bug in the Android SSL stack to me.
>
> Thanks again for helping out!
>
> 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: Intent action for network events in android sdk

2010-02-20 Thread jotobjects
Thanks for that information.  These are the actions documented with
that behavior -

ACTION_BATTERY_CHANGED
ACTION_CONFIGURATION_CHANGED
ACTION_TIME_TICK

On Feb 19, 11:00 am, Mark Murphy  wrote:
> jotobjects wrote:
> > On Feb 19, 4:38 am, Mark Murphy  wrote:
> >> You can try registering the BroadcastReceiver as part of some other
> >> component (Activity, Service) via registerReceiver(). Not all broadcast
> >> Intents work with manifest-registered receivers.
>
> > What is the reason that a BroadcastReceiver would function differently
> > depending on registration in Manifest vs. registerReceiver() ?
>
> For example, for ACTION_BATTERY_CHANGED, Android does not want to start
> up a whole 'nuther process just because the battery level shifted.
> Hence, to receive that broadcast Intent, you need to use registerReceiver().
>
> Also, ACTION_BOOT_COMPLETED only really works from a manifest-registered
> receiver, because by the time your code is in position to call
> registerReceiver(), the boot is long gone.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

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


[android-developers] Re: Landscape orientation of Intent

2010-02-20 Thread Tatyana Ulyanova
Hello, Lipinski!

I'm very glad that my advise helps you :)

As for your question about Menu orientation: actually Menu
construction doesn't provide orientation, so I think it would use
orientation of activity that it belongs to. It's my opinion on this
question. But I didn't dig it this direction. Maybe there are some API
to provide rotation of activity without set it as landscape, for
example:
http://developer.android.com/reference/android/hardware/SensorManager.html
(chapter remapCoordinateSystem() method)

Hope it helps!

On 19 Лют, 21:00, lipinski  wrote:
> Tatyana - Thanks, that seems to have worked.
>
> I didn't think sensor would be necessary as I thought that was the
> default, but the Activity seemed to inherit the attribute of the root
> Activity.
>
> Here's one more challenge - Don't know if it's possible:
> Can I have an Activity with screenOrientation="landscape", but have
> the Options Menu for that Activity still be displayed according to
> sensor orientation?
> (i.e., user has device in portrait, Activity shows still in landscape,
> but when they press Menu, it is at the "bottom" rather than on the
> "left")
>
> On Feb 19, 10:31 am, Tatyana Ulyanova  wrote:
>
> > Thank You very much, Mark :)
>
> > To lipinski:
> > Try to specify in your second (non-main activity) orientation to
> > sensor:
> > android:screenOrientation="sensor".
> > Hope it helps.
> > Read more here:http://www.djvoo.net/d/Android(chapter35 about
> > activity orientation)

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

2010-02-20 Thread Tatyana Ulyanova
Hello, Lipinski!

I'm very glad that my advise helps you :)

As for your question about Menu orientation: actually Menu
construction doesn't provide orientation, so I think it would use
orientation of activity that it belongs to. It's my opinion on this
question. But I didn't dig it this direction. Maybe there are some API
to provide rotation of activity without set it as landscape, for
example:
http://developer.android.com/reference/android/hardware/SensorManager.html
(chapter remapCoordinateSystem() method)

Hope it helps!

On 19 Лют, 21:00, lipinski  wrote:
> Tatyana - Thanks, that seems to have worked.
>
> I didn't think sensor would be necessary as I thought that was the
> default, but the Activity seemed to inherit the attribute of the root
> Activity.
>
> Here's one more challenge - Don't know if it's possible:
> Can I have an Activity with screenOrientation="landscape", but have
> the Options Menu for that Activity still be displayed according to
> sensor orientation?
> (i.e., user has device in portrait, Activity shows still in landscape,
> but when they press Menu, it is at the "bottom" rather than on the
> "left")
>
> On Feb 19, 10:31 am, Tatyana Ulyanova  wrote:
>
> > Thank You very much, Mark :)
>
> > To lipinski:
> > Try to specify in your second (non-main activity) orientation to
> > sensor:
> > android:screenOrientation="sensor".
> > Hope it helps.
> > Read more here:http://www.djvoo.net/d/Android(chapter35 about
> > activity orientation)

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

2010-02-20 Thread Joshua Frank
I hope that they are not using user retention rates. That wouldn't be
fair for every one who updated in mid December and lost all of their
active user stats. One of my apps is still down 35%.

On Sat, Feb 20, 2010 at 11:04 AM, polyclefsoftware  wrote:
> There was definitely a change in the ranking algorithm. Two of my apps
> had been stable at their respective positions for ~2 weeks and
> switched positions, along with most other apps in my category, some
> time in the past couple of days.
>
> If I had to guess, it looks like the new ranking algorithm weights
> customer ratings higher than before, and possibly also user retention.
> If you look at the top 50 paid games, for example, you won't find any
> rated below 4.5 stars, until you get to around #49. I don't believe
> this was the case last week. If I'm right, I guess this is generally a
> good change, although if you have the bad luck of being targeted with
> 1-star ratings by capricious users, it might not be.
>
> On Feb 19, 3:44 am, Mr Pants  wrote:
>> Hi
>>
>> Erm did something happen to therankingsystem today? My app seems to
>> have shot up a bunch of places in it's category. Obviously I'm not
>> complaining - just curious:)
>>
>> Anyone else noticed anything?
>>
>> Thanks
>>
>> Ps - I'm in UK (not sure if this makes a difference)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Joshua Frank
http://www.joshfrank.com
frankjos...@gmail.com
314-882-8585

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 configure list view so that it can put focus to a focusable item within a list item

2010-02-20 Thread n179911
Hi,

Can you please tell me how can I configure list view so that it can
put focus to a focusable item within a list item?
Android by default puts focus on the whole list item. Can I change it
so that it can put focus to a focusable item within that item (e.g. a
button)?

Thank you.

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


[android-developers] Re: HttpPost works with Wifi, not with Mobile...

2010-02-20 Thread p1erstef
No, I'm not using https, I'm using http.

On 20 fév, 18:07, Michael Rueger  wrote:
> On 1/3/2010 6:52 PM, p1erstef wrote:
>
> > Any idea of where the problem could come from?
>
> are you using https?
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> http://groups.google.com/group/android-developers/msg/7a6752d0e77334c...
>
> 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] HttpPost works with Wifi, not with Mobile...

2010-02-20 Thread Michael Rueger

On 1/3/2010 6:52 PM, p1erstef wrote:


Any idea of where the problem could come from?


are you using https?

http://groups.google.com/group/android-developers/browse_thread/thread/da53e83f48ff7778?hl=en

http://groups.google.com/group/android-developers/msg/7a6752d0e77334c9?hl=en


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: Android Market Changed ranking

2010-02-20 Thread polyclefsoftware
There was definitely a change in the ranking algorithm. Two of my apps
had been stable at their respective positions for ~2 weeks and
switched positions, along with most other apps in my category, some
time in the past couple of days.

If I had to guess, it looks like the new ranking algorithm weights
customer ratings higher than before, and possibly also user retention.
If you look at the top 50 paid games, for example, you won't find any
rated below 4.5 stars, until you get to around #49. I don't believe
this was the case last week. If I'm right, I guess this is generally a
good change, although if you have the bad luck of being targeted with
1-star ratings by capricious users, it might not be.

On Feb 19, 3:44 am, Mr Pants  wrote:
> Hi
>
> Erm did something happen to therankingsystem today? My app seems to
> have shot up a bunch of places in it's category. Obviously I'm not
> complaining - just curious:)
>
> Anyone else noticed anything?
>
> Thanks
>
> Ps - I'm in UK (not sure if this makes a difference)

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

2010-02-20 Thread p1erstef
Hi Kumar,

I still got the problem mentioned above...

I don't see how I could check the response status line:
httpclient.execute(httppost) throws an IOException, so it doesn't
return any response...

Here are some logcat (between the start of HttpPost till the exception
is raised):

02-20 16:50:56.525: DEBUG/NetworkLocationProvider(70):
onDataConnectionStateChanged 8
02-20 16:50:56.525: DEBUG/MobileDataStateTracker(70): default Received
state= CONNECTED, old= CONNECTED, reason= (unspecified), apnTypeList=
default,supl
02-20 16:50:56.535: DEBUG/MobileDataStateTracker(70): replacing old
mInterfaceName (rmnet0) with rmnet0 for supl
02-20 16:50:58.265: DEBUG/dalvikvm(3777): GC freed 5464 objects /
485296 bytes in 63ms
02-20 16:51:01.545: DEBUG/dalvikvm(3777): GC freed 10416 objects /
702824 bytes in 70ms
02-20 16:51:05.285: DEBUG/dalvikvm(145): GC freed 1257 objects / 93144
bytes in 137ms
02-20 16:51:07.015: DEBUG/dalvikvm(3777): GC freed 468 objects /
490384 bytes in 81ms

Thanks,

Pierre


On 4 jan, 05:25, Kumar Bibek  wrote:
> Post some logcat log so that it will be clearer.
>
> Check the reponse status line. That will provide more information.
>
> Thanks and Regards,
> Kumar Bibek
>
> http://tech-droid.blogspot.com
>
> On Jan 3, 10:52 pm, p1erstef  wrote:
>
> > Hi all,
>
> > I'm trying to use HttpPost to send data from an android device to a
> > server.
> > It works great with a Wifi connection, but I get the IOException "The
> > target server failed to respond" with a Mobile connection (3G, Edge,
> > etc.). It doesn't seem to be a timeout problem (I set it to 90s).
> > The use of HttpGet works perfectly with both Wifi and Mobile
> > connection...
> > Any idea of where the problem could come from?
>
> > Thanks!

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


Re: [android-developers] GPS code works in HTC machines but fails in MOTO's

2010-02-20 Thread Mark Murphy
yidongsoft wrote:
> My code to obtain GPS coordinate works perfect in HTC cells. But I
> find it doesn't work in Moto Droid. I debug it and find eveything
> seems fine. But the coordinate never obtained.



> No error message, No fatal return. Every things invoked well, but
> onLocationChanged() never be run, getLastKnownLocation() always return
> null - No GPS information get at all. I check all the settings.
> GPS device is opened and every thing is OK. The same code works in my
> HTC magic, G2.

I can tell you that this code works on a DROID:

http://github.com/commonsguy/cw-android/tree/master/Internet/Weather/

as does this code:

http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/

and this code:

http://github.com/commonsguy/cw-advandroid/tree/master/WebView/GeoWeb1/

and this code:

http://github.com/commonsguy/cw-advandroid/tree/master/WebView/GeoWeb2/

In terms of where things may be going wrong in your code, it is
difficult to say. I have managed to write a whole lot of Android code
without having to touch a Looper, so I'd start there.

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

Android App Developer Training: http://commonsware.com/training

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


[android-developers] GPS code works in HTC machines but fails in MOTO's

2010-02-20 Thread yidongsoft
My code to obtain GPS coordinate works perfect in HTC cells. But I
find it doesn't work in Moto Droid. I debug it and find eveything
seems fine. But the coordinate never obtained. Please read my code
first:

/// defining listener
LocationListener locationListener = new LocationListener() {

@Override
public void onStatusChanged(String provider, int status, Bundle
extras) {
}

@Override
public void onProviderEnabled(String provider) {}

@Override
public void onProviderDisabled(String provider) {}

@Override
public void onLocationChanged(Location location) {
stateGPS = PR.Types.SERVICE_ACTION_STATE_UPDATED;
currentPosition.latitude = location.getLatitude();
currentPosition.longitude = location.getLongitude();

locationManager.removeUpdates(locationListener);
}
};

.
//updating location information
boolean gpsEnabled = false;
if 
(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))
{
new Handler(getMainLooper()).post(new Runnable() {

public void run() {

locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
0, 0, locationListener);
}
});

gpsEnabled = true;
}

if
(locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER))
{
new Handler(getMainLooper()).post(new Runnable() {

public void run() {

locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
0, 0, locationListener);
}
});

gpsEnabled = true;
}
.
//fetching coordinate
Location l = null;
if
(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
l =
locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
}

if (l == null &&
locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
l =
locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
}

locationManager.removeUpdates(locationListener);

if (l == null) {
//gps unknown
stateGPS = 
PR.Types.SERVICE_ACTION_STATE_OTHER;
return;
} else {
currentPosition.latitude = 
l.getLatitude();
currentPosition.longitude = 
l.getLongitude();
stateGPS = 
PR.Types.SERVICE_ACTION_STATE_UPDATED;
}


No error message, No fatal return. Every things invoked well, but
onLocationChanged() never be run, getLastKnownLocation() always return
null - No GPS information get at all. I check all the settings.
GPS device is opened and every thing is OK. The same code works in my
HTC magic, G2.

Please help me. 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] Re: Disable RadioGroup ?

2010-02-20 Thread Atif Gulzar
Thanks, Yes I can treat individual buttons. But just wondering why I can't
operate on RadioGroup. Is it some bug or I am missing something.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Fri, Feb 19, 2010 at 11:42 PM, DonFrench  wrote:

> Or you could make them invisible but that isn't the same thing as just
> disabling them of course.
>
> On Feb 19, 4:39 am, Mark Murphy  wrote:
> > Atif Gulzar wrote:
> > > Hi
> >
> > > How can I disable RadioGroup, means all the radio buttons should e
> > > disabled. I already tried setEnabled (false) and setClickable(false)
> but
> > > this did not help.
> >
> > Iterate over the RadioButtons and disable them, I imagine.
> >
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com|
> http://twitter.com/commonsguy
> >
> > _Android Programming Tutorials_ Version 1.0 In Print!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] $3.00 Marketplace chargeback ?!?!

2010-02-20 Thread Greg Donald
Why do I incur a $3.00 Marketplace chargeback when someone else steals
a credit card and buys my app?

I'm not the one who stole the credit card, WTF?  That's insane.  I
just lost $6.00 on two bogus sales.  That's a really significant when
I'm only selling apps at $0.99/app.

Broken Marketplace stats since fucking December, now I'm being raped
by Google over some petty thieves.

This is messed up.


-- 
Greg Donald
destiney.com | gregdonald.com

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


[android-developers] free registration

2010-02-20 Thread anitha raj
Social Networking has been effectively used in reaching the goal of
bringing down the prices of costly items through volume shopping. Go
shopping with  http://www.shoppingreps.com?SourceId=1243
You can earn online, NO INVESTMENT, NO DEPOSIT, NO MLM and NO JOINING
FEES! http://www.shoppingreps.com?SourceId=1243  DON'T miss this
opportunity, join today for free, and earn more without paying single
rupees...NO SCAM ALL THE BEST

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


[android-developers] free registration

2010-02-20 Thread anitha raj
Social Networking has been effectively used in reaching the goal of
bringing down the prices of costly items through volume shopping. Go
shopping with  http://www.shoppingreps.com?SourceId=1243
You can earn online, NO INVESTMENT, NO DEPOSIT, NO MLM and NO JOINING
FEES! http://www.shoppingreps.com?SourceId=1243  DON'T miss this
opportunity, join today for free, and earn more without paying single
rupees...NO SCAM ALL THE BEST

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


[android-developers] free registration

2010-02-20 Thread anitha raj
Social Networking has been effectively used in reaching the goal of
bringing down the prices of costly items through volume shopping. Go
shopping with  http://www.shoppingreps.com?SourceId=1243
You can earn online, NO INVESTMENT, NO DEPOSIT, NO MLM and NO JOINING
FEES! http://www.shoppingreps.com?SourceId=1244  DON'T miss this
opportunity, join today for free, and earn more without paying single
rupees...NO SCAM ALL THE BEST

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


[android-developers] free registration

2010-02-20 Thread anitha raj
Social Networking has been effectively used in reaching the goal of
bringing down the prices of costly items through volume shopping. Go
shopping with  http://www.shoppingreps.com?SourceId=1244
You can earn online, NO INVESTMENT, NO DEPOSIT, NO MLM and NO JOINING
FEES! http://www.shoppingreps.com?SourceId=1244  DON'T miss this
opportunity, join today for free, and earn more without paying single
rupees...NO SCAM ALL THE BEST

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


Re: [android-developers] Re: How to close an activity when the user clicks on home button

2010-02-20 Thread Mark Murphy
Achanta wrote:
> But since I started trying to log everything to see the activity life
> cycle, what I observed is that onStop method is not actually being
> called when I click on home button. 

:: blink, blink ::

> Its being called as soon as i open
> my app again, which is not how I wanted it to do. The locationUpdates
> should stop the moment the user hits home button.

I just tried it on an app I'm working on (Android 2.1), and onStop() was
called at the point I pressed the HOME button.

Are you doing anything unusual in your manifest vis a via
android:launchMode or similar settings?

> The other thing is that I expected my stack to be as it is and as soon
> as I open my app after hitting on home button, the activity which I
> was previously in will be opened. But it restarted the app itself.
> 
> This is what I observed in my app.
> Say I have a main activity A and another Activity B.
> I come to Activity B from Activity A.
> Then I click on home button.
> It closes the app but does not yet call onStop on B.
> Now I open my app and it now calls onStop on Activity B.
> It starts Activity A again.
> Now only when I click on button for activity B, it calls onRestart
> method on Activity B.

I just tried it with this same scenario (Activity A -> Activity B ->
HOME), and again, onStop() was called at the point I pressed HOME.

> So am I doing something wrong or is it supposed to work in that way or
> is it a bug?

Well, there appears to be something afoot either with your app or with
your environment. onStop(), at least as of Android 2.1, seems to behave
as documented for fairly ordinary stuff. Mind you that my test code does
not mess with android:launchMode or flags on activity starting or
whatever, so if you are, that's something to experiment with.

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

Android Development Wiki: http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Question on modifying application framework + importing to the Windows SDK

2010-02-20 Thread Mark Murphy
RCP2278 wrote:
> Hi, can anyone help me?

Questions like yours are better for [android-porting], or possibly
[android-framework]. This list is mostly for SDK-level development.

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

_Android Programming Tutorials_ Version 1.9 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] binding widgets with AppWidgetManager.bindAppWidgetId

2010-02-20 Thread Deren
I've successfully built a small sample app where the user can add a
appwidget, using the AppWidgetPicker, using the action
AppWidgetManager.ACTION_APPWIDGET_PICK. When I do this, the
AppWidgetPicker takes care of binding my appwidget-id to a provider.
However, now I'd like to load some widgets without using the
AppWidgetPicker (for instance, maybe I want to restore the added
appwidgets when I restart the application or something). I've tried
the following code

ComponentName widget = new ComponentName("com.android.alarmclock",
"com.android.alarmclock.AnalogAppWidgetProvider");

int appWidgetId = mAppWidgetHost.allocateAppWidgetId();
mAppWidgetManager.bindAppWidgetId(appWidgetId, widget);

but it fails with a SecurityException, even though I've added



to my manifest file. Is this the way to do it? (using
AppWidgetManager.bindAppWidgetId). Im using the emulator, and android
2.1.

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


[android-developers] OnResume() of activity called when pressing the endcall key

2010-02-20 Thread techietone
hi all,
I run the camera app , and press the endcall key button , then i press
that button again .
from the logs I can see OnResume() of camera app called when turning
on the backlight.
Because of this behaviour , first the camera preview activity is shown
and then
the LOCKSCREEN comes up.

the problem here is i can see flicker in the lockscreen . More
precisely , it seems to be stretching,
and then stabilises.

can anybody provide some info in this regard


regards
techietone

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


[android-developers] TIPS FOR HEALTHY AND BEAUTY TIP

2010-02-20 Thread suu
HAI FRIEND...
I SIGN UP UR ADD..
PLS SIGNUP AND REGISTER  UR PROFILE...
IF U REGISTER  AND U GET RICH GIRLS AND BOYS

www.easyinternetmoney.50webs.com
www.softec35.blogspot.com
http://123maza.com/50/amaze21

 T H A N K  Y O U

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

2010-02-20 Thread syuta
hi,Bob.

thanks a lot!

It seems to be able to do.
i will try!

2010年2月20日2:44 Bob Kerns :
> 中村さん、
>
> TextView's setText method is declared to take a CharSequence, rather
> than simply a String. This (and many other places) do so, to allow you
> to use other types besides String.
>
> Specifically, SpannableString, which is like a String, but allows you
> to attach additional information, such as styles or URLs, to specific
> ranges of characters.
>
> For example, see src/com/example/android/apis/text/Link.java in the
> ApiDemo sample.
>
> On Feb 18, 5:10 pm, 中村修太  wrote:
>> Hi,all.
>>
>> I want to set Bold-style or TextColor one by one in TextView.
>> Can I do it?
>>
>> I thought use InputFilter, but the Class could not set style.(may be..)
>>
>> Please teach if it is good idea.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] relation between ViewRoot and View

2010-02-20 Thread sheng wang
Hi ,

Can any one give more information about ViewRoot and what's the relation
between viewroot and view?
I found a Viewroot  create a surface at its' constructor, which I think is
the real bitmap data goes to.  So I guess
 every view has it own viewroot, every view has a surface for drawing and
the surfaceflinger will finally blend all surfaces together, but I found
it's definitely wrong.

How view and viewroot cooperate is quite ambiguous to me. Any information
will be appreciated!

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