[android-developers] Re: Piracy Breakdown by Country

2010-08-28 Thread Peter Webb
I am also an Australian software developer.

I can state with absolute certainty that these figures are absolute
bullshit. 92% of apps running in Australia are not pirated. It is
absolutely ridiculous.

Anecdotally, as a developer I have sought our everybody I know with an
Android phone, maybe half a dozen techies and half a dozen "normal"
people. None of them are even aware of a pirate market in paid Android
apps. The chances of 12 people in a row being in  that 8% -
impossible.

More generally, my app is a live wallpaper. Here is an interesting
stat. My uninstall rate dropped by 20% when I included instructions
for how to run a live wallpaper. At least 20% of android market users
appear unfamiliar with how to run a Live Wallpaper. Yet the statistics
presented imply that 92% of Australians not only know how to install
pirate apps, but also do so. Sound plausible to you?

Australians are no more likely to pirate software than people in any
other developed country. 92% of Australian android phone users
obviously don't pirate android software. For that matter, 54% of
Austrians don't pirate software either, but whatever fraction it is
(I'm guessing a couple of percent at most), Australians and Austrians
aren't going to be that different.

The figures are clearly and obviously wrong. The most basic common
sense should tell you that.



On Aug 28, 3:58 pm, gosh  wrote:
> Hi Dave,
>
> Thanks for the stats - as disconcerting as they are.
>
> As an Australian software developer I was very disappointed to see
> Australia up top in the percentages on your scale of software pirates,
> wrt to your app - which I find hard to explain, subjectively or
> otherwise.
>
> I'll make a few points though (I'm assuming your figures are for your
> utility 'Screebl Pro', via your link):
>
> * Having some background in data analysis, I don't consider sample
> sizes under 300 to be statistically significant - which leaves you
> with 4 rows of data at this stage.
>
> * Going on your app, the US is the only place where Android is a big
> success thus far -  I do know that 'utility' programs are a bit
> 'techie' for most regular phone users, but I'm thinking percentages
> here.
>
> * Android phones are fairly few on the ground in Australia (in my
> limited experience with other Android owners - other owners have been
> either software developers/publishers or university students, many of
> whom are from overseas - many/most countries). That said, since the
> 'main' telco here (Telstra) began selling Android phones here in April
> 2010, some regular folk/mums-and-dads are now starting to buy them….
> i.e. The fact that australia is 4th in your list of overall downloads
> is very surprising to me, given the great lack of Google/Android-phone
> focus upon Australia - I thought it would be down around the NZ
> figures. Note: Most ads I've seen for Android phones here do 'not'
> even mention 'Android' at all (E.g. the recent ads for the Samsung
> i9000 Galaxy S ) - so I assume its either a perceived marketing
> negative, or its not worth the 'copy' space the single word would take
> up.
>
> * As a former president of the Australian Software Publishers
> Association, I know that Australians generally 'do' buy their software
> when its not open source - which is the main precursor to a country
> having a software industry. Its a part of the 'a fair go mate' ethos
> here - so Indy developers are likely to do well here - and do, given
> an avenue to market.
>
> * I do know that there are lots of software developers in Australia
> 'very pissed-off' with Google in that we are unable to 'sell' our
> programs in the Android Market (even though our customers can buy them
> from elsewhere) - e.g. I've had programs sitting here collecting dust
> for 12 months (yes, 365 days, one planetary orbit around the Sun [the
> one thats 93 million miles away] - no actions, and worse, no words
> about actions, from Google) come Tuesday this week 
> see:http://www.digitalfriend.org/blog/month2009-09.html- but that is
> unlikely to cause a software developer to pirate other software
> developers hard work. I certain haven't and wouldn't. That kama is
> reserved for Google (and then Android), not for fellow software
> developers.  i.e. If you are unable to circulate your own work, ones
> enthusiasm eventually dries up and withers on the vine, such that, in
> my case at least, I've abandoned my daily usage of the Android phone
> itself, and now use an alternative smart phone from a company with a
> global perspective instead.
>
> * Its true that, within the list of countries wrt your downloads,
> Canadian, Kiwi and Swiss developers also cannot sell their apps on
> Google Android Market to their own customers - so if it was 'a
> disgruntled developer issue' re Australia, you would likely see it
> there too - but as I've pointed out, your figures for those countries
> are statistically insignificant, so that doesn't constitute evidence
> either way.
>
> * I'm not surpr

[android-developers] Content-Encoding: gzip,deflate

2010-08-28 Thread Arpit
Hi All,

I am using the Apache HttpClient and added the header "Accept-
Encoding" and "gzip,deflate". But when I check the header of the
response I always get the Content-Encoding header as empty.

In the header array of the response I can see that "Content-Type:
application/xml; charset=utf-8" as one of the value.

My questions are:

a) Is there a way to check whether a server support gzip content
encoding?
b) If no, how can I find out from Apache HttpClient whether the
content received is in gzip content encoding?

Please help.

Thanks & Regards,
Arpit.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: App breaks for some users after they update from the Market

2010-08-28 Thread William Ferguson
Thanks for posting the psuedo code.
>From the symptoms, the code you posted and the assumption that this
section of code is multi-threaded, it looks like a race condition.

public StaticClass {
 private static Manager manager = new Manager();
 public static Manager getManager() { return manager; }
}

If 2 Threads simultaneously access the above its possible that the 2nd
will receive a partially configured instance of Manager.
It's one of the reasons I avoid statics like the plague.

Try changing it to:

public StaticClass {
 private static Manager manager = new Manager();
 public static synchronized Manager getManager() { return manager; }
}


On Aug 28, 7:34 am, TreKing  wrote:
> On Fri, Aug 27, 2010 at 3:53 PM, Tom Gibara  wrote:
> > Have the keys changed between releases of the application? Is the selected
> > key persisted in any way?
>
> Nope, they're hard-coded and were introduced in the last update.
> So where I have "Key" is a string literal I use to ID the derived instance.
>
> So it's like:
>
> refs.add("Option1", new Derived1());
> refs.add("Option1", new Derived2());
>
> and so on.
>
> Then in a drop down, the user can select "Option1" or "Option2", each option
> being obtained from the hard-coded list.
> So yeah, no saving or restoring of the keys. All in the code.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Bug in Android 2.2 with move to sdcard & home screen shortcuts?

2010-08-28 Thread Doug
> Home does not save intents (therefore shortcuts)
> as binaries, but as URIs. The URI form of intents does not support
> arrays.

Ah.  That would be nice info to have in the docs.  :-)

Guess I'll have to store my string array as a flat string with
delimiters, then.  Thanks for the update!

Doug

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Facing licensing issue in already published paid app

2010-08-28 Thread Feelsocial
Hi Pent. i already have uploaded my app updated version 2 on the
market. But i not publish it because waiting for working it fine.its
uploaded and saved on market

On Aug 27, 12:45 pm, Pent  wrote:
> > I am facing the problem in licensing of my old published paid apps.
> > Basically i have paid app which is published by version code 1. I
> > implemented the license code on it, it working fine to me. Licensing
> > server giving the response or allow that you can use it. But once i
> > changed version code from 1 to 2 in manifest file, then licensing
> > service not allow to use the app.
>
> The server version on the market server must match the one in the
> manifest.
>
> Pent

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


[android-developers] Re: Piracy Breakdown by Country

2010-08-28 Thread Mark Carter
On Aug 28, 9:50 am, Peter Webb  wrote:
> The figures are clearly and obviously wrong. The most basic common
> sense should tell you that.

Common sense is often a pretty unreliable metric.

Clearly stats based on a single app should not be generalised too much
especially (as gosh mentioned earlier) when the numbers involved are
fairly small.

Here's one theory: Pirate sites have far less apps than the Android
Market and so the apps that are there are far more discoverable. Users
are downloading them out of curiosity and would never have bought them
even if the pirate sites didn't exist. There could be just a few users
downloading a whole load of pirate copies and so skewing the results.
Here's a wild guess: most pirated downloads are discovered directly on
the pirate site (as opposed to users discovering the app on the Market
and then searching for a pirate copy).

Maybe the analytics show those users are regularly using the apps?
This doesn't mean they would have been prepared to fork out cash. For
many users, many apps are nice to have but not good enough to pay for.
Or maybe they simply can't pay for it.

Imagine this for every 10,000 android users in Australia:

8 buy your app
92 download a pirate copy

So it would only take at least 1% of users to actively use pirate
sites to make these numbers work. I'd expect the number to be more
like 10% (another wild guess) which would mean about 10% of those
users thought your app was at least "good enough to try".

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


[android-developers] Re: Help! Strange exception on HTC Hero

2010-08-28 Thread Kumar Bibek
A bit more of your logcat would surely say from where the exception
was generated from your code.

- Kumar Bibek
http://kbeanie.com


On Aug 27, 2:57 pm, Ilya Shinkarenko  wrote:
> hi all,
>
> just released the new version of Tennis Math, after starting the
> "Statistics" activity, the following exception is thrown:
>
> I/ActivityManager(   76): Starting activity: Intent {
> cmp=com.tennismath.ui.android/.StatisticsActivity (has extras) }
> W/dalvikvm( 9847): threadid=3: thread exiting with uncaught exception
> (group=0x4001e390)
> E/AndroidRuntime( 9847): java.lang.NullPointerException
> E/AndroidRuntime( 9847):        at
> android.view.ViewGroup.drawChild(ViewGroup.java:1583)
> E/AndroidRuntime( 9847):        at
> android.view.ViewGroup.drawChild(ViewGroup.java:1583)
> E/AndroidRuntime( 9847):        at
> android.view.ViewGroup.drawChild(ViewGroup.java:1583)
> E/AndroidRuntime( 9847):        at android.view.View.draw(View.java:6538)
> E/AndroidRuntime( 9847):        at
> android.view.ViewGroup.drawChild(ViewGroup.java:1585)
> E/AndroidRuntime( 9847):        at android.view.View.draw(View.java:6538)
> E/AndroidRuntime( 9847):        at
> com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1866)
> E/AndroidRuntime( 9847):        at
> android.view.ViewRoot.performTraversals(ViewRoot.java:1118)
> E/AndroidRuntime( 9847):        at 
> android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime( 9847):        at
> android.app.ActivityThread.main(ActivityThread.java:4595)
> E/AndroidRuntime( 9847):        at 
> java.lang.reflect.Method.invoke(Method.java:521)
> E/AndroidRuntime( 9847):        at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
>
> this is NOT reproducible on G1 / Nexus / emulator
>
> any ideas?
>
> thanks!
> ilya

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

2010-08-28 Thread Kumar Bibek
The eclipse will also truncate your strings at some point or the
other. I would recommend to just look at the response codes and assume
that you are actually getting the whole long response. Or may be you
can write the response string to a file and check that.

-Kumar Bibek
http://kbeanie.com

On Aug 28, 1:10 am, Frank Weiss  wrote:
> Might I suggest you try debugging in Eclipse instead of with logcat.
> You can breakpoint and step through the code and inspect variables. It
> gives you much better insight into what's happening in your code than
> logcat or toast.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Adding Feature to Android (that I've made)

2010-08-28 Thread Kumar Bibek
Agree... 100% :)

-Kumar Bibek
http://kbeanie.com

On Aug 27, 5:53 am, Dianne Hackborn  wrote:
> I would suggest making the source available to developers for them to use.
>  You will get much more immediate gratification -- if you want to do this
> through a patch to the source, you are looking at maybe 6 months for it to
> appear in a release, and another year or more after that until it is widely
> available enough on devices that apps can use it.
>
> We are also fairly restrictive in accepting these kinds of patches.  If
> every widget that would be useful to some apps was added to the platform,
> the amount of code there would be *huge* and require tons more work to
> maintain.  Over the last year, for widgets and stuff that doesn't need to be
> in the framework, we have moved to automatically not accepting them in the
> framework.  They can be in a static library or something else that the apps
> that need them can use.  We'll start consider adding something to the
> framework if it is being used in more than a handful of the apps that are
> shipping with the base Android platform.
>
>
>
> On Wed, Aug 25, 2010 at 6:51 PM, nbadal  wrote:
> > I'm almost completed with a DatePickerPreference that I've built (a
> > preference widget I was suprised didnt already exist), and would
> > really like to share this function with every developer.
> > I know the process for submitting patches to the android open-source
> > project, but I was wondering how I would go about adding a whole new
> > feature to android that I have made, or if they even accept them. Is
> > there any way to go about doing this?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


[android-developers] Re: change string resource folder

2010-08-28 Thread Kumar Bibek
Why would you want to do that? May be you can have a static class and
declare all your strings there. But then, you would lose the
flexibility that Android provides for Internationalization. If thats
not a problem for you, I think it should work.

-Kumar Bibek
http://kbeanie.com

On Aug 26, 1:42 pm, mohammad Rukab  wrote:
> Hello all,
>
> is there away to change source for string from
> res/values/string.xml

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 manifest file from an unzipped apk cannot be read

2010-08-28 Thread Kumar Bibek
If the Intent or the protocol is not publicly available, then you
should not try to do that. The target app can easily change in the
future. Just a change of a class name would break your app.

-Kumar Bibek
http://kbeanie.com

On Aug 26, 10:14 pm, Anil  wrote:
> I am looking to trap an implicit intent from the launcher, do some
> processing, and then call the original target app directly.
> To call the target app, I assume it has to be via an explicit intent -
> otherwise my app will get called again by Android?
> No, I am not reusing anyone's app or parts of it - I want to know what
> their main Activity class is, so I can call it directly via an
> explicit intent.
> I am just looking for a general solution so that I can call any app
> explicitly without unintended recursion.
> thanks,
> Anil
>
> On Aug 26, 12:55 pm, Matty  wrote:
>
> > Activites that are re-usable should have some published way of
> > invoking them...  Otherwise, perhaps they do something by file type,
> > like if you start an activity for an MP3, audio players should be able
> > to launch.  Why don't you just ask the developer how to invoke an
> > activity, instead of trying to hack through their apk?
>
> > On Aug 26, 9:41 am, Anil  wrote:
>
> > > I would like to read the android manifest from an apk file. I unzipped
> > > it using 7-zip. However, the manifest seems to be in binary with some
> > > ascii but a lot of control chars. Was it meant to be hidden? The
> > > philosophy behind Android is to share and reuse activities - but if
> > > the manifest cannot be read, then I dont know how it can be done.
> > > thanks,
> > > Anil- Hide quoted text -
>
> > - Show quoted text -

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


[android-developers] Re: label on the left for RadioButton

2010-08-28 Thread Kumar Bibek
Extend Radiobutton class and implement your own layout and funtions.
That should do the trick.

- Kumar Bibek
http://kbeanie.com

On Aug 26, 6:09 pm, Christophe 
wrote:
> hello,
>
> by default the label of a RadioButton in on the right of the
> checkMarck. Is there a way to put the text on the left ?
>
> regard,
> christophe

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

2010-08-28 Thread Kumar Bibek
The simplest would be HTTP Post/Get, XML/JSON and Java.

Write simple servlets on the app engine.

-Kumar Bibek
http://kbeanie.com

On Aug 26, 12:43 pm, Droid  wrote:
> I have spent two days trying to decide on a way to upload and download
> data to the Google App Engine.
>
> Do I use REST or simple HTTP post/get?
>
> Do I use JSON or XML?
>
> Do I use java or Python.
>
> I am thinking probably use python and probably use REST. But which one
> out there?
>
> There are so many to choose from. None seem to work out-of-the-box,
> but need faffing around with bits of code from here and bits of code
> from there. And is not clear at the outset what  am taking on or what
> the limitations are.
>
> Can anyone point me at a usable system for connecting my Android to
> the GAE?

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


[android-developers] Market:// links in WebView

2010-08-28 Thread jgclifton
Hi guys.I've created a web view app, the page that is displayed
features market:// links but upon clicking them I get the 404 screen
along with the error that the protocol is not supported. I've tried
looking through documentation but was unable to find anything relating
to this. Any help is much 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


Re: [android-developers] Re: Best way to store restaurant data

2010-08-28 Thread Lorensius W. L. T
If data are dynamic or will be changed/updated, client server model is
suitable for your app.Store the data on server than create an interface (rpc
or web service) to exchange data between client apps & your server.

On Sat, Aug 28, 2010 at 1:43 AM, Dominic DiTomaso  wrote:

> Thanks Frank. Looks like I have a lot of reading to do.
>
>
>
>
> On Wed, Aug 25, 2010 at 11:45 AM, Frank Weiss  wrote:
>
>> An app I'm developing uses URLConnection, others like to use
>> HttpClient. I suggest you find some sample code that does something
>> similar and study how it's done.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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
>



-- 
Kind Regards

- Lorensius W. L. T -
- http://www.londatiga.net -

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

[android-developers] Re: ADT causing CDT to build all C projects on Android app launch??

2010-08-28 Thread Jason
Hi,

I am one of the elusive few running this exact setup, and I too have
been a bit annoyed by this "feature".

I did just find this:

Window->Preferences->C/C++

There is a checkbox option entitled:

"Build configurations only when there are Eclipse resource changes
within the project and its references"

I tried checking this at it seemed to eliminate these extra builds.

I also tried making a small change to a C++ source file in my project
and it picked up the change when I ran the app.. so seems to work.

On Aug 28, 12:29 pm, Robert Green  wrote:
> Hey guys,
>
> I doubt there are too many people who run CDT in eclipse for native
> apps also with ADT installed for Android, but in the off-chance that
> someone here knows anything about this, my problem is that any time I
> run any android app, my C builder kicks in for projects totally
> unrelated.  I have no idea why and have been digging through settings
> on everything, unable to find out why.  All I can think is that the
> ADT pre-launch process triggers it via a refresh or some kind of catch-
> all type call in eclipse API land that I'm unaware of.
>
> Does anyone know anything about this?  It's very annoying to have a C
> builder run for a different project than the one you're working on
> every time you launch the app.

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

2010-08-28 Thread Federico Paolinelli


On 27 Ago, 23:58, "Maps.Huge.Info (Maps API Guru)" 
wrote:
> I think the consensus is that AsyncTask is the way to go if what
> you're trying to do affects the UI thread eventually. Using a service
> to compute location for instance would be over complicated.
>
> -John Coryat

Maybe I didn't explain correctly:
If I need to react to some location change for example, and notify the
user, I can't use _just_ an async thread. I need to to all the logic
in a service and throw for example a notification plus a broadcast
that will update the ui if it is on top.
What I was asking is: if I need to perform more than one task in
background (I mean when the phone screen is off, or when the user is
reading the times website while sitting on the toilet), does it make
any sense to create more than one service? Or should I just create one
service that performs many task like listening on the network as well
as being notified of position changes?

Federico

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

2010-08-28 Thread Ed
IMHO having a worker process is definitely worth the effort. It is a
little daunting at first but once you get your head around it it's
great fun to work on.

If you write your image loader worker process in a well structured way
then you will be able to reuse it from project to project. One day
mine might reach a state where I'm happy to release it but I would
want to use it on a few more projects first to ensure it's generic
enough. Plus if I just gave you the code you wouldn't learn anything
and you'd miss out on the feeling of success when it finally works at
3 o'clock in the morning.

I suggest you read this short thread where I commented on
SoftReference: 
http://groups.google.com/group/android-developers/browse_thread/thread/614281daa12a3fd8

I would also suggest watching:
http://www.youtube.com/watch?v=N6YdwzAvwOA
http://www.youtube.com/watch?v=wDBM6wVEO70

Once you've done all that come up with a plan for handling a queue of
requests (I used a PriorityQueue so I can fast track important
images), caching images, returning the images to the caller...etc...
Lots of fun to be had.

Ed

On Aug 28, 10:44 am, Dianne Hackborn  wrote:
> This is an API demo for dealing with data that is slow to load:
>
> http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
>
> You'll of course want to do this a little differently, filling in as much of
> each item as you can when binding, and having a background thread loading
> images to populate later when they are ready.  (Instead of the stuff this
> demo does with the scroll state changing.)
>
>
>
>
>
> On Fri, Aug 27, 2010 at 2:59 PM, ls02  wrote:
> > I did some profiling and it turned out significant time is spent on
> > loading images. Each listview item has a distinctive image. i have
> > thousands of items in my listview so I cannot cache them. I tried to
> > create an image on card folder cache of either PNG or JPEG image files
> > of exactly the same dimension as the images I render in listview item
> > ImageView. It helped but still not ideal.
>
> > I thought about saving uncompressed bitmap data to a an image cache
> > file with hope it will be faster to load and render since the image
> > won't need to be decompressed. But i didn't find any class or method
> > to save and load uncompressed bitmaps. The only way I see to save the
> > image to a disk file is Bitmap.compress which can be either JPEG or
> > PNG (BTW, which one from these two is faster to load and render?).
>
> > I also thought about loading images in worker thread but this appears
> > to be very complicated and I am not sure it will help and won't create
> > other problems. I would have to create a queue if currently visible
> > items and have to load images inside that thread. I worry that while I
> > load a title image it is already scrolled out and becomes invisible.
>
> > On Aug 26, 11:26 pm, Dianne Hackborn  wrote:
> > >http://developer.android.com/guide/developing/tools/traceview.html
>
> > > This
> > may
> > > not be documented, but in newer versions you can use the "am" command to
> > > start and stop profiling.  Use "adb shell am" to get help for the
> > command.
>
> > > On Thu, Aug 26, 2010 at 7:59 PM, ls02  wrote:
> > > > How do I profile the code? I do recycle bitmaps since each list item
> > > > displays its own bitmap image and without recycling I quickly run out
> > > > of memory.
>
> > > > On Aug 26, 10:50 pm, Dianne Hackborn  wrote:
> > > > > Run your code in a profiler.
>
> > > > > Make sure you aren't thrashing through temporary objects.  If the GC
> > is
> > > > > running much while scrolling, optimize to reduce temp objects.
>
> > > > > On Thu, Aug 26, 2010 at 6:18 PM, ls02  wrote:
> > > > > > I have list view with fairly complex list view items consisting of
> > > > > > several image views, several text views, progress bars, etc.
> > Depending
> > > > > > on the state of the item some of these elements can be show and
> > some
> > > > > > are hidden. I understand that listview recycles views. Right now I
> > am
> > > > > > dealing with slow listview scrolling especially on lower powered
> > > > > > devices. What's the best way to deal with this problem?
>
> > > > > > I already optimized each list item view as much as I could. Now I
> > am
> > > > > > facing with what's the best? Use one single view with many children
> > > > > > for all items and hide and show various children depending on the
> > item
> > > > > > state. This way I do not inflate each item view as list is being
> > > > > > scrolled but need to show and hide constantly various child views.
>
> > > > > > Another approach is to build item view dynamically each time view
> > is
> > > > > > requested in the adapter getView method. In this case I can only
> > add
> > > > > > at run time those elements that are truly needed for current item
> > > > > > state but this requires inflating item view every time.
>
> > > > > > Finally 

[android-developers] Re: Android Market, google checkout minimal sum to be collected before payment.

2010-08-28 Thread sblantipodi
no words.

in this way getting the latest transactions from my ATM has no sense,
I will have dozens of $2 on it and
important payment will not be present.

Congratulations google, as always ;)

On Aug 27, 8:33 pm, TreKing  wrote:
> On Fri, Aug 27, 2010 at 12:34 PM, sblantipodi
> wrote:
>
> > is there a way to set google checkout to pay us only after our
> > balance surpassed a certain amount?
>
> I don't think so, at least I've not found a way from looking around.
>
> Checkout was really tacked on to Android and in no way designed to support
> small transactions for virtual goods.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Google Maps: Let the user choose a location

2010-08-28 Thread Dirk Vranckaert
Hey all,

I've been working on an application lately that is using GMaps to
display a location that is stored in the devices database. However
when no location is available (no GPS signal is available) the user
can go through an edit wizard and at a certain point he can add a
location himself. I already have to code to display the stored
location, but is it possible to write something so the user get's to
see a map and when he clicks/touches on a certain area a map pointer
appears and the location is stored.
Is that possible in any way? Is there any good online documentation
available? I searched through this group and on Google but couldn't
find anything usefull.

Kind regards,

Dirk

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


[android-developers] User photo + latitude-like marker in Custom View

2010-08-28 Thread Joao Luis
Hi there.

I'm trying to add a marker to a custom view, where I want to show a
given picture --- pretty much like what is shown in latitude.

However, even though I've been working with the Android SDK for a
while, I have absolutely no idea how to do this.

Anyone care to give a hand? Would be really appreciated :-)

Thanks.

-- J

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

2010-08-28 Thread JP

I am using GAE/Java to be able to get the code off of GAE if I have to
or want to, and for file uploads, multipart POST, which is basically
the "standard" way of uploading files to Servlet based web servers (at
least AFAIK). There isn't anything "out of the box" that I am aware
of. As you found, there's tons of code fragments in the Interwebs if
you search for terms like "multipart POST" or "HTTPClient". Some
assembly required, which, from where you are at, should take you a
couple of weeks FTE to build and integrate this in your Android app.



On Aug 26, 12:43 am, Droid  wrote:
> I have spent two days trying to decide on a way to upload and download
> data to the Google App Engine.
>
> Do I use REST or simple HTTP post/get?
>
> Do I use JSON or XML?
>
> Do I use java or Python.
>
> I am thinking probably use python and probably use REST. But which one
> out there?
>
> There are so many to choose from. None seem to work out-of-the-box,
> but need faffing around with bits of code from here and bits of code
> from there. And is not clear at the outset what  am taking on or what
> the limitations are.
>
> Can anyone point me at a usable system for connecting my Android to
> the GAE?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: permission denied when trying to pull apk from phone to computer

2010-08-28 Thread Anil
I had cd-ed to the directory. But anyway, I tried your suggestion and
get 'permission denied'.

$ adb pull /system/app/Youtube.apk
adb pull /system/app/Youtube.apk
adb: permission denied



On Aug 27, 6:01 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> You have to give it a path. The pull command doesn't know where
> YouTube.apk is located. Try:
>
> adb pull /system/app/YouTube.apk
>
> instead.
>
> -John Coryat

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


[android-developers] Re: Piracy Breakdown by Country

2010-08-28 Thread gosh
Looking at your numbers again, your 'total installs' for Australia
seem way out-of-whack with the rest of the countries listed, i.e.:

* Take the UK versus Australia figures, your total installs are: UK=
335, Australia=321
* There are about 60 million people in the UK, and only 22 million in
Australia. Both countries speak a form of English as their primary
language, discounting the disproportionate uptake as a UI issue in
your app.
* Google has allowed app sales and app purchases in both the UK and
the US before all other countries globally (Feb 2009). It has allowed
'purchases' in Australia only since Oct'2009, and still doesn't allow
'sales' today.
* Google has had multiple Android developer/code/lab-days in the UK
(i.e. platform evangelism and market building momentum), while the
closest they ever got to Australia with one was Singapore (which is
not very close)… i.e. Google is Australia-averse. In fact, southern
hemisphere averse. For a company that sells globes and maps, it
doesn't seem to be able to peer over its own equators. Its much more
likely that Google will allow app sales from Afghanistan before they
do so in Australia. Android numbers in Australia reflect that Google
apathy.
* Google and the Android-brand have been totally 'unfocused'/blurred
wrt Australia as a market … the only place you see 'Google' in
Australia, is in a browser window. If you phone them, you don't get
past the front-desk staff. If you email them, nothing comes back. If
your write to them, nothing gets returned. It all disappears into a
big white rectangle. It reminds me of the public service in the 1980s,
before office PC productivity. They process all their accounting/sales
data and dollars from Australia through their Ireland office… while
its true that the Australian population was once 75% Irish, that was a
long time ago (in the early 1800s).
* Telstra, the major Australian telco (previously, a government-owned
monopoly, still with nation-wide mobile coverage), only started
selling an Android phone in April 2010 - just a few months ago.
Vodafone Aust. Ltd. has sold one for a while longer - but they are a
much much smaller company, with much less coverage nationally, and
they only sell it via high-end phone plans.
* I'm yet to meet (or even see) a person on the street (outside the IT
world) that actually has an Android phone.

In summary, both your published piracy rate for Australia, and also
your actual 'total number of installs' for Australia, are 'far from
representative' IMHO. I suggest to you that there is something very
odd going on there with your app installs (supposedly) coming from
Australia?

Cheers
Steve

On Aug 27, 7:15 am, keyeslabs  wrote:
> Actually, the largest *contributor* to piracy was the US, but the
> highest piracy rates (as a percentage of total installs) were
> elsewhere.  For example, the US has a piracy rate (on my app) of about
> 70%, but Australia is more like 92%.  For the countries where apps may
> be purchased, here's the breakdown:
>
> Country Purchases       Installs        Pirated Installs        Piracy Rate
> Australia       26      321     295     92%
> Austria 6       13      7       54%
> Canada  25      96      71      74%
> France  23      104     81      78%
> Germany 38      161     123     76%
> Italy   4       36      32      89%
> Japan   467     467     0       0%
> Netherlands     24      98      74      76%
> New Zealand     4       8       4       50%
> Spain   7       63      56      89%
> Switzerland     7       21      14      67%
> United Kingdom  108     335     227     68%
> United States   2051    6105    4054    66%
>
> The US isn't the highest, but still, it's disturbing how high the rate
> is in ALL of these countries where purchases could be made...
>
> Dave
>
> On Aug 26, 4:59 pm, niko20  wrote:
>
>
>
> > Excellent analysis. Once again showing that you can't make assumptions
> > about a market without cold hard data to back it up. Your results
> > found that the largest piracy rates actually occurred in countries
> > where users COULD buy apps ! I guess USA is just a bunch of cheap
> > *sses :)
>
> > -niko
>
> > On Aug 26, 3:22 pm, keyeslabs  wrote:
>
> > > Recently did an analysis of piracy rates by country for my app.  Found
> > > some very interesting tidbits that I think may be of interest to
> > > members of this group:  http://bit.ly/bSaoBe
>
> > > Dave

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


[android-developers] Re: permission denied when trying to pull apk from phone to computer

2010-08-28 Thread Maps.Huge.Info (Maps API Guru)
It worked on my Nexus One. What device are you using and are you sure
that apk is actually on the device?

-John Coryat

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


[android-developers] Re: Market:// links in WebView

2010-08-28 Thread Maps.Huge.Info (Maps API Guru)
What you'll need to do is create a link from your webview into your
app by using a JavaScript command. Inside your app you create an
intent that opens the market app:

JavaScript:

// Launch Market App... (appid is package name)

function launchMarket( appId ) {
  webViewClass.launchMarket( appId ) ;
}

Java:

public void launchMarket(String appId) {
 Intent intent = new Intent(Intent.ACTION_VIEW);
 intent.setData(Uri.parse("market://details?id=" + appId));
  startActivity(intent);
  finish() ;
 }

You'll also need the requisite code to allow all this to happen, I
assume you know how to do that already. If not, Mark Murphy has an
excellent book that details all this out.

-John Coryat

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


Re: [android-developers] Re: Piracy Breakdown by Country

2010-08-28 Thread Mark Carter
Haven't checked recently but for a while Flurry was (for some reason)
reporting Chinese users as Australian.

On 28 August 2010 15:40, gosh  wrote:

> Looking at your numbers again, your 'total installs' for Australia
> seem way out-of-whack with the rest of the countries listed, i.e.:
>
> * Take the UK versus Australia figures, your total installs are: UK=
> 335, Australia=321
> * There are about 60 million people in the UK, and only 22 million in
> Australia. Both countries speak a form of English as their primary
> language, discounting the disproportionate uptake as a UI issue in
> your app.
> * Google has allowed app sales and app purchases in both the UK and
> the US before all other countries globally (Feb 2009). It has allowed
> 'purchases' in Australia only since Oct'2009, and still doesn't allow
> 'sales' today.
> * Google has had multiple Android developer/code/lab-days in the UK
> (i.e. platform evangelism and market building momentum), while the
> closest they ever got to Australia with one was Singapore (which is
> not very close)… i.e. Google is Australia-averse. In fact, southern
> hemisphere averse. For a company that sells globes and maps, it
> doesn't seem to be able to peer over its own equators. Its much more
> likely that Google will allow app sales from Afghanistan before they
> do so in Australia. Android numbers in Australia reflect that Google
> apathy.
> * Google and the Android-brand have been totally 'unfocused'/blurred
> wrt Australia as a market … the only place you see 'Google' in
> Australia, is in a browser window. If you phone them, you don't get
> past the front-desk staff. If you email them, nothing comes back. If
> your write to them, nothing gets returned. It all disappears into a
> big white rectangle. It reminds me of the public service in the 1980s,
> before office PC productivity. They process all their accounting/sales
> data and dollars from Australia through their Ireland office… while
> its true that the Australian population was once 75% Irish, that was a
> long time ago (in the early 1800s).
> * Telstra, the major Australian telco (previously, a government-owned
> monopoly, still with nation-wide mobile coverage), only started
> selling an Android phone in April 2010 - just a few months ago.
> Vodafone Aust. Ltd. has sold one for a while longer - but they are a
> much much smaller company, with much less coverage nationally, and
> they only sell it via high-end phone plans.
> * I'm yet to meet (or even see) a person on the street (outside the IT
> world) that actually has an Android phone.
>
> In summary, both your published piracy rate for Australia, and also
> your actual 'total number of installs' for Australia, are 'far from
> representative' IMHO. I suggest to you that there is something very
> odd going on there with your app installs (supposedly) coming from
> Australia?
>
> Cheers
> Steve
>
> On Aug 27, 7:15 am, keyeslabs  wrote:
> > Actually, the largest *contributor* to piracy was the US, but the
> > highest piracy rates (as a percentage of total installs) were
> > elsewhere.  For example, the US has a piracy rate (on my app) of about
> > 70%, but Australia is more like 92%.  For the countries where apps may
> > be purchased, here's the breakdown:
> >
> > Country Purchases   InstallsPirated InstallsPiracy
> Rate
> > Australia   26  321 295 92%
> > Austria 6   13  7   54%
> > Canada  25  96  71  74%
> > France  23  104 81  78%
> > Germany 38  161 123 76%
> > Italy   4   36  32  89%
> > Japan   467 467 0   0%
> > Netherlands 24  98  74  76%
> > New Zealand 4   8   4   50%
> > Spain   7   63  56  89%
> > Switzerland 7   21  14  67%
> > United Kingdom  108 335 227 68%
> > United States   20516105405466%
> >
> > The US isn't the highest, but still, it's disturbing how high the rate
> > is in ALL of these countries where purchases could be made...
> >
> > Dave
> >
> > On Aug 26, 4:59 pm, niko20  wrote:
> >
> >
> >
> > > Excellent analysis. Once again showing that you can't make assumptions
> > > about a market without cold hard data to back it up. Your results
> > > found that the largest piracy rates actually occurred in countries
> > > where users COULD buy apps ! I guess USA is just a bunch of cheap
> > > *sses :)
> >
> > > -niko
> >
> > > On Aug 26, 3:22 pm, keyeslabs  wrote:
> >
> > > > Recently did an analysis of piracy rates by country for my app.
>  Found
> > > > some very interesting tidbits that I think may be of interest to
> > > > members of this group:  http://bit.ly/bSaoBe
> >
> > > > Dave
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr..

[android-developers] Re: Is there a way to request permissions from a user as you need them?

2010-08-28 Thread Zsolt Vasvari
Let me try this from an end-user perspective.  Obviously, the whole
permission feature was designed by a developer and, IMO, it's not a
very good system in a usuability sense.

As an end user, I only care one and ONLY one permission:  INTERNET.  I
only look for that one permission and the rest is just noise and might
as well not even be shown.  Why?  Because I know as long as the app
has no way of getting my personal info off my phone, I am good, as far
as I am concerned, the app can read all my passwords and credit card
info it wants, if it cannot do much with it anyhow.

That said, the way the Internet permission is implemented is poor and
doesn't really tell you anything useful on which I can make my
decision on.  Currently, if I see "Internet" and need to scan the
other permissions as to what else the app can do and send out to
whomever.

What I would like to see is the Internet permission broken up into:

- Full unrestrictued internet access:  This is fine for a replacement
browser, but if anything else requests it, I probably wouldn't install
that app.
- Local network access only (for printing or network management apps.)
- An spelt out protocol/domain list that the app declares it wants to
have access to and nothing else be allowed.  This should be the most
appropriate for the majority of the apps.




On Aug 28, 1:46 am, Dianne Hackborn  wrote:
> Well, we disagree.
>
>
>
>
>
> On Fri, Aug 27, 2010 at 10:27 PM, Brad Gies  wrote:
>
> > I would argue the opposite :)
>
> > One of the handiest features of Windows Firewall is that you have the
> > option of "Displaying a notification" when it blocks a program, and when the
> > dialog shows up, you have the option of granting that program access, and
> > then it never bothers you again.
>
> > I do agree that the way it was done in Vista was absolutely horrible... but
> > a one time "Let this program do this" works VERY WELL, and I think it gets
> > around all the problems you mentioned.
>
> > In my opinion, the lack of this is the single most obvious failing in
> > Android.
>
> > Brad.
>
> > On 27/08/2010 5:36 PM, Dianne Hackborn wrote:
>
> >> I think there is enough evidence that asking permission at time of need
> >> doesn't generally work -- see the MIDP experience, Windows Vista/7 
> >> security,
> >> etc.  There is a fundamental problem that at the point you ask the
> >> permission, the user is wanting to accomplish some task at hand, and all 
> >> you
> >> are doing is bugging them.
>
> >> And it gets much worse when you consider applications being able to run in
> >> the background.  Do permission requests pop up on users from the 
> >> background?
> >>  Does a notification get posted that they respond (or not respond) to at
> >> their leisure?
>
> >> If you have a wall of permissions, the first thing I would suggest is
> >> looking at those and seeing if you can trim it down.  In fact, doing things
> >> that make it easier for apps to make use of lots of permissions are to me
> >> counter-productive -- it is a good thing to make lots of permission use a
> >> harder road.
>
> >> I just had a look through the apps installed on my phone, and the *vast*
> >> majority of them only require a couple permissions.  So someone who is 
> >> using
> >> a large number of permissions is going to stand out from what user's
> >> normally see, as well they should.
>
> >> From the platform side, we also need to avoid making it easy to have lots
> >> of permissions.  We need to be continuing to design the platform to reduce
> >> the permissions that apps need.  For example, the window flag to keep the
> >> screen on avoids the need of the power manager permission for most
> >> applications; we should beef up our intent interactions with the contacts
> >> app so applications can work with the user to select and modify 
> >> applications
> >> through that without using permissions; etc.
>
> >>  Sincerely,
>
> > Brad Gies
> > ---
> > Bistro Bot - Bistro Blurb
> >http://bgies.com
> >http://bistroblurb.com
> >http://ihottonight.com
> >http://forcethetruth.com
> > ---
>
> > Everything in moderation, including abstinence
>
> > Never doubt that a small group of thoughtful, committed people can
> > change the world. Indeed. It is the only thing that ever has - Margaret
> > Mead
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> 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 supp

[android-developers] Re: Android Market, google checkout minimal sum to be collected before payment.

2010-08-28 Thread Zsolt Vasvari
http://checkout.google.com/support/sell/bin/answer.py?hl=en&answer=25400

No, you get a single payment every work day.  If you don't like that
schedule, because who wouldn't like 22 small deposits a month, you are
out of luck.

On Aug 28, 8:09 am, sblantipodi  wrote:
> no words.
>
> in this way getting the latest transactions from my ATM has no sense,
> I will have dozens of $2 on it and
> important payment will not be present.
>
> Congratulations google, as always ;)
>
> On Aug 27, 8:33 pm, TreKing  wrote:
>
>
>
> > On Fri, Aug 27, 2010 at 12:34 PM, sblantipodi
> > wrote:
>
> > > is there a way to set google checkout to pay us only after our
> > > balance surpassed a certain amount?
>
> > I don't think so, at least I've not found a way from looking around.
>
> > Checkout was really tacked on to Android and in no way designed to support
> > small transactions for virtual goods.
>
> > ---­--
> > TreKing  - Chicago
> > transit tracking app for Android-powered devices- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Setting focus programatically in ExpandableListView

2010-08-28 Thread OldSkoolMark
I have subclassed ExpandableListActivity to create an activity that
presents a simple tree view of the 'world at large' and allows the
user to select one for further use by the app. I am having trouble
setting focus programatically. One thing that baffles me is that I can
use the D-pad to set focus on any of the child or group items in my
ExpandableListView, but inside my onChildClick() callback,
isFocusable() returns false. If I can set focus with the D-pad, how
can isFocusable() return false?

My goal is to avoid having the user have to touch individual
ExpandableListView entries to select them and to provide a couple of
buttons to move the focus up and down inside the list. I  want
selection to be easy for  folks with no D-pad or with a phone that
only presents the D-pad when in landscape mode (e.g. Droid) .

Is there some way I can programatically inject D-pad key clicks into
my app input event stream?

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

2010-08-28 Thread jgclifton
Thanks for the response! The other problem I have with this is I'm
showing ads with admob but within the webview rather than using the
android native code (theres a good reason for this) but would this
sort of code be scaleable to work with admob too? I'm not very
familiar with JavaScript.

On Aug 28, 2:45 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> What you'll need to do is create a link from your webview into your
> app by using a JavaScript command. Inside your app you create an
> intent that opens the market app:
>
> JavaScript:
>
> // Launch Market App... (appid is package name)
>
> function launchMarket( appId ) {
>   webViewClass.launchMarket( appId ) ;
>
> }
>
> Java:
>
> public void launchMarket(String appId) {
>  Intent intent = new Intent(Intent.ACTION_VIEW);
>  intent.setData(Uri.parse("market://details?id=" + appId));
>   startActivity(intent);
>   finish() ;
>  }
>
> You'll also need the requisite code to allow all this to happen, I
> assume you know how to do that already. If not, Mark Murphy has an
> excellent book that details all this out.
>
> -John Coryat

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


[android-developers] Re: Market:// links in WebView

2010-08-28 Thread Maps.Huge.Info (Maps API Guru)
It would depend on the code admob uses. If the point of your question
is because of admob, then you may be able to figure out their call to
start the market and wrap that in a function that starts the intent
within your app. There may be other ways as well. The example I used
was how I do it.

-John Coryat

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


[android-developers] Re: App breaks for some users after they update from the Market

2010-08-28 Thread Zsolt Vasvari
I would bet any money that this is very clearly going to be a race
condition somewhere.  Your code using a static Map and the user
symptoms are a dead giveaway.

I think the install/reinstall and clearing the user data are red
herrings.  The app might work again for the user if they just ran it
again.


On Aug 27, 4:40 pm, TreKing  wrote:
> Thanks for the continued help.
>
> On Fri, Aug 27, 2010 at 2:22 PM, Dianne Hackborn wrote:
>
> >  The first thing I would look for is any code writing data that could cause
> > problems if it was killed in the middle of executing.
>
> That makes sense, but that's also why I'm confused. The main issue I've had,
> for which I have nearly 30 reports now in each version of my app in the dev
> console, has nothing to do with data access. Unless I'm really missing
> something.
>
> I have a base class reference that should be set to the appropriate instance
> of a derived class type based on user selection.
> These derived type instances come from a manager class, of sorts, that holds
> the instances. There is one static instance of this manager class in the app
> since it's global, constant data. So it should be initialized, along with
> it's internal data it manages, at all times. None of this involves any data
> access.
>
> Some pseudocode if it helps:
>
> // In "Manager" class
> public Manager
> {
>  private Map refs = null;
>
>  public Manager()
>  {
>   refs = new TreeMap();
>
>   // Explicitly add derived instances of BaseRef
>   refs.put("Key", new DerivedInstance());
>
>   // add more ...
>  }
>
>  public BaseRef get(String key)
>  {
>   return refs.get(key);
>  }
>
> }
>
> //In Static access class
> public StaticClass
> {
>  private static Manager manager = new Manager();
>
>  public static Manager getManager() { return manager; }
>
> }
>
> // Then, finally, in the class where the crash occurs
> BaseRef baseRef = StaticClass.getManager().get(userSelection);
>
> "Userselection" is the value chosen by the user from a list pre-populated by
> the Keys in the Manager class to begin with.
> So if the user was able to make the selection, the key was there at the
> start of the Activity, and in the manager where it originated from.
>
> baseRef, which is obtained from that single manager's list (which is
> essentially hard-coded), is later used elsewhere and ends up being null.
>
> There is no file data access involved anywhere in this Activity besides
> using SharedPreferences for exactly one option.
>
> Also, now that I've typed this out, this goes against the idea that statics
> are the problem since I would have had the null pointer at the point where I
> try to access the Manager class. Instead, it appears to be valid but for
> some reason its internal data, which is set on construction, is not.
>
> It's worth noting that I've seen this problem to a lesser extent before I
> added this manager class stuff, but since adding it last week, the problem
> seems to have exploded with a fury. But again, not sure if that's a result
> of a larger user-base over two months since last major update.
>
> I think at some point I'll start polling my users to see how many of them
> continue to see the issue after updating. Since I've instructed them, in
> nice big letters, to try uninstalling first, I expect not to hear any more
> complaints for now, but I'd rather fix the problem than band-aid it like
> this.
>
> ---­--
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] How to connect android to Google App Engine

2010-08-28 Thread Tom Gibara
I've just published an updated to my Betan application for sharing beta
copies of Android apps. It now includes a server-side app that I implemented
using GAE so that other developers can take advantage of it.

Do I use REST or simple HTTP post/get?


These aren't really in opposition. I would generally recommend REST on
several grounds, in part because it encodes what is being read/modified
within the URL, which is where that information is best recorded. If your
server-side API is not public then it isn't something I would get too
hung-up on it since it isn't necessarily architecturally significant - you
can evolve it easily.

Do I use JSON or XML?


I personally shy away from either for my Android applications. For mobile
applications, you're looking for two characteristics in my opinion:
compactness of representation and speed of parsing. If you're dealing with
very complex or very general data, or if it needs to be consumed by other
services (say AJAX) then either of these will be well suited, but often you
can be very specific within an Android application and a custom mode of
serialization can provide many benefits.

One grudge I have against JSON is that it encourages developers to tie their
serialization directly to their object model. This is very convenient in
your early iterations of a project. But when you need to evolve your
server-side domain objects maintaining compatibility with older versions of
your application can get sticky.

Do I use java or Python.


I think Python is very well suited to GAE. I use Java because it allows me
to maintain a separate 'model' jar containing the domain objects for my
application that I can reuse in both the Android application and on the
server. This is a great convenience.

Even though I have plenty of experience with both, I shy away from JDO and
JPA for GAE, and use the 'native' datastore API, I simply find it much more
convenient; I don't have to think my way through all the partial
abstractions.

Can anyone point me at a usable system for connecting my Android to the GAE?


I think at this stage, it's still a case of writing the connecting code
oneself. But you're communicating simple data, the good news is that it's
not really much work (in my experience).

Tom.

On 26 August 2010 08:43, Droid  wrote:

> I have spent two days trying to decide on a way to upload and download
> data to the Google App Engine.
>
> Do I use REST or simple HTTP post/get?
>
> Do I use JSON or XML?
>
> Do I use java or Python.
>
> I am thinking probably use python and probably use REST. But which one
> out there?
>
> There are so many to choose from. None seem to work out-of-the-box,
> but need faffing around with bits of code from here and bits of code
> from there. And is not clear at the outset what  am taking on or what
> the limitations are.
>
> Can anyone point me at a usable system for connecting my Android to
> the GAE?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Piracy Breakdown by Country

2010-08-28 Thread Sam

Let me give you a scenario that i really DOUBT is happening:

1) Users have Screebl lite installed and then decide they really like
it.
2) They then decide to upgrade and get Screebl Pro.
3) Rather than just pick it up off the market (easy) - they scour the
internet looking for it to save a few dollars...

This seems too far fetched for me. Yes for techies this may be "easy"
but for average Joe finding an app and installing it is not easy!

More likely the high piracy rate is due to it being featured on pirate
websites in "bundled packs". In that case you are not losing these
sales, these are sales that were never going to happen.

Just my opinion.

regards

Sam



On Aug 28, 9:58 pm, Mark Carter  wrote:
> Haven't checked recently but for a while Flurry was (for some reason)
> reporting Chinese users as Australian.
>
> On 28 August 2010 15:40, gosh  wrote:
>
>
>
> > Looking at your numbers again, your 'total installs' for Australia
> > seem way out-of-whack with the rest of the countries listed, i.e.:
>
> > * Take the UK versus Australia figures, your total installs are: UK=
> > 335, Australia=321
> > * There are about 60 million people in the UK, and only 22 million in
> > Australia. Both countries speak a form of English as their primary
> > language, discounting the disproportionate uptake as a UI issue in
> > your app.
> > * Google has allowed app sales and app purchases in both the UK and
> > the US before all other countries globally (Feb 2009). It has allowed
> > 'purchases' in Australia only since Oct'2009, and still doesn't allow
> > 'sales' today.
> > * Google has had multiple Android developer/code/lab-days in the UK
> > (i.e. platform evangelism and market building momentum), while the
> > closest they ever got to Australia with one was Singapore (which is
> > not very close)… i.e. Google is Australia-averse. In fact, southern
> > hemisphere averse. For a company that sells globes and maps, it
> > doesn't seem to be able to peer over its own equators. Its much more
> > likely that Google will allow app sales from Afghanistan before they
> > do so in Australia. Android numbers in Australia reflect that Google
> > apathy.
> > * Google and the Android-brand have been totally 'unfocused'/blurred
> > wrt Australia as a market … the only place you see 'Google' in
> > Australia, is in a browser window. If you phone them, you don't get
> > past the front-desk staff. If you email them, nothing comes back. If
> > your write to them, nothing gets returned. It all disappears into a
> > big white rectangle. It reminds me of the public service in the 1980s,
> > before office PC productivity. They process all their accounting/sales
> > data and dollars from Australia through their Ireland office… while
> > its true that the Australian population was once 75% Irish, that was a
> > long time ago (in the early 1800s).
> > * Telstra, the major Australian telco (previously, a government-owned
> > monopoly, still with nation-wide mobile coverage), only started
> > selling an Android phone in April 2010 - just a few months ago.
> > Vodafone Aust. Ltd. has sold one for a while longer - but they are a
> > much much smaller company, with much less coverage nationally, and
> > they only sell it via high-end phone plans.
> > * I'm yet to meet (or even see) a person on the street (outside the IT
> > world) that actually has an Android phone.
>
> > In summary, both your published piracy rate for Australia, and also
> > your actual 'total number of installs' for Australia, are 'far from
> > representative' IMHO. I suggest to you that there is something very
> > odd going on there with your app installs (supposedly) coming from
> > Australia?
>
> > Cheers
> > Steve
>
> > On Aug 27, 7:15 am, keyeslabs  wrote:
> > > Actually, the largest *contributor* to piracy was the US, but the
> > > highest piracy rates (as a percentage of total installs) were
> > > elsewhere.  For example, the US has a piracy rate (on my app) of about
> > > 70%, but Australia is more like 92%.  For the countries where apps may
> > > be purchased, here's the breakdown:
>
> > > Country Purchases       Installs        Pirated Installs        Piracy
> > Rate
> > > Australia       26      321     295     92%
> > > Austria 6       13      7       54%
> > > Canada  25      96      71      74%
> > > France  23      104     81      78%
> > > Germany 38      161     123     76%
> > > Italy   4       36      32      89%
> > > Japan   467     467     0       0%
> > > Netherlands     24      98      74      76%
> > > New Zealand     4       8       4       50%
> > > Spain   7       63      56      89%
> > > Switzerland     7       21      14      67%
> > > United Kingdom  108     335     227     68%
> > > United States   2051    6105    4054    66%
>
> > > The US isn't the highest, but still, it's disturbing how high the rate
> > > is in ALL of these countries where purchases could be made...
>
> > > Dave
>
> > > On Aug 26, 4:59 pm, niko20  wrote:
>
> > > > Excellent

Re: [android-developers] Google Maps: Let the user choose a location

2010-08-28 Thread Brad Gies


I assume you are using the "My Location" feature of Maps. Are you also 
attempting to use the network location if you don't have GPS? I find it 
works quite often. I use the code below in my OnCreate MapActivity and 
it doesn't fail very often.


lm = (LocationManager) 
getSystemService(Context.LOCATION_SERVICE);

if (lm != null)
{
Location loc = lm.getLastKnownLocation("gps");
if (loc == null)
loc = lm.getLastKnownLocation("network");

BUT, to just answer you question, you can use the "onTap" event of your 
overlay, determine your Lat/Lons and then use the Geocoder to get your 
address information. Really what you are doing is no different than the 
hundreds of Overlay examples you will find.




On 28/08/2010 5:32 AM, Dirk Vranckaert wrote:

Hey all,

I've been working on an application lately that is using GMaps to
display a location that is stored in the devices database. However
when no location is available (no GPS signal is available) the user
can go through an edit wizard and at a certain point he can add a
location himself. I already have to code to display the stored
location, but is it possible to write something so the user get's to
see a map and when he clicks/touches on a certain area a map pointer
appears and the location is stored.
Is that possible in any way? Is there any good online documentation
available? I searched through this group and on Google but couldn't
find anything usefull.

Kind regards,

Dirk



--
Sincerely,

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

Everything in moderation, including abstinence

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

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


[android-developers] Re: Piracy Breakdown by Country

2010-08-28 Thread nation-x
I am completely surprised at some of the responses here... but I am
not at all surprised with your results. I have been selling software
for over 10 years before I started developing Android apps and my
experience has been that the US always represents the highest amount
of piracy. Your "culture of piracy" label is absolutely deserved. The
sense of entitlement that people here have always amazes me and
that spans everyone from developers to consumers. They want everything
for free and everything done for them... Piracy aside, after releasing
free applications on the Android market and seeing the absolute
stupidity of the majority of comments and that same sense of
entitlement that I alluded to... I stopped releasing free apps... I
wrote my own anti-piracy measures (note how Astro does it with
expiring updates...) and I ignore stupid comments from users and
fellow developers.

Android Workz

On Aug 26, 4:22 pm, keyeslabs  wrote:
> Recently did an analysis of piracy rates by country for my app.  Found
> some very interesting tidbits that I think may be of interest to
> members of this group:  http://bit.ly/bSaoBe
>
> Dave

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


[android-developers] Re: back_key implementation

2010-08-28 Thread gcstang
You can also use this so that C is on the top instead of B so when you
click back it will go to A if you launch C from B :

On your Intent set it so the Activity you're launching is on Top which
means B will be removed from the previous position :

In B where you launch C add this flag :

Intent i;
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

On Aug 27, 3:29 am, SREEHARI  wrote:
> Hi Praveen,
>
>    Assume there are 3 activities A, B and C.
>    A is the 1st one. A starts B and B starts C. Usually when we click
> back button from C activity it will go to B. But u want the control to
> go to activity A, rite
>
> After starting the activity C from B, you can finish the activity B.
> So that A will be there on the top of C in the stack. So A will get
> called when u click back from C.
>
> Regards,
>
> SREEHARI

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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, google checkout minimal sum to be collected before payment.

2010-08-28 Thread nation-x
What an interesting thing to complain about... lol.

On Aug 28, 10:17 am, Zsolt Vasvari  wrote:
> http://checkout.google.com/support/sell/bin/answer.py?hl=en&answer=25400
>
> No, you get a single payment every work day.  If you don't like that
> schedule, because who wouldn't like 22 small deposits a month, you are
> out of luck.
>
> On Aug 28, 8:09 am, sblantipodi  wrote:
>
> > no words.
>
> > in this way getting the latest transactions from my ATM has no sense,
> > I will have dozens of $2 on it and
> > important payment will not be present.
>
> > Congratulations google, as always ;)
>
> > On Aug 27, 8:33 pm, TreKing  wrote:
>
> > > On Fri, Aug 27, 2010 at 12:34 PM, sblantipodi
> > > wrote:
>
> > > > is there a way to set google checkout to pay us only after our
> > > > balance surpassed a certain amount?
>
> > > I don't think so, at least I've not found a way from looking around.
>
> > > Checkout was really tacked on to Android and in no way designed to support
> > > small transactions for virtual goods.
>
> > > ---­--
> > > TreKing  - Chicago
> > > transit tracking app for Android-powered devices- Hide quoted text -
>
> > - Show quoted text -
>
>

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


[android-developers] Setup Multiple Alarms

2010-08-28 Thread LatoGT
Hi there,

I have some problems when I try to setup an alarm. I am using the
AlarmManager to set an alarm. This alarm is picked up by my Receiver
that creates a notification.

My first problem: When I setup two alarms, my notification thats init
by the alarm event always shows me the first input parameter. Whats
going wrong?

My second problem: I read that I should use an id for the notification
to cancel it, when its submitted. What is the best way to create
different ids? I just used javas math. Although the ids are not equals
in my tests, it is not really a good solution. Any ideas?

Here is my code. Although the titleString is not the same like in the
first init (my Log entry in initializeAlarm() shows that the first
input not equals a second input) the onReceive method tells me that
todoTitle is always the same.

private void initializeAlarm(String titleString, String alarmString){
if(alarmString != null && alarmString.length() == 16){
Intent intent = new Intent(this, AlarmReceiver.class);
intent.putExtra("todoTitle", titleString);
PendingIntent sender = PendingIntent.getBroadcast(this, 0,
intent, 0);

SimpleDateFormat sdf = new SimpleDateFormat("-MM-dd 
HH:mm");
Date date = new Date();
try {
date = sdf.parse(alarmString);
} catch (ParseException e) {
e.printStackTrace();
}
Calendar cal = Calendar.getInstance();
cal.setTime(date);

// Schedule the alarm!
AlarmManager am =
(AlarmManager)getSystemService(ALARM_SERVICE);
am.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
sender);

Log.v("test",intent.getStringExtra("todoTitle"));
}
}


public class AlarmReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
int notification_id = 
(int)(Math.random()*100*Math.random()*100);
final Bundle extras = intent.getExtras();
String tickerText = extras.getString("todoTitle");

NotificationManager mNotificationManager = (NotificationManager)
context.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.icon, 
"Todo
News", System.currentTimeMillis());

Intent activityIntent = new Intent(context, 
ToDosActivity.class);
activityIntent.putExtra("notificationId", notification_id);
activityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

PendingIntent startIntent = PendingIntent.getActivity(context, 
0,
activityIntent, 0);

notification.setLatestEventInfo(context, "Todo ansehen", 
tickerText,
startIntent);
notification.vibrate = new long[]{100,250};

mNotificationManager.notify(notification_id, notification);
}


}


Thanks for any ideas!

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


[android-developers] Re: Application installation

2010-08-28 Thread Surfer
Why not? Android Market does it..

On Aug 26, 2:50 pm, "{ Devdroid }"  wrote:
> On 26 August 2010 14:34, Surfer  wrote:
>
> > works. What i would like to do is perform asilentinstall,
>
> You should not be able to do so.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is there a way to request permissions from a user as you need them?

2010-08-28 Thread Brad Gies


Yeah... I agree with that, and I'd like to add that what I would really 
like to see is a(n easy) "Monitor this App" setting when you first 
install it if it has internet access. How I think it should work is that 
if the user wants to monitor the app, every outgoing packet (and maybe 
incoming) would be logged and then the user could view what was sent in 
the "Manage Applications" section of the settings. That way, it would be 
a sure thing that any malicious app would be caught very quickly by some 
user and then they should have an easy way to flag it so that it can be 
banned from the market (with some kind of review obviously).


Something like that would be a tremendous boost to Android as it would 
be perceived (even by the general public) to be very secure.


Brad.




On 28/08/2010 7:12 AM, Zsolt Vasvari wrote:

Let me try this from an end-user perspective.  Obviously, the whole
permission feature was designed by a developer and, IMO, it's not a
very good system in a usuability sense.

As an end user, I only care one and ONLY one permission:  INTERNET.  I
only look for that one permission and the rest is just noise and might
as well not even be shown.  Why?  Because I know as long as the app
has no way of getting my personal info off my phone, I am good, as far
as I am concerned, the app can read all my passwords and credit card
info it wants, if it cannot do much with it anyhow.

That said, the way the Internet permission is implemented is poor and
doesn't really tell you anything useful on which I can make my
decision on.  Currently, if I see "Internet" and need to scan the
other permissions as to what else the app can do and send out to
whomever.

What I would like to see is the Internet permission broken up into:

- Full unrestrictued internet access:  This is fine for a replacement
browser, but if anything else requests it, I probably wouldn't install
that app.
- Local network access only (for printing or network management apps.)
- An spelt out protocol/domain list that the app declares it wants to
have access to and nothing else be allowed.  This should be the most
appropriate for the majority of the apps.




On Aug 28, 1:46 am, Dianne Hackborn  wrote:

Well, we disagree.





On Fri, Aug 27, 2010 at 10:27 PM, Brad Gies  wrote:


I would argue the opposite :)
One of the handiest features of Windows Firewall is that you have the
option of "Displaying a notification" when it blocks a program, and when the
dialog shows up, you have the option of granting that program access, and
then it never bothers you again.
I do agree that the way it was done in Vista was absolutely horrible... but
a one time "Let this program do this" works VERY WELL, and I think it gets
around all the problems you mentioned.
In my opinion, the lack of this is the single most obvious failing in
Android.
Brad.
On 27/08/2010 5:36 PM, Dianne Hackborn wrote:

I think there is enough evidence that asking permission at time of need
doesn't generally work -- see the MIDP experience, Windows Vista/7 security,
etc.  There is a fundamental problem that at the point you ask the
permission, the user is wanting to accomplish some task at hand, and all you
are doing is bugging them.
And it gets much worse when you consider applications being able to run in
the background.  Do permission requests pop up on users from the background?
  Does a notification get posted that they respond (or not respond) to at
their leisure?
If you have a wall of permissions, the first thing I would suggest is
looking at those and seeing if you can trim it down.  In fact, doing things
that make it easier for apps to make use of lots of permissions are to me
counter-productive -- it is a good thing to make lots of permission use a
harder road.
I just had a look through the apps installed on my phone, and the *vast*
majority of them only require a couple permissions.  So someone who is using
a large number of permissions is going to stand out from what user's
normally see, as well they should.
 From the platform side, we also need to avoid making it easy to have lots
of permissions.  We need to be continuing to design the platform to reduce
the permissions that apps need.  For example, the window flag to keep the
screen on avoids the need of the power manager permission for most
applications; we should beef up our intent interactions with the contacts
app so applications can work with the user to select and modify applications
through that without using permissions; etc.
  Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://bgies.com
http://bistroblurb.com
http://ihottonight.com
http://forcethetruth.com
---
Everything in moderation, including abstinence
Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret
Mead
--
You received this 

[android-developers] Re: Android Market, google checkout minimal sum to be collected before payment.

2010-08-28 Thread Alessandro Pellizzari
On Sat, 28 Aug 2010 08:16:50 -0700, nation-x wrote:

> What an interesting thing to complain about... lol.

It can be a big problem here in Italy.
My bank charges me 1 euro for every transaction (in and out).

Receiving 66 cents (99 cents minus Google's 30%) is a cost instead of a 
gain, for me... But even receiving 10 euros means a 10% bank fee...

I think Google should correct this ASAP. They have it for AdSense.

Bye.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is there a way to request permissions from a user as you need them?

2010-08-28 Thread Brad Gies


Yes.. we do... and I normally don't disagree with you :). But, in this 
instance.. I REALLY do.


Let me expand on why I think it is a failing, and maybe you will see 
where I am coming from.


I'll use the Window Firewall as an example as it is the closest example 
I can think of. It deals with permissions and security. This may be more 
of a manifestation of how I use my computer, but I think many people 
share this :).


Assume I have a new install of Windows. I'm not very security conscious 
(I'm truly not.. if you want my email accounts, I have thousands more I 
can switch to, so I don't care), but I set my firewall to lock down 
everything because I do want some security, and otherwise I'm wide open. 
Then I start to install my programs. At this point none of them have 
internet access. Then one by one I start running them. Some of them will 
immediately popup the "Firewall is Blocking me" dialog. No problem 
I'm still in the installation phase anyway. When that happens, if it's a 
program I REALLY trust, I just grant the the "Allow Always" option. If 
it's a program I don't have complete faith in, I only grant the "Allow 
Once" option, and I pull out Wire Shark before I respond and monitor 
what it's doing. Then when (and if) I trust it, I give it the "Allow 
Always" option.


Doing it that way makes me feel very secure, even though I don't have 
big issues with security in the first place.


I really don't think I am the only person out there that feels this 
way I think Android would benefit from this.


Now.. do you get my point of view?... I'm not asking you to agree in 
terms of changing how you do things... you may work differently... but I 
think it's a valid point of view.


The way Android does it now. I just accept whatever the program asks for 
because until you use it, you don't really know how it wants to use the 
permission. By waiting until it wants to use the permission, I can make 
a (slightly) more informed choice on whether to grant the permission or 
not, especially if I have the option of saying "YES", "YES, but monitor 
it", or "NO", and that makes Android not only more secure but 
communicates that security to the user in a very effective manner.


Brad.



On 27/08/2010 10:46 PM, Dianne Hackborn wrote:

Well, we disagree.

On Fri, Aug 27, 2010 at 10:27 PM, Brad Gies > wrote:



I would argue the opposite :)

One of the handiest features of Windows Firewall is that you have
the option of "Displaying a notification" when it blocks a
program, and when the dialog shows up, you have the option of
granting that program access, and then it never bothers you again.

I do agree that the way it was done in Vista was absolutely
horrible... but a one time "Let this program do this" works VERY
WELL, and I think it gets around all the problems you mentioned.

In my opinion, the lack of this is the single most obvious failing
in Android.


Brad.


Sincerely,

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

Everything in moderation, including abstinence

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

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


[android-developers] ItemizedOverlay after error

2010-08-28 Thread kids
I'm very sorry,

the original program is

"public class GeoPointImageOverlay extends Overlay"

then I change to

"public class GeoPointImageOverlay extends
ItemizedOverlay"

this is an error in paragraph "public GeoPointImageOverlay(GeoPoint
gp, int i)"

I want to overlay the graphics change to item processing

but the middle do not know how to deal with

this is first code
http://paste.plurk.com/show/296366/

the second
http://paste.plurk.com/show/298851/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: permission denied when trying to pull apk from phone to computer

2010-08-28 Thread Anil
HTC MyTouch Slide. Yes, I can see the YouTube.apk from adb shell.

On Aug 28, 9:40 am, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> It worked on my Nexus One. What device are you using and are you sure
> that apk is actually on the device?
>
> -John Coryat

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


Re: [android-developers] Re: Android Market, google checkout minimal sum to be collected before payment.

2010-08-28 Thread Frank Weiss
I think it's something Google should fix, but I'm have a hard time
justifying it based solely on ATM and excessive bank charge issues.
Those would appear to be a choice of which bank accounts a developer
uses.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] User photo + latitude-like marker in Custom View

2010-08-28 Thread Frank Weiss
Here's a good starting point: http://github.com/jgilfelt/android-mapviewballoons

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

2010-08-28 Thread Frank Weiss
I suppose you'd be better off with a service per service instead of
one god service. The reason is that it make the code cleaner - you
don't need to manage multiple alarms and network connections in one
class. An exception would be a service that just does one kind of
thing, but handles a queue of requests. To avoid copy and pasting
common code, use a common abstract base class that extends Service.

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


[android-developers] how to set progress dialog time out

2010-08-28 Thread Mohammad Siddiqui
Hi everyone

I want to create a progress dialog that will be run for  a
predetermind time after that

it will be automatically dissmissed.how to do it in android

Thanks

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


[android-developers] Re: Best background practices

2010-08-28 Thread Federico Paolinelli
On 28 Ago, 18:32, Frank Weiss  wrote:
> I suppose you'd be better off with a service per service instead of
> one god service. The reason is that it make the code cleaner - you
> don't need to manage multiple alarms and network connections in one
> class. An exception would be a service that just does one kind of
> thing, but handles a queue of requests. To avoid copy and pasting
> common code, use a common abstract base class that extends Service.

Ok, it's what I wanted to do. One thing that I'd like to get better
explained is: I am aware that the service(s) run on the same thread of
the ui, so if I have more than one thread will they share the same
thread?? If they listen to the same broadcast for example, will the
intent be queued and served from one service at the time?

It's just curiosity, I know that the time consuming operations must be
performed in async tasks or threads.

Thanks

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


[android-developers] Re: Negative comment causing drop in sales

2010-08-28 Thread Michael A.
Thanks for pointing this out.

I hadn't noticed that feature of Androlib before, but this is a great
feature. I had an "user" making repeated comments on my app, and I
couldn't quite decide whether he was a legitimate user or an idiot.
Checking his history of comments turns up 90% of his comments of the
type "Eh", "Gay", "Lame" and "Sux". Good to have that question sorted
out.

Regards,

Michael A.

Yahel wrote:
> Take a look at this :
>
> http://www.androlib.com/android.comment.author.smoke1331-pqEAB.aspx
>
> The guys seems to be randomly picking apps and sending this comment :s
>
> Good luck.
>
> Yahel
>
> On 26 août, 14:28, abowman  wrote:
> > I've got an app in the marketplace that has no reported errors in the
> > developer console.  The last comment I received basically stated - if
> > the developer isn't going to fix the app everyone should get their
> > money back and the app should be taken off the marketplace.  Sales
> > have noticeable dropped ever since that comment was posted.
> >
> > What can I do about this?  The app is functioning as it should, but
> > now people see the comment and think that there is something wrong
> > with it.
> >
> > Is there anyway to respond to this false comment besides editing the
> > description of my app?
> >
> > Is there anyway to get the comment removed, since there is nothing
> > wrong with the app?  If there was something wrong, I would fix 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: Best background practices

2010-08-28 Thread Frank Weiss
I'm not a total expert on this...

Threads are really just a way of running multiple stacks/program
counters in the same address space. It's fair to assume they are
time-sliced. Services and Activities are run in a single UI thread
(AFAIK) and the precessing model is typical UI thread which calls
event methods on them sequentially (they don't really run like
classical processes). AsyncTasks run from a thread pool. The first few
can run concurrently, but after that the next one can't start until
another one is finished. Network connections are also pooled (AFAIK),
so that after you open a few, additional ones queue up.

To get workable background processing/networking, you'll probably need
to use alarms/saved state, since an app's process can be summarily
dismissed any time by the OS when other apps need resources. Although
some background processing that takes just seconds you might as well
do with an AsyncTask in an activity instead of a service.

Don't expect SDK apps to get any processing done when the device is
sleeping or turned off (I'm sure you know that already).

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

2010-08-28 Thread Federico Paolinelli
On Sat, Aug 28, 2010 at 7:25 PM, Frank Weiss  wrote:
> I'm not a total expert on this...
>
> Threads are really just a way of running multiple stacks/program
> counters in the same address space. It's fair to assume they are
> time-sliced. Services and Activities are run in a single UI thread
> (AFAIK) and the precessing model is typical UI thread which calls
> event methods on them sequentially (they don't really run like
> classical processes). AsyncTasks run from a thread pool. The first few
> can run concurrently, but after that the next one can't start until
> another one is finished. Network connections are also pooled (AFAIK),
> so that after you open a few, additional ones queue up.
>
> To get workable background processing/networking, you'll probably need
> to use alarms/saved state, since an app's process can be summarily
> dismissed any time by the OS when other apps need resources. Although
> some background processing that takes just seconds you might as well
> do with an AsyncTask in an activity instead of a service.
>
> Don't expect SDK apps to get any processing done when the device is
> sleeping or turned off (I'm sure you know that already).
>


Thanks a lot.  I just needed to know that my direction was the good one.


Federico

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


[android-developers] Re: Is there a way to request permissions from a user as you need them?

2010-08-28 Thread Greg Giacovelli

So I am not saying use a dialog everywhere. I am saying on a per
application basis. The problem with Windows Vista was that it was
everywhere. I am saying in addition to a small wall of permissions
representing the what permissions are needed for the core
functionality of the application, you also allow a upgrade
permissions. A user should not be scared to install an application
because of optional features of an application that compliment, a core
functionality. Apple, a company that basically gives all developers
access to frightenly everything, still prompts users on a per
application basis for location, notifications, etc.

I would say I would like to shrink that permission list but in order
to have functionality enjoyed by some, I am forced to have permissions
granted by all. Also doing a quick look at your list on your phone is
not.a really good test, you are a developer, ask someone outside the
tech industry the something for some good feedback.

I am not trying to be difficult I am just basing this on being an
iPhone user previously. This platform has more potential I think but
the focus on tech more so than user experience is what prevents this
platform's growth.

On Aug 28, 8:44 am, Brad Gies  wrote:
> Yes.. we do... and I normally don't disagree with you :). But, in this
> instance.. I REALLY do.
>
> Let me expand on why I think it is a failing, and maybe you will see
> where I am coming from.
>
> I'll use the Window Firewall as an example as it is the closest example
> I can think of. It deals with permissions and security. This may be more
> of a manifestation of how I use my computer, but I think many people
> share this :).
>
> Assume I have a new install of Windows. I'm not very security conscious
> (I'm truly not.. if you want my email accounts, I have thousands more I
> can switch to, so I don't care), but I set my firewall to lock down
> everything because I do want some security, and otherwise I'm wide open.
> Then I start to install my programs. At this point none of them have
> internet access. Then one by one I start running them. Some of them will
> immediately popup the "Firewall is Blocking me" dialog. No problem
> I'm still in the installation phase anyway. When that happens, if it's a
> program I REALLY trust, I just grant the the "Allow Always" option. If
> it's a program I don't have complete faith in, I only grant the "Allow
> Once" option, and I pull out Wire Shark before I respond and monitor
> what it's doing. Then when (and if) I trust it, I give it the "Allow
> Always" option.
>
> Doing it that way makes me feel very secure, even though I don't have
> big issues with security in the first place.
>
> I really don't think I am the only person out there that feels this
> way I think Android would benefit from this.
>
> Now.. do you get my point of view?... I'm not asking you to agree in
> terms of changing how you do things... you may work differently... but I
> think it's a valid point of view.
>
> The way Android does it now. I just accept whatever the program asks for
> because until you use it, you don't really know how it wants to use the
> permission. By waiting until it wants to use the permission, I can make
> a (slightly) more informed choice on whether to grant the permission or
> not, especially if I have the option of saying "YES", "YES, but monitor
> it", or "NO", and that makes Android not only more secure but
> communicates that security to the user in a very effective manner.
>
> Brad.
>
> On 27/08/2010 10:46 PM, Dianne Hackborn wrote:
>
>
>
> > Well, we disagree.
>
> > On Fri, Aug 27, 2010 at 10:27 PM, Brad Gies  > > wrote:
>
> >     I would argue the opposite :)
>
> >     One of the handiest features of Windows Firewall is that you have
> >     the option of "Displaying a notification" when it blocks a
> >     program, and when the dialog shows up, you have the option of
> >     granting that program access, and then it never bothers you again.
>
> >     I do agree that the way it was done in Vista was absolutely
> >     horrible... but a one time "Let this program do this" works VERY
> >     WELL, and I think it gets around all the problems you mentioned.
>
> >     In my opinion, the lack of this is the single most obvious failing
> >     in Android.
>
> >     Brad.
>
> Sincerely,
>
> Brad Gies
> ---
> Bistro Bot - Bistro 
> Blurbhttp://bgies.comhttp://bistroblurb.comhttp://ihottonight.comhttp://forcethetruth.com
> ---
>
> Everything in moderation, including abstinence
>
> Never doubt that a small group of thoughtful, committed people can
> change the world. Indeed. It is the only thing that ever has - Margaret Mead

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegr

[android-developers] Re: ADT causing CDT to build all C projects on Android app launch??

2010-08-28 Thread Robert Green
Jason,

Perfect!  I don't know how I missed that.  I'm glad a configurable
option was able to fix it.  I just tested and things seem to be
working correctly again.

Thanks for figuring it out!

On Aug 28, 5:33 am, Jason  wrote:
> Hi,
>
> I am one of the elusive few running this exact setup, and I too have
> been a bit annoyed by this "feature".
>
> I did just find this:
>
> Window->Preferences->C/C++
>
> There is a checkbox option entitled:
>
> "Build configurations only when there are Eclipse resource changes
> within the project and its references"
>
> I tried checking this at it seemed to eliminate these extra builds.
>
> I also tried making a small change to a C++ source file in my project
> and it picked up the change when I ran the app.. so seems to work.
>
> On Aug 28, 12:29 pm, Robert Green  wrote:
>
>
>
> > Hey guys,
>
> > I doubt there are too many people who run CDT in eclipse for native
> > apps also with ADT installed for Android, but in the off-chance that
> > someone here knows anything about this, my problem is that any time I
> > run any android app, my C builder kicks in for projects totally
> > unrelated.  I have no idea why and have been digging through settings
> > on everything, unable to find out why.  All I can think is that the
> > ADT pre-launch process triggers it via a refresh or some kind of catch-
> > all type call in eclipse API land that I'm unaware of.
>
> > Does anyone know anything about this?  It's very annoying to have a C
> > builder run for a different project than the one you're working on
> > every time you launch the app.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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, google checkout minimal sum to be collected before payment.

2010-08-28 Thread Brad Gies


Has anyone tried removing their bank account information and then when 
the amount is high enough that you would like it deposited, adding it 
back in just until you get the deposit? Or... maybe there is a way to 
disable/renable the account without removing it, so you don't have to 
set it up every time?


My apps are free so I don't have the problem, but it seems there should 
be some way to do it.


Brad


On 28/08/2010 7:17 AM, Zsolt Vasvari wrote:

http://checkout.google.com/support/sell/bin/answer.py?hl=en&answer=25400

No, you get a single payment every work day.  If you don't like that
schedule, because who wouldn't like 22 small deposits a month, you are
out of luck.

On Aug 28, 8:09 am, sblantipodi  wrote:

no words.

in this way getting the latest transactions from my ATM has no sense,
I will have dozens of $2 on it and
important payment will not be present.

Congratulations google, as always ;)

On Aug 27, 8:33 pm, TreKing  wrote:




On Fri, Aug 27, 2010 at 12:34 PM, sblantipodi
wrote:

is there a way to set google checkout to pay us only after our
balance surpassed a certain amount?

I don't think so, at least I've not found a way from looking around.
Checkout was really tacked on to Android and in no way designed to support
small transactions for virtual goods.
---­--
TreKing  - Chicago
transit tracking app for Android-powered devices- Hide quoted text -

- Show quoted text -


--
Sincerely,

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

Everything in moderation, including abstinence

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

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


Re: [android-developers] Re: Is there a way to request permissions from a user as you need them?

2010-08-28 Thread Dianne Hackborn
On Sat, Aug 28, 2010 at 7:12 AM, Zsolt Vasvari  wrote:

> Let me try this from an end-user perspective.  Obviously, the whole
> permission feature was designed by a developer and, IMO, it's not a
> very good system in a usuability sense.
>

Oh my, I so very disagree with this.

The current design is *very* much designed for end users.  In particular, it
is designed for *most* users.  Not geeks, like you and me and the others on
this thread.

In the vast majority of cases when people are unhappy with the way things
work, the requests being made are coming from geeks for them to do more
geeky things.  This thread is no exception.  And this is very much an
anti-goal.


> As an end user, I only care one and ONLY one permission:  INTERNET.  I
> only look for that one permission and the rest is just noise and might
> as well not even be shown.  Why?  Because I know as long as the app
> has no way of getting my personal info off my phone, I am good, as far
> as I am concerned, the app can read all my passwords and credit card
> info it wants, if it cannot do much with it anyhow.
>

Sorry but you are wrong.  When my wife got her Droid and started installing
apps, she quickly came to me asking about a game she was installing that
said it would read her contact data.  She knew what that meant, and wasn't
happy about it, and decided not to install the app.

In addition, there are so very many good reasons for an app to have access
to the internet, that basing all decision on that is ridiculous.  So you
aren't going to install multi-player games, or an app that lets you post to
twitter, or countless other things, or need to have strong faith in any such
app because you have no idea what stuff about you it will have access to?
 We aren't going there.


> What I would like to see is the Internet permission broken up into:
>
> - Full unrestrictued internet access:  This is fine for a replacement
> browser, but if anything else requests it, I probably wouldn't install
> that app.
> - Local network access only (for printing or network management apps.)
>

What does local network access on a cell phone even mean?  And how many
normal users are even going to really understand what this means?


> - An spelt out protocol/domain list that the app declares it wants to
> have access to and nothing else be allowed.  This should be the most
> appropriate for the majority of the apps.
>

I will claim again that this is another example of designing for geeks.

That said...  I would like to be able to have a way to enforce that apps can
only get to domains they declare they need.  In fact, we looked at doing it.
 You know what?  This is hard.  It is hard to enforce in the platform (think
about domains vs. IP addresses and how the kernel is going to figure out
that a particular socket is valid for the app).  It is hard to make
meaningful (think of the tricks you can make with safe looking domains that
redirect elsewhere).  It is hard to present to *normal* users in a
meaningful way that they can make a good decision about.

Of course if you figure out a good implementation of this, I'd be happy to
review the patch.

My focus right now is on simplifying permissions, giving apps other ways to
do things that are safe without requiring permissions, etc.  Making things
more complex for users is not desired.

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

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

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

[android-developers] Re: Negative comment causing drop in sales

2010-08-28 Thread cyxb
My favorite one-star Market comment: "Rate one star if you want the
full version to be free!".  Or another 1 star classic: "Make the full
version free cuz my mom won't let me buy it"

People are like lemmings.  A comment like that will cause an avalanche
of similar comments.  Likewise, a great comment may also trigger other
people to post nice comments.  I suppose it all evens out in the end,
or at least that's what I tell myself.

On Aug 28, 12:12 pm, "Michael A."  wrote:
> Thanks for pointing this out.
>
> I hadn't noticed that feature of Androlib before, but this is a great
> feature. I had an "user" making repeated comments on my app, and I
> couldn't quite decide whether he was a legitimate user or an idiot.
> Checking his history of comments turns up 90% of his comments of the
> type "Eh", "Gay", "Lame" and "Sux". Good to have that question sorted
> out.
>
> Regards,
>
> Michael A.
>
>
>
> Yahel wrote:
> > Take a look at this :
>
> >http://www.androlib.com/android.comment.author.smoke1331-pqEAB.aspx
>
> > The guys seems to be randomly picking apps and sending this comment :s
>
> > Good luck.
>
> > Yahel
>
> > On 26 août, 14:28, abowman  wrote:
> > > I've got an app in the marketplace that has no reported errors in the
> > > developer console.  The last comment I received basically stated - if
> > > the developer isn't going to fix the app everyone should get their
> > > money back and the app should be taken off the marketplace.  Sales
> > > have noticeable dropped ever since that comment was posted.
>
> > > What can I do about this?  The app is functioning as it should, but
> > > now people see the comment and think that there is something wrong
> > > with it.
>
> > > Is there anyway to respond to this false comment besides editing the
> > > description of my app?
>
> > > Is there anyway to get the comment removed, since there is nothing
> > > wrong with the app?  If there was something wrong, I would fix 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: Is there a way to request permissions from a user as you need them?

2010-08-28 Thread Dianne Hackborn
On Sat, Aug 28, 2010 at 11:13 AM, Greg Giacovelli wrote:

> So I am not saying use a dialog everywhere. I am saying on a per
> application basis. The problem with Windows Vista was that it was
> everywhere. I am saying in addition to a small wall of permissions
> representing the what permissions are needed for the core
> functionality of the application, you also allow a upgrade
> permissions. A user should not be scared to install an application
> because of optional features of an application that compliment, a core
> functionality. Apple, a company that basically gives all developers
> access to frightenly everything, still prompts users on a per
> application basis for location, notifications, etc.
>

I can guarantee you that if this facilities exists, apps will use it
extensively.  We'd have a design that encourages it: showing an app's
permissions up-front before installing is a strong barrier where the user is
most inclined to decide the scope of what the app is doing is not worth
their desire for it and reject it; asking permission later is when the user
is just trying to do things and much more inclined to just say "yes" instead
of canceling or uninstalling the app.

So if I am an app developer...  of course I will declare no permissions at
install, and request them all as needed.  I have a huge incentive to that.

I will say specifically about location -- we should have some additional
facilities to control that, showing the user which apps are using it and
individually turning it off.  But location is a special case (note it is the
only thing that there is a global setting to turn off as well).

And of course we don't have or need a permission for notifications.  A
design that doesn't require a permission but is still safe and secure is of
course best.  That is why I say I'd like us to introduce more ways for apps
to interact with contact data without needing a permission.  To me that is a
much better way to spend time.

I am not trying to be difficult I am just basing this on being an
> iPhone user previously. This platform has more potential I think but
> the focus on tech more so than user experience is what prevents this
> platform's growth.
>

I will claim pretty strongly that our security is much better than the
iPhone, and is actually a user-centric design without relying on implying to
the user things it is not (such as reviewing apps providing much security).
 There are certainly things about Android UX that can be improved in
relation to others, but we aren't trailing here.

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

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

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

Re: [android-developers] Re: Application installation

2010-08-28 Thread Dianne Hackborn
You can do it if you are pre-installed on the phone as part of the system.
 Otherwise you can not.

On Sat, Aug 28, 2010 at 8:17 AM, Surfer  wrote:

> Why not? Android Market does it..
>
> On Aug 26, 2:50 pm, "{ Devdroid }"  wrote:
> > On 26 August 2010 14:34, Surfer  wrote:
> >
> > > works. What i would like to do is perform asilentinstall,
> >
> > You should not be able to do so.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Popping up Toast (or something like it) from a thread

2010-08-28 Thread Bret Foreman
My user hits a button and kicks off a process that takes 3 steps in
about 10 seconds total. I'd like to pop up Toast messages "Step 1",
"Step 2", "Step 3", "Finished!" as the process progresses. I'm using
the standard Java Thread interface to run the process in a thread and
I've found that trying to pop up Toast from the thread causes an FC.
What is the best way to report this kind of progress - step by step
messages?

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

2010-08-28 Thread Nicolas Thibaut
hi keylabs:

1 - did you have used a "unique users" feature for your stats ?
because while user is not registered, you AAL will push a flurry
event.
if the user never register it will send an event each time he use the
app, so the pirated app will grow indefinitely.
 wrote:
> I am completely surprised at some of the responses here... but I am
> not at all surprised with your results. I have been selling software
> for over 10 years before I started developing Android apps and my
> experience has been that the US always represents the highest amount
> of piracy. Your "culture of piracy" label is absolutely deserved. The
> sense of entitlement that people here have always amazes me and
> that spans everyone from developers to consumers. They want everything
> for free and everything done for them... Piracy aside, after releasing
> free applications on the Android market and seeing the absolute
> stupidity of the majority of comments and that same sense of
> entitlement that I alluded to... I stopped releasing free apps... I
> wrote my own anti-piracy measures (note how Astro does it with
> expiring updates...) and I ignore stupid comments from users and
> fellow developers.
>
> Android Workz
>
> On Aug 26, 4:22 pm, keyeslabs  wrote:
>
>
>
> > Recently did an analysis of piracy rates by country for my app.  Found
> > some very interesting tidbits that I think may be of interest to
> > members of this group:  http://bit.ly/bSaoBe
>
> > Dave

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


Re: [android-developers] Popping up Toast (or something like it) from a thread

2010-08-28 Thread Miguel Morales
Anything that touches the UI MUST be done on the UI thread.  This is
the main thread that starts your app.
If you start off a thread, you must use an inter-thread communication method.

See this: http://android-developers.blogspot.com/2009/05/painless-threading.html

On Sat, Aug 28, 2010 at 2:45 PM, Bret Foreman  wrote:
> My user hits a button and kicks off a process that takes 3 steps in
> about 10 seconds total. I'd like to pop up Toast messages "Step 1",
> "Step 2", "Step 3", "Finished!" as the process progresses. I'm using
> the standard Java Thread interface to run the process in a thread and
> I've found that trying to pop up Toast from the thread causes an FC.
> What is the best way to report this kind of progress - step by step
> messages?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
http://developingthedream.blogspot.com/,
http://diastrofunk.com,
http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9

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


[android-developers] Column headings in TableLayout

2010-08-28 Thread Bret Foreman
I'd like to have column headings in a TableLayout and I'd like those
headings to remain visible when the table is scrolled vertically. One
option is to create a separate TableLayout just for the column
headings but it's a little complicated keeping the column widths
consistent between the two tables. Is there a better approach?

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

2010-08-28 Thread Nicolas Thibaut
I have implemented the LVL to send event on private webservices each
time the market respond an NOT ALLOWED.

Five minutes after the submission to android market, some events were
throwed.
How can this be possible ?

how a pirated app can be updated 5 minutes after a submission ?

On 27 août, 08:11, String  wrote:
> I suggest you start a new thread for this issue; this "sticky" topic
> is better used for generalized discussion of LVL, not debugging of
> individual issues.
>
> String
>
> On Aug 26, 5:31 am, Feelsocial  wrote:
>
>
>
> > Hi String , i have uploaded and saved my new licensed version 2 of my
> > application on market. And testing on my emulator but its still not
> > allowing. My version 2 is still not published? Moreover, application
> > licensed version 1 was running fine.Help me plzz..
>
> > Thanks,
>
> > On Aug 21, 2:29 pm, String  wrote:
>
> > > I think you need to upload an APK with versioncode="2" to your Market
> > > console. You don't need to publish it, but you do need to upload and
> > > save that version before LVL will give a correct response for it.
>
> > > String
>
> > > On Aug 21, 9:15 am, Feelsocial  wrote:
>
> > > > Hi all,
>
> > > > I am facing the problem in licensing of my old published paid apps.
> > > > Basically i have paid app which is published by version code 1. I
> > > > implemented the license code on it, it working fine to me. Licensing
> > > > server giving the response or allow that you can use it. But once i
> > > > changed version code from 1 to 2 in manifest file, then licensing
> > > > service not allow to use the app.Server giving the response dont
> > > > allow. I not understanderd, y it has relation with version code? i
> > > > can't publish the update version.???
>
> > > > Moreover, i am already login to my publisher account, i have setting
> > > > of LICENSED in edit profile section.
>
> > > > Is any body can help me?.. Help
>
> > > > On Jul 28, 1:19 am, Kaj Bjurman  wrote:
>
> > > > > I saw that entry, and have a question.
>
> > > > > What will happen if the user doesn't have network connectivity? Many
> > > > > users turn of data traffic when they travel to other countries, but
> > > > > the probably still want to use the licensed applications.
>
> > > > > On 27 Juli, 19:55, Trevor Johns  wrote:
>
> > > > > > Android fans,
> > > > > > For those of you who haven't already heard through our blog, we've
> > > > > > just launched the Android Market licensing service:
>
> > > > > >http://android-developers.blogspot.com/2010/07/licensing-service-for-...
>
> > > > > > From the above blog post:
>
> > > > > > "This simple and free service provides a secure mechanism to manage
> > > > > > access to all Android Market paid applications targeting Android 1.5
> > > > > > or higher. At run time, with the inclusion of a set of libraries
> > > > > > provided by us, your application can query the Android Market
> > > > > > licensing server to determine the license status of your users. It
> > > > > > returns information on whether your users are authorized to use the
> > > > > > app based on stored sales records."
>
> > > > > > Developer documentation is available here:
>
> > > > > >http://developer.android.com/guide/publishing/licensing.html
>
> > > > > > Happy coding!
>
> > > > > > --
> > > > > > Trevor Johns
> > > > > > Google Developer Programs, Androidhttp://developer.android.com

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


[android-developers] Re: Is there a way to request permissions from a user as you need them?

2010-08-28 Thread Chris Stratton
On Aug 28, 4:00 pm, Dianne Hackborn  wrote:

> Sorry but you are wrong.  When my wife got her Droid and started installing
> apps, she quickly came to me asking about a game she was installing that
> said it would read her contact data.  She knew what that meant, and wasn't
> happy about it, and decided not to install the app.

She should have had the option of installing the app without that
questionable permission.

Right now, such sensible user control is only available to those who
can modify the .apk, ie geeks..

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


[android-developers] Cupcake(API3) friendly way to pause/stop sound loops in SoundPool? Any ideas?

2010-08-28 Thread BryBam
Quick note: I'm using the SoundPool class

http://developer.android.com/reference/android/media/SoundPool.html

What I have here is a simple button that plays a looped sound while
it's pressed. It works great. However, sounds.autoPause(); wasn't
introduced until API 8 and I really need something that is cupcake
compatible (API 3) So i was going through the dev reference site
filtered by API 3 stuff and i saw pause so i figured i'd try
sounds.pause(sound); but it doesn't stop the sound when i release it.
(Maybe i'm just using it wrong?) Does anyone know of a cupcake
friendly way to stop this sound? thanks!

edit: also tried sounds.stop(sound); that didn't work either.

The Code:

My onCreate:

sounds = new SoundPool(5, AudioManager.STREAM_MUSIC, 0);
sound = sounds.load(this.getApplicationContext(), R.raw.red_long_one,
1);
Then here's my touch event

@Override public boolean onTouch(View arg0, MotionEvent event) {

switch (event.getAction() ) {
case MotionEvent.ACTION_DOWN:
System.out.println("touch");
sounds.play(sound, 1, 1, 1, -1, 1);
break;
case MotionEvent.ACTION_UP:
System.out.println("up");
//autoPause does not work on anything lower than sdk8
sounds.autoPause();
break;
}

return false;
}
I don't understand why sounds.stop(sound); doesn't seem to work, that
seems to but what any article i read recommends to do

I think it's worth noting that if i use sounds.stop(sound); it works
ONE time then after that it won't stop after i let go. but the first
press and release it works as intended.

Now, I know on the andoird site it says streamID and not soundID but i
have no idea how to get the streamID

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

2010-08-28 Thread Jeffrey
This almost works, but when I click on a point that has a smaller X
value than it's current position it reverses the Y Direction.

On Aug 27, 1:01 pm, Robert Green  wrote:
> Direction will be in the range -180 to 180 so don't use abs!  Always
> use sin/cos for y/x respectively when in y+ down 2D coordinate
> systems, otherwise x/y respectively.
>
> Here is kind of what you want
>
> // tickDelta should be something like .016f to .033f - definitely
> should total 1.0f per second :)
> float tickDelta = (currentMs - lastMs) / 1000f;
> // now mMoveSpeed can be expressed in units-per-second and it'll work
> at any framerate if you multiply by tickdelta
>
> float touchDelta = (float)(TouchY - V.CurY) / (TouchX - V.CurX);
> float dirRads = (float)Math.atan(touchDelta);
> float amountX = (float)Math.cos(dirRads) * mMoveSpeed * tickDelta;
> float amountY = (float)Math.sin(dirRads) * mMoveSpeed * tickDelta;
> x += amountX;
> y += amountY;
>
> // no additional checks needed.  This is how you do 2D directional
> movement.
> // this assumes that either TouchX/TouchY or V is set only when the
> touch is touched down initially so that a vector is made when the
> touch moves and that value is not updated.
>
> On Aug 26, 8:40 pm, Jeffrey  wrote:
>
>
>
> > I know this is more of a general programming question, but my Android
> > friends here have always been helpful. I am trying to make an image
> > move from one part of the screen to a position the user touches, as a
> > constant speed. I don't know the best way to go about doing this and
> > the way I have been trying to get to work is taxing my brain too much.
>
> > I have been using geometry to calculate slope, then using Sin *
> > movement speed to calculate the difference in X,Y coordinates.
>
> > This is the code I'm looking at:
>
> >                         TouchX = V.TX; (This is the touch event coordinates
> >                         TouchY =
> > V.TY;                                                      )
>
> >                         Slope = (TouchY - V.CurY) / (TouchX - V.CurX);  
> > (this figures out
> > the slope of the line to the touch point)
> >                         DegreeSlopeY = Math.atan(Slope);
> >                         DegreeSlopeY = Math.abs(DegreeSlopeY);
> >                                                         (this is so
> > that I can calculate the direction the image should travel along the
> > slope)
> >                         DegreeSlopeX = (90.0 - DegreeSlopeY);
> >                         NewY = (mMoveSpeed * Math.sin(DegreeSlopeY)); (This 
> > calculates the
> > shift in Y axis for the image)
> >                         NewX = (mMoveSpeed * Math.sin(DegreeSlopeX));  
> > (This calculates the
> > shift in X axis for the image)
> >                         if(TouchX < V.CenterX) NewX = -NewX;    (This is to 
> > finish
> > calculating the correct X axis direction to travel)
> >                         if(TouchY < V.CenterY) NewY = -NewY;   (This is to 
> > finish
> > calculating the correct X axis direction to travel)
>
> > The problem that I'm having is the image is veering way of course when
> > traveling in Y heavy paths. When traveling horizontally it works
> > almost perfect.
>
> > I know there is probably an easier way though I don't know how to use
> > a lot of things (like OpenGLES) so if your advice is to use a
> > different method please link a tutorial for that method if you know of
> > one.
>
> > Thanks in advance.

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


[android-developers] Re: how to set progress dialog time out

2010-08-28 Thread Kumar Bibek
Spawn a thread, wait for a few seconds, and then dismiss the dialog.
There's no default way to set a timeout.

May be you can over-ride the toast class to create one to stay afloat
longer.

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

On Aug 28, 9:46 pm, Mohammad Siddiqui  wrote:
> Hi everyone
>
> I want to create a progress dialog that will be run for  a
> predetermind time after that
>
> it will be automatically dissmissed.how to do it in android
>
> Thanks

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


[android-developers] Re: Popping up Toast (or something like it) from a thread

2010-08-28 Thread Bret Foreman
Brilliant! This is exactly what I was looking for.

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


[android-developers] Re: Is there a way to request permissions from a user as you need them?

2010-08-28 Thread Mark Carter
I've just released an app that requires READ_CONTACTS for the sole
purpose of displaying names instead of phone numbers (of SMS
messages). Its really not necessary at all but just looks better.
Being able to specify that permission as optional would be much
better. If the user rejects it then the app can happily just show the
phone number instead.

On Aug 29, 12:04 am, Chris Stratton  wrote:
> On Aug 28, 4:00 pm, Dianne Hackborn  wrote:
>
> > Sorry but you are wrong.  When my wife got her Droid and started installing
> > apps, she quickly came to me asking about a game she was installing that
> > said it would read her contact data.  She knew what that meant, and wasn't
> > happy about it, and decided not to install the app.
>
> She should have had the option of installing the app without that
> questionable permission.
>
> Right now, such sensible user control is only available to those who
> can modify the .apk, ie geeks..

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

2010-08-28 Thread Jeffrey
The problem is that it is only moving the image one direction along
the slope of the line. I've tried making a condition that checks to
see if the target area is to the left of the current position, and if
so then make the X/Y differences negative, but that works very
sporadically, and make the image move in crazy ways sometime.

On Aug 28, 5:33 pm, Jeffrey  wrote:
> This almost works, but when I click on a point that has a smaller X
> value than it's current position it reverses the Y Direction.
>
> On Aug 27, 1:01 pm, Robert Green  wrote:
>
>
>
> > Direction will be in the range -180 to 180 so don't use abs!  Always
> > use sin/cos for y/x respectively when in y+ down 2D coordinate
> > systems, otherwise x/y respectively.
>
> > Here is kind of what you want
>
> > // tickDelta should be something like .016f to .033f - definitely
> > should total 1.0f per second :)
> > float tickDelta = (currentMs - lastMs) / 1000f;
> > // now mMoveSpeed can be expressed in units-per-second and it'll work
> > at any framerate if you multiply by tickdelta
>
> > float touchDelta = (float)(TouchY - V.CurY) / (TouchX - V.CurX);
> > float dirRads = (float)Math.atan(touchDelta);
> > float amountX = (float)Math.cos(dirRads) * mMoveSpeed * tickDelta;
> > float amountY = (float)Math.sin(dirRads) * mMoveSpeed * tickDelta;
> > x += amountX;
> > y += amountY;
>
> > // no additional checks needed.  This is how you do 2D directional
> > movement.
> > // this assumes that either TouchX/TouchY or V is set only when the
> > touch is touched down initially so that a vector is made when the
> > touch moves and that value is not updated.
>
> > On Aug 26, 8:40 pm, Jeffrey  wrote:
>
> > > I know this is more of a general programming question, but my Android
> > > friends here have always been helpful. I am trying to make an image
> > > move from one part of the screen to a position the user touches, as a
> > > constant speed. I don't know the best way to go about doing this and
> > > the way I have been trying to get to work is taxing my brain too much.
>
> > > I have been using geometry to calculate slope, then using Sin *
> > > movement speed to calculate the difference in X,Y coordinates.
>
> > > This is the code I'm looking at:
>
> > >                         TouchX = V.TX; (This is the touch event 
> > > coordinates
> > >                         TouchY =
> > > V.TY;                                                      )
>
> > >                         Slope = (TouchY - V.CurY) / (TouchX - V.CurX);  
> > > (this figures out
> > > the slope of the line to the touch point)
> > >                         DegreeSlopeY = Math.atan(Slope);
> > >                         DegreeSlopeY = Math.abs(DegreeSlopeY);
> > >                                                         (this is so
> > > that I can calculate the direction the image should travel along the
> > > slope)
> > >                         DegreeSlopeX = (90.0 - DegreeSlopeY);
> > >                         NewY = (mMoveSpeed * Math.sin(DegreeSlopeY)); 
> > > (This calculates the
> > > shift in Y axis for the image)
> > >                         NewX = (mMoveSpeed * Math.sin(DegreeSlopeX));  
> > > (This calculates the
> > > shift in X axis for the image)
> > >                         if(TouchX < V.CenterX) NewX = -NewX;    (This is 
> > > to finish
> > > calculating the correct X axis direction to travel)
> > >                         if(TouchY < V.CenterY) NewY = -NewY;   (This is 
> > > to finish
> > > calculating the correct X axis direction to travel)
>
> > > The problem that I'm having is the image is veering way of course when
> > > traveling in Y heavy paths. When traveling horizontally it works
> > > almost perfect.
>
> > > I know there is probably an easier way though I don't know how to use
> > > a lot of things (like OpenGLES) so if your advice is to use a
> > > different method please link a tutorial for that method if you know of
> > > one.
>
> > > Thanks in advance.

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


[android-developers] Re: Game math/logic calulating movement

2010-08-28 Thread Jeffrey
Okay, figured it out. I had some remnants from an old system still in
there and was referencing a variable that wasn't being updated
correctly.

Thank you for you help :)

On Aug 28, 5:47 pm, Jeffrey  wrote:
> The problem is that it is only moving the image one direction along
> the slope of the line. I've tried making a condition that checks to
> see if the target area is to the left of the current position, and if
> so then make the X/Y differences negative, but that works very
> sporadically, and make the image move in crazy ways sometime.
>
> On Aug 28, 5:33 pm, Jeffrey  wrote:
>
>
>
> > This almost works, but when I click on a point that has a smaller X
> > value than it's current position it reverses the Y Direction.
>
> > On Aug 27, 1:01 pm, Robert Green  wrote:
>
> > > Direction will be in the range -180 to 180 so don't use abs!  Always
> > > use sin/cos for y/x respectively when in y+ down 2D coordinate
> > > systems, otherwise x/y respectively.
>
> > > Here is kind of what you want
>
> > > // tickDelta should be something like .016f to .033f - definitely
> > > should total 1.0f per second :)
> > > float tickDelta = (currentMs - lastMs) / 1000f;
> > > // now mMoveSpeed can be expressed in units-per-second and it'll work
> > > at any framerate if you multiply by tickdelta
>
> > > float touchDelta = (float)(TouchY - V.CurY) / (TouchX - V.CurX);
> > > float dirRads = (float)Math.atan(touchDelta);
> > > float amountX = (float)Math.cos(dirRads) * mMoveSpeed * tickDelta;
> > > float amountY = (float)Math.sin(dirRads) * mMoveSpeed * tickDelta;
> > > x += amountX;
> > > y += amountY;
>
> > > // no additional checks needed.  This is how you do 2D directional
> > > movement.
> > > // this assumes that either TouchX/TouchY or V is set only when the
> > > touch is touched down initially so that a vector is made when the
> > > touch moves and that value is not updated.
>
> > > On Aug 26, 8:40 pm, Jeffrey  wrote:
>
> > > > I know this is more of a general programming question, but my Android
> > > > friends here have always been helpful. I am trying to make an image
> > > > move from one part of the screen to a position the user touches, as a
> > > > constant speed. I don't know the best way to go about doing this and
> > > > the way I have been trying to get to work is taxing my brain too much.
>
> > > > I have been using geometry to calculate slope, then using Sin *
> > > > movement speed to calculate the difference in X,Y coordinates.
>
> > > > This is the code I'm looking at:
>
> > > >                         TouchX = V.TX; (This is the touch event 
> > > > coordinates
> > > >                         TouchY =
> > > > V.TY;                                                      )
>
> > > >                         Slope = (TouchY - V.CurY) / (TouchX - V.CurX);  
> > > > (this figures out
> > > > the slope of the line to the touch point)
> > > >                         DegreeSlopeY = Math.atan(Slope);
> > > >                         DegreeSlopeY = Math.abs(DegreeSlopeY);
> > > >                                                         (this is so
> > > > that I can calculate the direction the image should travel along the
> > > > slope)
> > > >                         DegreeSlopeX = (90.0 - 
> > > > DegreeSlopeY);
> > > >                         NewY = (mMoveSpeed * Math.sin(DegreeSlopeY)); 
> > > > (This calculates the
> > > > shift in Y axis for the image)
> > > >                         NewX = (mMoveSpeed * Math.sin(DegreeSlopeX));  
> > > > (This calculates the
> > > > shift in X axis for the image)
> > > >                         if(TouchX < V.CenterX) NewX = -NewX;    (This 
> > > > is to finish
> > > > calculating the correct X axis direction to travel)
> > > >                         if(TouchY < V.CenterY) NewY = -NewY;   (This is 
> > > > to finish
> > > > calculating the correct X axis direction to travel)
>
> > > > The problem that I'm having is the image is veering way of course when
> > > > traveling in Y heavy paths. When traveling horizontally it works
> > > > almost perfect.
>
> > > > I know there is probably an easier way though I don't know how to use
> > > > a lot of things (like OpenGLES) so if your advice is to use a
> > > > different method please link a tutorial for that method if you know of
> > > > one.
>
> > > > Thanks in advance.

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


[android-developers] Re: Why is DialogPreference abstract?

2010-08-28 Thread Kumar Bibek
First of all, DialogPreference is not meant to show a normal dialog
anyway. This is used in Preferences.

I would suggest that you extend the Dialog class. That should help you
in all ways to show your license. You can customize the layout,
buttons, title etc.

http://developer.android.com/reference/android/app/Dialog.html

-Kumar Bibek
http://techdroid.blogspot.com

On Aug 26, 7:45 am, Zsolt Vasvari  wrote:
> If I want to use a DialogPreference to show a pop-up dialog, for
> example, for a license agreement, I have to derive from
> DialogPreference:
>
> public class LicensePreference extends DialogPreference {
>
>     public LicensePreference(Context context, AttributeSet attrs)
> {
>         super(context, attrs);
>     }
>
>     public LicensePreference(Context context, AttributeSet attrs, int
> defStyle)     {
>         super(context, attrs, defStyle);
>     }
>
> }
>
> This seems unneccessary and silly, what was the reasoning behind
> making DialogPrefernce abstract?

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

2010-08-28 Thread Kumar Bibek
Yup, you are right, It's well documented I guess.

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

On Aug 27, 11:47 pm, OldSkoolMark  wrote:
> I've resolved the issue. Not sure if this is a bug, feature, or is
> merely an undocumented feature. It appears that the child projection
> you supply to your ExpandableListAdapter's constructor needs to
> include the _ID field of the child table.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Signing key got corrupted some how. Getting Invalid Keystore Format in the Eclipse signing wizard.

2010-08-28 Thread Kumar Bibek
Bad luck :(

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

On Aug 26, 10:09 pm, niko20  wrote:
> I have 3 backups of my keyremember, BACK THAT KEY UP
>
> On Aug 26, 10:38 am, TreKing  wrote:
>
> > On Wed, Aug 25, 2010 at 1:02 PM, Bryan
> > wrote:
>
> > > I have a paid application, that I recently published.
>
> > Congrats.
>
> > > For one reason or another, I didn't make a backup copy of the
> > > key signature.
>
> > Uh oh.
>
> > > Would I issue refunds for the original purchase for users that purchase 
> > > the
> > > new, separate application?
>
> > Probably, if they even managed to find out that you've launched a new one.
>
> > > That is what I had thought of as a solution, but am not sure how
> > > that works, or what the process is to do that, if it's even possible.
>
> > For each order you have in Google Checkout, clicking the summary brings you
> > to a detail page for the order. Around the top center there is a button for
> > "Refund Some Money" or something like that.
>
> > --- 
> > --
> > TreKing  - Chicago
> > transit tracking app for Android-powered devices

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


[android-developers] Re: Crop an image

2010-08-28 Thread lgonc...@gmail.com
In the ImageView -> android:scaleType="centerCrop"

http://developer.android.com/reference/android/widget/ImageView.html#attr_android:scaleType

On Aug 16, 9:36 am, Nea  wrote:
> I have an imageview which has a photo taken with the camera as its
> background and a frame as it's foreground (src). In that way the photo
> is positioned behind the frame so the photo get's a nice border.
>
> The imageview is a square (265x265dip). Now the problem is that photos
> taken are rectangular and thuse they are squeezed into the imageview
> making them look akward.
>
> So how can I crop the bitmap of the photo so it is fitted as a square
> so I can then put it as a background for the imageview?

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


[android-developers] onCellLocationChanged and updateNetworkNameExtension showing up in Log files. Where do these come from? and can I make them stop?

2010-08-28 Thread Greg Siano
I'm making a game, but the game lags a bit every time
onCellLocationChanged or updateNetworkNameExtension shows up in my Log
file.  What is making these two run? Is there a way to make them not
run?

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


[android-developers] onCellLocationChanged and updateNetworkNameExtension showing up in Log files. Where do these come from? and can I make them stop?

2010-08-28 Thread Greg Siano
I'm making a game, but the game lags a bit every time
onCellLocationChanged or updateNetworkNameExtension shows up in my Log
file.  What is making these two run? Is there a way to make them not
run?

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

2010-08-28 Thread Michael
Hi,
I would like to create a layout that would have a Checkbox, then a
divider, then a listview with single choice mode.

I tried this


http://schemas.android.com/apk/res/android";>









with this


lView = (ListView) findViewById(R.id.ListView01);
//lView = (ListView) findViewById(R.id.list);
//  Set option as Multiple Choice. So that user can able to select
more the one option from list
lView.setAdapter(new ArrayAdapter(this,

android.R.layout.simple_list_item_single_choice, lv_items));
lView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

lView.setItemChecked(0, true);


but it didn't work.
I can't seem to get a checkbox on top of a listview properly. I also
would like for the words to be to the left of the checkbox. Any help
on this would be much appreciated!

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


[android-developers] Re: Creating a JTree-like widget for Android?

2010-08-28 Thread FractalBob


On Aug 27, 8:08 am, TreKing  wrote:
> On Fri, Aug 27, 2010 at 9:20 AM, FractalBob  wrote:
> > Thanks for the pointer.
>
> You're welcome!
>
> > It seems the objection to a JTree like view is that you'd run out of space
> > on a small screen, but that's not valid,
> > since you could wrap the tree in a scrollview.
>
> That's one objection. The other problem is that the size of the items in the
> list would either have to be very small to accommodate the whole list, or,
> if you wrap it in a scroll view, require scrolling in every direction just
> to navigate the thing as sub-nodes expand.
>
> The benefit of a JTree type control is it presents a simplified overview of
> a complex hierarchy. On a mobile platform, you mostly lose that simplified
> overview and it can result in more complexity and confusion.
>
> > I guess I'll have to abandon my project until a tree view of some
> > kind makes it to Android, as I don't want to use menus as suggested in
> > the link;
>
> If you're abandoning your project because one type of control is not
> available, your project was not worth doing to begin with.
The project is definitely worth completing, but it's discouraging to
not have a slick interface unit like a tree available. However, I'll
think about alternatives in the meantime.
>
> If you're going to wait until it makes it to Android, you're probably going
> to waiting quite a long time.
>
> If you think this type of control would actually be usable / preferable for
> you project, there is absolutely nothing stopping you from writing your own
> custom view and adapter that meets your needs.
Ummm...I think I'll pass on that!
>
> it would be too klunky, IMO.
>
>
>
> No more so than trying to navigate an entire tree on a single screen with
> the size, scrolling, and selection issues it would present.
>
> Good luck with your project, if you decide to continue it.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


RE: [android-developers] Popping up Toast (or something like it) from a thread

2010-08-28 Thread Tommy
check out runOnUiThread() its exactly what you need. I don't remember the
syntax right off the top of my head but if you google runOnUiThread android
you'll get an example.

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Bret Foreman
Sent: Saturday, August 28, 2010 5:45 PM
To: Android Developers
Subject: [android-developers] Popping up Toast (or something like it) from a
thread

My user hits a button and kicks off a process that takes 3 steps in
about 10 seconds total. I'd like to pop up Toast messages "Step 1",
"Step 2", "Step 3", "Finished!" as the process progresses. I'm using
the standard Java Thread interface to run the process in a thread and
I've found that trying to pop up Toast from the thread causes an FC.
What is the best way to report this kind of progress - step by step
messages?

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

2010-08-28 Thread Tommy
Try using a relative layout linear from my understanding won't let you lay
objects on top of each other. Or an absolute layout but those aren't too
good when it comes to scaling up/down for different screen sizes.

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Michael
Sent: Saturday, August 28, 2010 9:33 PM
To: Android Developers
Subject: [android-developers] Layout question

Hi,
I would like to create a layout that would have a Checkbox, then a
divider, then a listview with single choice mode.

I tried this


http://schemas.android.com/apk/res/android";>









with this


lView = (ListView) findViewById(R.id.ListView01);
//lView = (ListView) findViewById(R.id.list);
//  Set option as Multiple Choice. So that user can able to
select
more the one option from list
lView.setAdapter(new ArrayAdapter(this,

android.R.layout.simple_list_item_single_choice, lv_items));
lView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

lView.setItemChecked(0, true);


but it didn't work.
I can't seem to get a checkbox on top of a listview properly. I also
would like for the words to be to the left of the checkbox. Any help
on this would be much 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

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


[android-developers] Cannot use explicit intents to call another application?

2010-08-28 Thread Anil
Was trying to call another application using an *explicit* intent, but
am finding it does not seem possible.
I do not wish to use implicit intents.
To test it out, try calling the YouTube main activity.

Intent i = new Intent();
ComponentName  cn = new
ComponentName("com.google.android.youtube","com.google.android.youtube.HomeActivity.class");
i.setComponent(cn);
startActivity(i);


I get this error:

08-29 00:54:26.598: ERROR/AndroidRuntime(7332): Caused by:
android.content.ActivityNotFoundException: Unable to find explicit
activity class {com.google.android.youtube/
com.google.android.youtube.HomeActivity.class}; have you declared this
activity in your AndroidManifest.xml?

Does anyone know whether this is possible? (using explicit intents to
call another application)
thanks,
Anil


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


[android-developers] Input Method Framework: How to use?

2010-08-28 Thread Tez
Hi,

I need to learn how to use the IMF to design a soft keyboard. Please
point me to some resources that will help me understand how to do it
from the ground up. Something other than the SDK sample

Cheers,
Earlence

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

2010-08-28 Thread Kostya Vasilyev
Michael,

You didn't explain on how exactly this did not work, but...

I believe you want ListView height to be "fill_parent".

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

29.08.2010 5:33 пользователь "Michael"  написал:

Hi,
I would like to create a layout that would have a Checkbox, then a
divider, then a listview with single choice mode.

I tried this


http://schemas.android.com/apk/res/android";>









with this


lView = (ListView) findViewById(R.id.ListView01);
   //lView = (ListView) findViewById(R.id.list);
//  Set option as Multiple Choice. So that user can able to
select
more the one option from list
   lView.setAdapter(new ArrayAdapter(this,

 android.R.layout.simple_list_item_single_choice, lv_items));
   lView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

   lView.setItemChecked(0, true);


but it didn't work.
I can't seem to get a checkbox on top of a listview properly. I also
would like for the words to be to the left of the checkbox. Any help
on this would be much 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Cannot use explicit intents to call another application?

2010-08-28 Thread Kostya Vasilyev
Don't need the trailing ".class", take it out (in component name).

Trailing .class is Java syntax to get the class object of another object,
that's why you often see it for starring activities and services in the same
application.

Class *names* however don't have ".class" at the end.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

29.08.2010 9:01 пользователь "Anil"  написал:

Was trying to call another application using an *explicit* intent, but
am finding it does not seem possible.
I do not wish to use implicit intents.
To test it out, try calling the YouTube main activity.

   Intent i = new Intent();
   ComponentName  cn = new
ComponentName("com.google.android.youtube","com.google.android.youtube.HomeActivity.class");
   i.setComponent(cn);
   startActivity(i);


I get this error:

08-29 00:54:26.598: ERROR/AndroidRuntime(7332): Caused by:
android.content.ActivityNotFoundException: Unable to find explicit
activity class {com.google.android.youtube/
com.google.android.youtube.HomeActivity.class}; have you declared this
activity in your AndroidManifest.xml?

Does anyone know whether this is possible? (using explicit intents to
call another application)
thanks,
Anil


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

2010-08-28 Thread Kostya Vasilyev
What I ended up doing in my app, is:

I use a ListView instead, and, just like you, I created a header view that
doesn't scroll.

ListView items, as well as the header, use RelativeLayout. Some views are
positioned left to right, others, right to left, and one view in the middle
grows when in landscape mode.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

29.08.2010 1:57 пользователь "Bret Foreman" 
написал:

I'd like to have column headings in a TableLayout and I'd like those
headings to remain visible when the table is scrolled vertically. One
option is to create a separate TableLayout just for the column
headings but it's a little complicated keeping the column widths
consistent between the two tables. Is there a better approach?

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

2010-08-28 Thread Kostya Vasilyev
One of my apps received more than the usual number of "can't open" comments
within the last week.

I guess the word "widget" in its title isn't understood for some reason

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

29.08.2010 0:31 пользователь "cyxb"  написал:

My favorite one-star Market comment: "Rate one star if you want the
full version to be free!".  Or another 1 star classic: "Make the full
version free cuz my mom won't let me buy it"

People are like lemmings.  A comment like that will cause an avalanche
of similar comments.  Likewise, a great comment may also trigger other
people to post nice comments.  I suppose it all evens out in the end,
or at least that's what I tell myself.


On Aug 28, 12:12 pm, "Michael A."  wrote:
> Thanks for pointing this out

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