[android-developers] When to close database in ContentProvider

2009-03-01 Thread Wah

I am trying to write a ContentProvider which itself is based on a
SqlLite database. I am puzzled when I need to close the database
because ContentProvider has onCreate( ) function but not onDestroy( )
function.

I downloaded the android source code tree, and found
com.example.codelab.rssexample.RssContentProvider

It appears this class called openDatabase but never close on it:

=
@Override
public boolean onCreate() {
...
final Context con = getContext();
try{
mDb = mDbHelper.openDatabase(getContext(), DATABASE_NAME,
null, DB_V
ERSION);
...
 }

=
mDb.close( ) is never called
=

If there is no onDestroy() from ContentProvider and we don't call close
( ) on databases, doesn't this lead to some kind of memory/resource
leak?

Wah
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 application knows that the view of device changed from portrait to landscape.

2009-03-01 Thread Kather Jailani
hi, look for help on onConfigurationChanged event and check the orientaion
against Configuration.ORIENTATION_LANDSCAPE /
Configuration.ORIENTATION_PORTRAIT.
This event expose config as a parameter as given below and also add
android:configChanges to manifest

onConfigurationChanged (Configuration yourConfig)



On Sat, Feb 28, 2009 at 6:13 AM, jj jagtap...@gmail.com wrote:


 how the application knows that the view of device has changed from
 portrait to landscape.
  is there any way to know the application about view change.

 thank you
 


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



[android-developers] Re: SAXParser fails on some RSS feeds

2009-03-01 Thread 3D

I'm working on the same problem right now.  I'll take a look at
TagSoup.  Otherwise, I was just thinking of scrubbing out the invalid
tokens before sending it to the xml reader.  Please let me know what
you find/ decide to do.


On Feb 28, 8:19 pm, Tim Bray timb...@gmail.com wrote:
 On Sat, Feb 28, 2009 at 5:53 PM, grennis gren...@gmail.com wrote:

  I'm using the SAX parser to read some RSS feeds and have found a
  problem

 In general you can't use a real XML processor, which the java SAX
 stuff is, to read RSS feeds.  Lots and lots of them aren't XML at all.
  Atom 1.0 is better, but lots of feeds aren't Atom.  Once somebody
 ports either Jython or JRuby and gets it really running, the problem
 is solved because you can use the excellent Feedparser library, which
 Just Works on any imaginable feed.  In the interim, you might want to
 consider John Cowan's excellent TagSoup, which handles what its name
 suggests. Libxml2 also has a forgiving parser but I don't know if
 there's a Java interface to that. -T

 . Some feeds, for example CNN Money Top Stories, have embedded

  some characters in their content, I.e. the copyright symbol. Well,
  that's not valid XML and the SAXParser fails with an exception
  invalid token.

  The only help I have seen given is to fix the XML at the source and
  that's not an option obviously. So, I can think of 2 options and they
  both stink: (a) read the content first, scrub it, and then pass it to
  the parser. (B) use DOM instead of SAX.

  What I *want* to do is make the parser a little more forgiving and
  just accept or discard/ignore the bad text. I'm not have any luck with
  setErrorHandler. My error handler does not get called.

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



[android-developers] Re: SAXParser fails on some RSS feeds

2009-03-01 Thread Tim Bray

On Sun, Mar 1, 2009 at 12:48 AM, 3D ernestgfre...@gmail.com wrote:

 I'm working on the same problem right now.  I'll take a look at
 TagSoup.  Otherwise, I was just thinking of scrubbing out the invalid
 tokens before sending it to the xml reader.  Please let me know what
 you find/ decide to do.

Scrubbing it will almost certainly not work.  There is some seriously
weird shit in RSS feeds out there.  Not just wonky characters.  The
reason is that most blog authoring systems let you grab arbitrary
claims-to-be-html off the web and drop it into your blog, so it ends
up in your feed, and even with the double-escaping voodoo you see in
RSS, the poison remains.

As an interim step, you could simply take Atom when there's a choice
of feeds, and refuse to process bad RSS.  The proportion of feeds that
have Atom alternatives available is pretty high.  The reason this
works is that one or two of the leading feed-readers decided to use
real persnickety XML parsers for Atom, so the publishing industry has
done the necessary whatevers to make sure they're clean.

The *right* answer is FeedParser, sigh.  -Tim

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Pls help: how to reinstall dev phone?

2009-03-01 Thread Yossi

Hi Faber, Travis,

I managed to fix it. it was the DroidSans.ttf that was corrupted
(tried to replace it before). After copying it again, the phone is
alive!

Thanks for your support.
Yossi

On Mar 1, 5:25 am, Travis Cross t...@travislists.com wrote:
 Yossi wrote:
  this is what it shows
  DREA100 PVT 32B
  HBOOT-0.95.3000
  CPLD-4
  RADIO-1.22.12.29

  Oct 20 2008

  it also has a yellow line in the middle of the screen which says
  Serial0 in the middle.

  what does it mean?

 That's good.  You're in fastboot mode, and your phone can be recovered
 with a bit of work.  Take a look at the discussion of what you can do in
 fastboot mode here:

 http://andblogs.net/tag/bootloader/

 The crucial command you'll be running will probably look like this:

 $ fastboot flash system adp1-system.img

 You'll need a full software image for your ADP1.  Google doesn't
 distribute these, apparently because of licensing issues with the
 drivers.  So you'll either need to build your own by following the
 directions here:

 http://source.android.com/documentation/building-for-dreamhttp://source.android.com/download

 ...or you can try one of the many images available on the web.

 You're basically in the position right now of reinstalling all the
 software on your device above the bootloader.  Of course, this is
 exactly what the ADP1 is meant for, so you're in luck!  Of course, some
 hacking is going to be required.  Hopefully this has pointed you in the
 right direction.  Be sure to report back on this thread what you end up
 doing and how it turns out for you.

 Cheers,

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



[android-developers] displaying contents

2009-03-01 Thread karthick

hi...am an engg student from india  how  to display the contents
retrieved from a server in android application
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to get more sales on the Android Market

2009-03-01 Thread Al Sutton

non-technical users do not use linux, whereas non-technical users do 
buy G1 phones

Android, and hence the G1 is Linux based, therefore that statement can't 
be true. G1 users may avoid issuing shell commands, but they are still 
Linux users.

Al.

Inderjeet Singh wrote:
 The linux comparison is not apt for another reason: non-technical 
 users do not use linux, whereas non-technical users do buy G1 phones. 

 One good model is value-based pricing (there are many books on the 
 topic): price it based on what value you think a user will get from 
 it. Some users will get high value, and some will get fairly low 
 value. You have to look at the demand curve and figure out which 
 customers to leave out and still make good returns. If you sell 
 something for $1 then you have to get many more customers to break 
 even: so may be worth pricing higher and leave out customers.

 Regarding the 24 hour refund window thing: those who cancel purchases 
 are most likely deriving low value from your software. So they are not 
 your target customer base anyway (unless you are willing to drop the 
 price point). 

 Just my $0.02
 Inder

 On Sat, Feb 28, 2009 at 9:56 AM, JP joachim.pfeif...@gmail.com 
 mailto:joachim.pfeif...@gmail.com wrote:




 On Feb 27, 2:22 pm, Al Sutton a...@funkyandroid.com
 mailto:a...@funkyandroid.com wrote:
  I see things at the moment as being similar to the Unix/Linux market
  place. I know many good Unix sysadmins who would rather spend
 hours or
  days seaching out a piece of free software (or writing it
 themselves) as
  opposed to paying even $20 for a commercial offering, and
 Android seems
  to be in the same boat.

 I don't think that's the case really. What drives good Unix sysadmins
 and the FOSS crowd in general is to learn something on the way. They
 (strike this, we, I guess) like the challenge and the sense of
 accomplishment when it's done. It's not like we wouldn't spend $20.
 As far as the Android Market and its customer base is concerned -
 trying out 12 (you pick the number) different Twitter clients,
 flashlights or tip calculators does not fall into this category. And
 in fact the Linux types, those that spend the effort to build it
 themselves, is not the target group. It's the regular person that uses
 the handset to do stuff, be entertained or informed. Given the target
 does not seem to have a problem with being charged an extra $10 a
 month to get from 400 to unlimited messages, it's disappointing to not
 see this spending attitude transpire to the market. A survey on the
 number of downloads that paid apps have scored after this week or so,
 would reveal an ugly picture. It's not like there isn't opportunity,
 but it shows it's hard to be relevant, and on top, the app needs to be
 well executed.
 At this point (games aside), success seems to gravitate towards apps
 that interact with a back end, such as weather forecasting,
 identifying songs or streaming a video clip. Even there, the question
 is whether an app is really a gain, or whether the original web app
 isn't more useful in the first place. I believe I left this as a
 comment once.




 


-- 

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

2009-03-01 Thread Al Sutton

Jon,

I think we're going to have to agree to disagree.

As I see it you're not willing to factor in the difficulty level in 
cracking the system and implementing a generic method as a 
differentiating factor between the protection methods, whereas my 
viewpoint is based on the level of effort needed to break the 
AndAppStore licensing system being sufficiently high to ensure that it's 
not worth doing (part of the reason the source code for licensing checks 
is available from 
http://andappstore.com/AndroidPhoneApplications/licensing.jsp is so that 
developers can vary how it's included in their code and thus eliminate 
the possibility of attackers scanning for a constant class name or byte 
code pattern).

Thanks for putting the effort in to continue the conversation to this point.

Al.

Jon Colverson wrote:
 On Feb 28, 6:46 pm, Al Sutton a...@funkyandroid.com wrote:
   
 method), and, as far as I'm aware, there isn't a method circulating
 which can be applied to any and every protected application to get a
 protection free copy by following a simple set of instructions (if there
 is I'd  welcome information on it so we can work on fixing the flaw it
 uses).
 

 I'm not aware of one either, but I expect that a tool would emerge
 very quickly if the AndAppStore takes off when it starts being
 distributed with handsets and such. You could then tweak the system to
 stop the tool from working, but then the attacker would release a new
 version, and you'd be in an arms race.

 The reason why I say they're equivalent is that while the steps along
 the way may be different, the end result is the same: people who don't
 want to pay will get the apps for free. In my opinion adding extra
 hurdles just wastes the developers' time and provides a juicier
 intellectual challenge for those who are inclined to try to defeat the
 system.

 --
 Jon

 
   


-- 

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

2009-03-01 Thread Al Sutton

The AndAppStore method can use the Android ID (source code is on the 
page Howie mentioned), and the Cupcake release adds measures to stop 
users altering the Android ID on the device which make it a more 
reliable thing to use.

Al.

Howie wrote:
 Al Sutton has developed something like this for use in
 AndAppStore.com.  More details @ 
 http://andappstore.com/AndroidPhoneApplications/licensing.jsp

 I don't know of anyone making use of AndroidID.

 On Feb 27, 12:53 pm, lukehutch luke.hu...@gmail.com wrote:
   
 Has a registration token system been discussed anywhere as an
 alternative?  e.g. each paid user gets a cookie that is based on the
 AndoidID, and the app periodically checks in with a central server to
 ensure that the given cookie/AndroidID combination are valid and paid-
 up...

 On Feb 26, 2:08 pm, Eric Veenendaal e...@ericveenendaal.com wrote:

 
 I just wanted to start a thread expressing my displeasure with the
 choice to block copy-protected apps from being made available to
 ADPs.  The thing that drew me to the android platform was the fact
 that it had such a lower barrier to entry.  I can't afford to have two
 phone plans going.  The idea of investing $425 to allow me to have one
 device to both develop for and use for my day to day life was very
 attractive.  However, Google's recent assumption that developers will
 pirate drm'd software simply because they can is ridiculous. If
 someone wanted to pirate software, they'd simply open a t-mobile
 account, unlock the phone, and save $300+.  I hope Google reconsiders.
   

 
   


-- 

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

2009-03-01 Thread Al Sutton

That's only a US patent, so anyone other than Apple can use multi-touch, 
it's *only* if they have assets in the US that a problem arises.

Al.

Tseng wrote:
 Actually the chance on Multi-Touch support is next to zero. Apple was
 granted the patents for multi-touch, in other words no one other than
 Apple is allowed to use multi-touch feature in handset devices.

 Check out the reasons:
 http://tseng-blog.nge-web.net/blog/2009/01/29/a-sad-day-for-handsets-apple-awarded-with-multi-touch-patent/

 On Feb 27, 8:02 pm, pesh...@gmail.com pesh...@gmail.com wrote:
   
 Please,
 HTC G1 is perfectly capable of multi touch support. Please guys
 implement that in the next OTA update if possible. I understand is
 something that Apple Created with their Iphone, but G1 has a lot of
 petential and multi touch i needed for the sucess of this product.
 Google works with Apple and I am sure you can implement that feature
 with the phone.
 Thank you.
 

 
   


-- 

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

2009-03-01 Thread Mads Kristiansen
Doing something like Log.d(MyApp, Debug log entry); in your own
application will make that entry appear in the log, which can be viewed with
adb logcat.

There shouldn't be any need to enable logging.

/ Mads

On Sun, Mar 1, 2009 at 4:37 AM, ying lcs ying...@gmail.com wrote:


 Hi,

 In android source code, it has logging statements like
 Log.d().
 Log.i().

 Can you please tell me how to enable the debug logging?

 Thank you.

 


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



[android-developers] Efficient contact search

2009-03-01 Thread TAKEphONE

Hi,

I am trying to search/filter contacts by their organization field/s.

Problem is this is WAY to slow - only way I could figure out to do
this is querying through all contacts, then locating the ones with
organizations (primary_organization id not zero), then querying PER
CONTACT the organizations cursor...

Any better way of doing this ?

TIA
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: anyway to return to original activity after call ends?

2009-03-01 Thread TAKEphONE

Hi,

Been trying to do the same myself.

Could not find a way besides adding the

intent-filter
action android:name=android.intent.action.VIEW /
category
android:name=android.intent.category.DEFAULT /
data android:mimeType=vnd.android.cursor.dir/calls /

/intent-filter

This launches my app (aTAKEphONE) when a call ends, but the problem is
it also launches my app when the user selects the missed call
notification
from the top status bar.

Nice feature by itself, but this cases that missed call notification
to stay ON -
there is no way to turn it off by myself...

If you find another solution - let me know...


On Feb 28, 6:09 pm, stematt kjw...@gmail.com wrote:
 Hi everyone,

 I'm looking for a way to resume my activity (which makes phone call)
 after call ends by user. Currently after user ends a call, it always
 returns to the phone's native call-log screen instead of the activity
 that originated the call. Is there any way to prevent or customize
 this?

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



[android-developers] Re: OpenGL ES show case

2009-03-01 Thread opengl es

Hi,

yes it uses the latest emulator package; the 1.1rc1 one, and didn't do
anything specific for opengl es

franck



On Feb 27, 7:39 am, Sachin pandhare sachinpandh...@gmail.com wrote:
 Hi Franck,
 the performance looks good. this is on emulator if i am not wrong.
 does it use the latest Android package as it is or with some
 modification forOpenGLES ?
 Sachin

 On Feb 26, 2:39 pm, fcalzada fcalz...@gmail.com wrote:

  Hi all,

  here is a little video about my androidopenglshowcase, which is
  actually a 3d pool game.
  It uses 3ds/obj model loading, planar shadow with stencil, and more...

  (This video shows an alpha version)

  Here is the link: poolhttp://www.youtube.com/watch?v=RD7OvIYeIsk

  Your comments are welcome,

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

2009-03-01 Thread Peli

Have a look at OI File Manager
http://www.openintents.org/en/node/159

Peli
www.openintents.org

On 28 Feb., 16:21, ANDREA P andrewpag...@gmail.com wrote:
 Hi,
 Is there a FileChooser for Android ???
 Because I want to select a file from File System and after send it.
 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: System log buffer size

2009-03-01 Thread AGA

Dear Group,
The problem is still here...
The logcat -f can give only partial solution. After the device is
turned off, the logcat -f has to be
executed again. If I need constantly enough log information from the
system 64K is not enough.
I've tried to execute logcat -f on start up - without success (just
an empty file is created).
I think this is a crucial issue for the application stability test to
have the control over the log severity and size. Please help how I can
get the log data !!!???

Thanks in advance,
 AGA

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



[android-developers] Top status bar color - can be changed?

2009-03-01 Thread AGA

Dear Group,
I'd like to change the color of the top status bar to match the
application appearance,
Please help me how can I control this property?
___
 Thanks in advance,
   AGA

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Alarms get lost when upgrading an application

2009-03-01 Thread StefanK

I noticed the same thing. I looked at the AlarmManger code and it
stores its data in in-memory arrays that are not persisted (nor
publicly accessible) , even more the pending intents that the
AlarmManager refers to are also lost when the device is restarted or
the application is uninstalled. (This is actually what happens when
you uninstall - it is the pending intent that gets lost not the
AlarmManager registration).
It appears that the only way to deal with pending alarms is to
reschedule them.

What I did in my application is to register for 3 global events - in
my case Intent.ACTION_TIME_CHANGED (which occurs when the phone time
gets updated to some value manually or by syncing with the cell
tower), Intent.ACTION_TIMEZONE_CHANGED, and
Intent.ACTION_BOOT_COMPLETED. In response to any of the those events I
remove all pending alarms and reschedule them again reading the
schedules from my own storage.
This takes care of the device reboots and when the time zone changes
(for example the user takes a plane from one time zone to another). As
it turns out if your device is set to auto sync its time from the cell
tower (which is the default setting) the autosync occurs many times
during the day (my guess is when switching from cell towers to
another). Responses to the ACTION_TIME_CHANGED will restore the
schedule.
This is not an ideal solution but it is good enough for my case.  (The
AlarmClock application that comes with the Android Source uses a
similar approach)

Stefan

On Feb 28, 10:58 am, Mariano Kamp mariano.k...@gmail.com wrote:
 Hi,

   as far as I see scheduled alarms are lost when upgrading an application.
 As this seems to be an un-install and re-install I can understand what.

   What is the best way to cope with that?

   When an application is upgraded it doesn't need to be launched by the
 user, so it is not the most sensible approach to use the onCreate method
 of the launcher activity. Is there any other life-cycle event I can tap
 into?

   If that is not the case, then I would think a not-too-bad-way of handling
 this is to hook into the onCreate method on my launch activity, an create a
 PendingIntent with the NO_CREATE [1] flag and schedule it again with the
 AlarmManager. That shouldn't result in any change to the existing schedule,
 if it exists, and should create the schedule when the application is
 installed for the first time or after an upgrade.

   It's not elegant, as it expects the user to open the app after upgrading.
 It's not a major PITA today as the current Market expects the user to
 upgrade each app by hand and it is not unlikely that the user starts it, but
 for the future I would expect that the Market makes automatic mass-upgrades
 possible.

   Also it is not too nice to handle this logic in the UI. Furthermore it
 doesn't seem elegant to bother the AlarmManager with a new PendingIntent
 every time the app is launched. Is there anyway to query the AlarmManager
 for scheduled events, like with dumpsys alarm on the command line?

   Better ideas?

 Cheers,
 Mariano

 [1]http://developer.android.com/reference/android/app/PendingIntent.html...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SAXParser fails on some RSS feeds

2009-03-01 Thread StefanK

In my experience, the problem is in many cases in the character
encoding used in the feed. If the feed is encoded using ISO-8859-1
encoding (which is what CNN top stories appears to use), and you are
trying to read it using the default UTF-8 encoding some symbols will
come as invalid and break the parser. The only viable solution is to
manually detect the encoding before trying to parse and then construct
the input stream given to the parser with the correct encoding. This
is what I end up doing for BeyondPod in both Windows Mobile and
Android platforms and this solved large set of parsing issues.
Welcome to the bizarre world of RSS parsing.

Stefan

On Mar 1, 10:03 am, grennis gren...@gmail.com wrote:
 OK, thanks all. I didn't realize the problem was as pervasive as it
 is. I'm presenting a limited set of feeds so I'm hoping the scrub
 approach will work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to get auth token (GoogleLoginService?)

2009-03-01 Thread grennis

I'm wondering how to use the GData APIs without requiring the user to
type their username and password in my app. The user has to login to
the phone, so it doesn't make much sense to me that apps would require
them to type it in again. The phone's calendar and gmail apps
obviously don't prompt so how is it done?

I found some threads on this which indicate this isn't possible, but
they are pretty old and I was wondering if there is any new
information (i.e., given that we have a new SDK version 1.1).





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



[android-developers] Re: Best option to create alarm

2009-03-01 Thread Edward Falk

You want AlarmManager.  It allows you to create an Intent object and
have it broadcast at a later time.  Then you write a broadcast
receiver, service, or other object to receive the intent and wake up.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Alarms get lost when upgrading an application

2009-03-01 Thread Mariano Kamp
Stefan,

  thanks for pitching in and shedding some light on it.

  Also not a deterministic approach, but at least it is not tied to the UI.

  Anybody else with another apporach?

Cheers,
Mariano

On Sun, Mar 1, 2009 at 4:16 PM, StefanK skyntc...@gmail.com wrote:


 I noticed the same thing. I looked at the AlarmManger code and it
 stores its data in in-memory arrays that are not persisted (nor
 publicly accessible) , even more the pending intents that the
 AlarmManager refers to are also lost when the device is restarted or
 the application is uninstalled. (This is actually what happens when
 you uninstall - it is the pending intent that gets lost not the
 AlarmManager registration).
 It appears that the only way to deal with pending alarms is to
 reschedule them.

 What I did in my application is to register for 3 global events - in
 my case Intent.ACTION_TIME_CHANGED (which occurs when the phone time
 gets updated to some value manually or by syncing with the cell
 tower), Intent.ACTION_TIMEZONE_CHANGED, and
 Intent.ACTION_BOOT_COMPLETED. In response to any of the those events I
 remove all pending alarms and reschedule them again reading the
 schedules from my own storage.
 This takes care of the device reboots and when the time zone changes
 (for example the user takes a plane from one time zone to another). As
 it turns out if your device is set to auto sync its time from the cell
 tower (which is the default setting) the autosync occurs many times
 during the day (my guess is when switching from cell towers to
 another). Responses to the ACTION_TIME_CHANGED will restore the
 schedule.
 This is not an ideal solution but it is good enough for my case.  (The
 AlarmClock application that comes with the Android Source uses a
 similar approach)

 Stefan

 On Feb 28, 10:58 am, Mariano Kamp mariano.k...@gmail.com wrote:
  Hi,
 
as far as I see scheduled alarms are lost when upgrading an
 application.
  As this seems to be an un-install and re-install I can understand what.
 
What is the best way to cope with that?
 
When an application is upgraded it doesn't need to be launched by the
  user, so it is not the most sensible approach to use the onCreate
 method
  of the launcher activity. Is there any other life-cycle event I can tap
  into?
 
If that is not the case, then I would think a not-too-bad-way of
 handling
  this is to hook into the onCreate method on my launch activity, an create
 a
  PendingIntent with the NO_CREATE [1] flag and schedule it again with the
  AlarmManager. That shouldn't result in any change to the existing
 schedule,
  if it exists, and should create the schedule when the application is
  installed for the first time or after an upgrade.
 
It's not elegant, as it expects the user to open the app after
 upgrading.
  It's not a major PITA today as the current Market expects the user to
  upgrade each app by hand and it is not unlikely that the user starts it,
 but
  for the future I would expect that the Market makes automatic
 mass-upgrades
  possible.
 
Also it is not too nice to handle this logic in the UI. Furthermore it
  doesn't seem elegant to bother the AlarmManager with a new PendingIntent
  every time the app is launched. Is there anyway to query the AlarmManager
  for scheduled events, like with dumpsys alarm on the command line?
 
Better ideas?
 
  Cheers,
  Mariano
 
  [1]
 http://developer.android.com/reference/android/app/PendingIntent.html...
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: upgrade issues and other market problems for developers

2009-03-01 Thread wayne mcfadden- Red Droid

I have this problem too. Hopefully google will fix the problem and
remove the one star rankings caused by the download issue. This is
obviosly going to affect everyone who publishes to the marketplace so
just balance it out.

On Feb 28, 2:39 pm, carnivalcom...@gmail.com
carnivalcom...@gmail.com wrote:
 I agree that Google needs to fix these bugs. And until they can be
 fixed, at least let it be known to everyone who has a phone what the
 problems are.  I'm tired of getting 1 star ratings because my app
 won't fully delete right away, which is not my problem. I've even gone
 so far as to say this in my description instead of what my app is
 about to try and let people know before they download.  I still got an
 idiot who gave a 1 star because of the deletion problem.
 Google, please address these issues.

 On Feb 28, 10:21 am, sagesmith sagesm...@gmail.com wrote:

  We think we have figured out a problem with copy protection and how it
  relates to upgrades.

  **THE EXACT SAME CODE GOING FROM A VERSION THAT IS COPY PROTECTED TO A
  VERSION THAT IS UN-PROTECTED WILL NOT WORK**

  We hope to save developers the headache and one-star ratings we have
  received due to this issue (as if the one-stars related to the
  inability to download!).

  Google really needs to think about developers and attempt to remove
  ratings and comments that are clearly related to their bugs not ours.
  Otherwise, I don't think they are taking care of developers or users.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Dev Phone and RC33 update

2009-03-01 Thread Jon Colverson

On Mar 1, 9:17 am, Al Sutton a...@funkyandroid.com wrote:
 I think we're going to have to agree to disagree.

 As I see it you're not willing to factor in the difficulty level in
 cracking the system and implementing a generic method as a
 differentiating factor between the protection methods, whereas my
 viewpoint is based on the level of effort needed to break the
 AndAppStore licensing system being sufficiently high to ensure that it's
 not worth doing (part of the reason the source code for licensing checks
 is available 
 fromhttp://andappstore.com/AndroidPhoneApplications/licensing.jspis so that
 developers can vary how it's included in their code and thus eliminate
 the possibility of attackers scanning for a constant class name or byte
 code pattern).

That's a fair summary of my position. I still don't think that the
AndAppStore system would be particularly difficult to break, and I've
e-mailed you off-list about the specifics.

 Thanks for putting the effort in to continue the conversation to this point.

Yes, you too. It was an interesting debate.

--
Jon

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Media Player callbacks only function for an Activity?

2009-03-01 Thread Marco Nelissen

On Sun, Mar 1, 2009 at 7:40 AM, madcoder paperga...@gmail.com wrote:

 I thought I had solved this problem here

 http://groups.google.com/group/android-developers/browse_thread/thread/260f2951d4a23445/d676c2a7d6b66c20?hl=enlnk=gstq=onpreparedlistener#d676c2a7d6b66c20

 but apparently not.


 I have successfully implemented the Media Player for my apps, but when
 I tried to use some of the callback methods I ran into a problem.

 What I'm trying to do is use Media Player in a reusable (library)
 class.  This stand-alone library class (call it MyMediaPlayer) is
 created by passing the Activity Context to it's constructor.  I then
 use getApplicationContext to avoid any potential memory leaks.

 My problem is trying to use callbacks.  When I implement
 MediaPlayer.OnPreparedListener in my library class, it doesn't ever
 get called.

 To test this further, I created a separate project, that has a single
 activity, that also implements the OnPreparedListener.  In that
 project, the onPreparedListener is called, and it works.

 Both are coded this way:

 (mp = MediaPlayer,  and the MyMediaPlayer class implements/overrides
 OnPreparedListener)

 mp = MediaPlayer.create(context, resourceId);
 mp.setOnPreparedListener(this);

MediaPlayer.create() calls prepare() internally, so it doesn't seem
that useful to set an onPreparedListener after prepare() has already
finished. The fact that it works in your Activity is not something you
should rely on. It only works in your Activity because the callbacks
are posted to the main Looper, and in this case your main loop isn't
going to process the callback event until after you've set the
listener, even though in reality prepare() has already finished by the
time you set the listener.
I'm guessing that when you do this in your library, you're doing it
from another thread, and so the event is either dropped because that
thread doesn't have a Looper, or it is processed in the main Looper
before your thread gets around to calling setOnPreparedListener().

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



[android-developers] setImageResource causes NullPointerException, so does setVisibility(View.GONE)

2009-03-01 Thread Will

I have this exact same problem as here:
http://groups.google.com/group/android-beginners/browse_frm/thread/daa2634b42a2975/415dd6e5bf920157?lnk=gstq=How+to+declare+images+for+ImageView#415dd6e5bf920157

ImageView IV;
IV = (ImageView) findViewById(R.drawable.top);
IV.setImageResource(R.drawable.quantity);  //-- NullPointerException
right here!!!

-the image shows up fine in the layout editor when I click the
Layout tab
-changing the image source in xml work fine
-in debug, evaluating the expression R.drawable.quantity returns a
number
-in debug, evaluating IV.setImageResource() with what
R.drawable.quantity's integer value == NPE
-deleting R.java and letting Eclipse rebuild did not fix the problem.

I have also tried making six ImageViews in xml, each with a different
drawable assigned in xml and using setVisibility(View.GONE) to turn
things off and setVisibility(View.VISIBLE) to turn things on.  This
also causes an NPE.  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: How to intercept KEYCODE_DPAD_CENTER correctly?

2009-03-01 Thread Marco Nelissen

You could try grabbing it in dispatchKeyEvent(), however if another
view (visibly) has focus, then your application's users are going to
be confused when pressing the trackball does not invoke the selected
item, but does something else instead. Can you make your views
non-focusable instead?




On Sun, Mar 1, 2009 at 8:24 AM, Teo teomina...@gmail.com wrote:

 Hi,

 what i'm trying to do is make the DPAD_CENTER key be a shortcut for a
 specific feature. But sometimes a certain view has focus and no matter
 how i try to clear the focus or implement the event handling i can't
 override the activation of that selected view.. (And yes, i return
 true in the onKeyDown function :)

 Thanks,
 Teo
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: setImageResource causes NullPointerException, so does setVisibility(View.GONE)

2009-03-01 Thread Mark Murphy

Will wrote:
 I have this exact same problem as here:
 http://groups.google.com/group/android-beginners/browse_frm/thread/daa2634b42a2975/415dd6e5bf920157?lnk=gstq=How+to+declare+images+for+ImageView#415dd6e5bf920157
 
 ImageView IV;
 IV = (ImageView) findViewById(R.drawable.top);
 IV.setImageResource(R.drawable.quantity);  //-- NullPointerException
 right here!!!

R.drawable.top is not a valid identifier of a widget in your layout.

Have you tried R.id.top instead? Or something else in the R.id namespace?

One of the downsides of all of the R.* series being int values is that
you can pass R.drawable values where R.id values are needed.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!

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



[android-developers] Re: Can I download my code off my phone?

2009-03-01 Thread Edward Falk

I'm going to guess that the only thing installed on your phone is
compiled bytecode.  There *might* be a way to fetch it back out of the
phone with adb, but you'd still have to de-compile the byte code back
to Java.  Frankly, I think you'd be better off just reconstructing
your work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 intercept KEYCODE_DPAD_CENTER correctly?

2009-03-01 Thread Teo
That did the trick! Thanks!
It's a bit complicated... My app is a todo list, and i kind of have a
symmetric concept (touch vs. keyboard) there's basically nothing you can't
do in either of them. Theoretically there could be an infinity of views, and
it would be a little too much overhead to set them all as non-focusable just
for this + the way i see it (in my context) using the trackball would be a
long way around any existing function.

But thanks for the tip; anyway, will pass this through user feedback too, so
no one gets hurt :)

On Sun, Mar 1, 2009 at 6:45 PM, Marco Nelissen marc...@android.com wrote:


 You could try grabbing it in dispatchKeyEvent(), however if another
 view (visibly) has focus, then your application's users are going to
 be confused when pressing the trackball does not invoke the selected
 item, but does something else instead. Can you make your views
 non-focusable instead?




 On Sun, Mar 1, 2009 at 8:24 AM, Teo teomina...@gmail.com wrote:
 
  Hi,
 
  what i'm trying to do is make the DPAD_CENTER key be a shortcut for a
  specific feature. But sometimes a certain view has focus and no matter
  how i try to clear the focus or implement the event handling i can't
  override the activation of that selected view.. (And yes, i return
  true in the onKeyDown function :)
 
  Thanks,
  Teo
  
 

 



-- 
Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
GMT +2

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



[android-developers] Re: Problems with background activities or partial locks or something completely altogether?!

2009-03-01 Thread Marco Nelissen

One thing you might want to try is to grab the wakelock in the
receiver itself, not in the thread. The way it is now, it's
theoretically possible for the receiver to exit and the phone to go
back to sleep before your threads ever gets a chance to run.


On Sun, Mar 1, 2009 at 9:27 AM, Mariano Kamp mariano.k...@gmail.com wrote:
 And btw. I should have mentioned that the 30 minutes sleep is a placeholder
 for the real action. In my case that would be downloading stuff from the
 net. But to show that it doesn't depend on the workload and make it more
 abstract I just put a sleep in there.

 On Sun, Mar 1, 2009 at 6:20 PM, Mariano Kamp mariano.k...@gmail.com wrote:

 Marco,

   thanks for taking the time to respond.

   (a) If you look at the code ( http://pastie.org/403831) you'll see that
 it is in fact a custom log file (see class Persistent Log). The reason
 behind that is to be able to have a look at the problem over a longer period
 of time as it doesn't occur all the time. The default log seems to be a ring
 buffer holding just the log for a couple of minutes and is not of much help
 in this respect.

   (b) The receiver is triggered by an alarm (see the full code) and spawns
 of a Thread immediately.
     From the pastie code mentioned above:



 Intent i = new Intent(context, MyReceiver.class);

 PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);


 AlarmManager alarmManager = (AlarmManager)
 getSystemService(ALARM_SERVICE);

 alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
 (System.currentTimeMillis() + 1000),

  60 * 60 * 1000, pi);



 Cheers,
 Mariano

 On Sun, Mar 1, 2009 at 6:13 PM, Marco Nelissen marc...@android.com
 wrote:

 It looks like the output you posted is from your custom log file, so
 the first thing I'd do is to look at the system log to make sure that
 the problem isn't in your custom logging code.
 Also, doing anything lengthy in a broadcast receiver is a Bad Idea,
 and keeping the device awake while you're doing it is a Really, Really
 Bad Idea. If you need to do something every 30 minutes, you should
 schedule an alarm, not sleep for 30 minutes with a wakelock held.



 On Sun, Mar 1, 2009 at 8:42 AM, Mariano Kamp mariano.k...@gmail.com
 wrote:
  Hi,
 
    I don't really know how to phrase my question as I don't know what
  the
  problem is. The symptom is that scheduled background activities are not
  completed and I want to know why that is and how I can further
  debug/solve
  it.
 
    This is happening with NewsRob and the background synchronization
  that
  loads articles from Google Reader at a scheduled interval. To debug it
  I
  meanwhile created a synthetic sample that shows the behavior too. A
  Thread
  is started once an hour, acquires a partial wake lock, logs something,
  sleeps for 30 minutes and then releases the partial wake lock and logs
  again.
 
 
    So it should look something like this:
  28 04:02: onReceive
  28 04:02: In aquire
  28 04:32: After release
 
    28 being the day of the month followed by the time and message.
 
    Unfortunately it doesn't look like that all the time ;-)  (Blank
  Lines and
  comment added for readability).
 
  28 05:02: onReceive
  28 05:02: In aquire
  28 05:32: After release
 
  28 06:02: onReceive
  28 06:02: In aquire
  After release missing
 
  28 07:02: onReceive
  28 07:02: In aquire
  After release missing
 
  28 08:02: onReceive
  28 08:02: In aquire
  After release missing
 
  28 09:02: onReceive
  In aquire missing
  After release missing
  
 
    So I suspect I do something wrong with the partial wake lock? But
  what?
  And even if that is the case what should happen then? Shouldn't it
  continue
  to run when a button on the device is pressed?
 
    So here is the full sample code: http://pastie.org/403831
 
    And here is the relevant method:
 
      public void onReceive(final Context context, Intent intent) {
          PersistentLog.log(onReceive, context);
          new Thread(new Runnable(){
 
              public void run() {
                  PowerManager pm = (PowerManager)
  context.getSystemService(Context.POWER_SERVICE);
                  PowerManager.WakeLock wl =
  pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, SomeTag);
                  wl.acquire();
                  PersistentLog.log(In aquire, context);
                  SystemClock.sleep(30 * 60 * 1000);
                  wl.release();
                  PersistentLog.log(After release, context);
 
              }
          }).start();
      }
 
    Any ideas?
 
  Cheers,
  Mariano
 
  ps. Yes, I've seen the typo. Thanks for not bringing it up ;)
 
 
  
 





 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For 

[android-developers] Re: Problems with background activities or partial locks or something completely altogether?!

2009-03-01 Thread Mariano Kamp
Thanks for not giving up on me ;-)

I thought about that, but the log shows that I acquired the lock and then
nothing more happens.
Also I would need to use a Thread.join() in the onReceive Method to wait for
the thread to finish, which would lead to a long execution of the
onReceive() method.

If you think my arguments are wrong and still believe this is a valid
approach I can give it a shot. Otherwise I would rather wait a little bit
for other suggestions as this problem doesn't occur frequently (but often
enough to annoy the NewsRob users) enough to trigger it in a short period of
time and therefore I can basically just try one approach per day, actually
night ;-)

On Sun, Mar 1, 2009 at 6:35 PM, Marco Nelissen marc...@android.com wrote:


 One thing you might want to try is to grab the wakelock in the
 receiver itself, not in the thread. The way it is now, it's
 theoretically possible for the receiver to exit and the phone to go
 back to sleep before your threads ever gets a chance to run.


 On Sun, Mar 1, 2009 at 9:27 AM, Mariano Kamp mariano.k...@gmail.com
 wrote:
  And btw. I should have mentioned that the 30 minutes sleep is a
 placeholder
  for the real action. In my case that would be downloading stuff from the
  net. But to show that it doesn't depend on the workload and make it more
  abstract I just put a sleep in there.
 
  On Sun, Mar 1, 2009 at 6:20 PM, Mariano Kamp mariano.k...@gmail.com
 wrote:
 
  Marco,
 
thanks for taking the time to respond.
 
(a) If you look at the code ( http://pastie.org/403831) you'll see
 that
  it is in fact a custom log file (see class Persistent Log). The reason
  behind that is to be able to have a look at the problem over a longer
 period
  of time as it doesn't occur all the time. The default log seems to be a
 ring
  buffer holding just the log for a couple of minutes and is not of much
 help
  in this respect.
 
(b) The receiver is triggered by an alarm (see the full code) and
 spawns
  of a Thread immediately.
  From the pastie code mentioned above:
 
 
 
  Intent i = new Intent(context, MyReceiver.class);
 
  PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
 
 
  AlarmManager alarmManager = (AlarmManager)
  getSystemService(ALARM_SERVICE);
 
  alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
  (System.currentTimeMillis() + 1000),
 
   60 * 60 * 1000, pi);
 
 
 
  Cheers,
  Mariano
 
  On Sun, Mar 1, 2009 at 6:13 PM, Marco Nelissen marc...@android.com
  wrote:
 
  It looks like the output you posted is from your custom log file, so
  the first thing I'd do is to look at the system log to make sure that
  the problem isn't in your custom logging code.
  Also, doing anything lengthy in a broadcast receiver is a Bad Idea,
  and keeping the device awake while you're doing it is a Really, Really
  Bad Idea. If you need to do something every 30 minutes, you should
  schedule an alarm, not sleep for 30 minutes with a wakelock held.
 
 
 
  On Sun, Mar 1, 2009 at 8:42 AM, Mariano Kamp mariano.k...@gmail.com
  wrote:
   Hi,
  
 I don't really know how to phrase my question as I don't know what
   the
   problem is. The symptom is that scheduled background activities are
 not
   completed and I want to know why that is and how I can further
   debug/solve
   it.
  
 This is happening with NewsRob and the background synchronization
   that
   loads articles from Google Reader at a scheduled interval. To debug
 it
   I
   meanwhile created a synthetic sample that shows the behavior too. A
   Thread
   is started once an hour, acquires a partial wake lock, logs
 something,
   sleeps for 30 minutes and then releases the partial wake lock and
 logs
   again.
  
  
 So it should look something like this:
   28 04:02: onReceive
   28 04:02: In aquire
   28 04:32: After release
  
 28 being the day of the month followed by the time and message.
  
 Unfortunately it doesn't look like that all the time ;-)  (Blank
   Lines and
   comment added for readability).
  
   28 05:02: onReceive
   28 05:02: In aquire
   28 05:32: After release
  
   28 06:02: onReceive
   28 06:02: In aquire
   After release missing
  
   28 07:02: onReceive
   28 07:02: In aquire
   After release missing
  
   28 08:02: onReceive
   28 08:02: In aquire
   After release missing
  
   28 09:02: onReceive
   In aquire missing
   After release missing
   
  
 So I suspect I do something wrong with the partial wake lock? But
   what?
   And even if that is the case what should happen then? Shouldn't it
   continue
   to run when a button on the device is pressed?
  
 So here is the full sample code: http://pastie.org/403831
  
 And here is the relevant method:
  
   public void onReceive(final Context context, Intent intent) {
   PersistentLog.log(onReceive, context);
   new Thread(new Runnable(){
  
   public void run() {
   PowerManager pm = 

[android-developers] Re: Easy Eclipse Help?

2009-03-01 Thread Noam

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



[android-developers] Re: Problems with background activities or partial locks or something completely altogether?!

2009-03-01 Thread Marco Nelissen

On Sun, Mar 1, 2009 at 9:43 AM, Mariano Kamp mariano.k...@gmail.com wrote:
 Thanks for not giving up on me ;-)

 I thought about that, but the log shows that I acquired the lock and then
 nothing more happens.

Except in the last example you gave, where it doesn't even get to the acquire.

 Also I would need to use a Thread.join() in the onReceive Method to wait for
 the thread to finish, which would lead to a long execution of the
 onReceive() method.

I was thinking you would acquire the lock in the receiver, but free it
in your thread.
The receiver wouldn't actually have to wait for the thread to finish.

 If you think my arguments are wrong and still believe this is a valid
 approach I can give it a shot. Otherwise I would rather wait a little bit
 for other suggestions as this problem doesn't occur frequently (but often
 enough to annoy the NewsRob users) enough to trigger it in a short period of
 time and therefore I can basically just try one approach per day, actually
 night ;-)

Another possibility is that your process simply gets killed during the
30 minute period. Since the activity manager doesn't know about your
thread, it may conclude that your process is idle and decide to kill
it to free up resources. You can tell if this happens by looking at
the system log, but in any case you should probably do the actual work
in a service, rather than using a plain Thread.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: setImageResource causes NullPointerException, so does setVisibility(View.GONE)

2009-03-01 Thread Will

D'oh.  Thank-you for the second set of eyes.

On Mar 1, 11:46 am, Mark Murphy mmur...@commonsware.com wrote:
 Will wrote:
  I have this exact same problem as here:
 http://groups.google.com/group/android-beginners/browse_frm/thread/da...

  ImageView IV;
  IV = (ImageView) findViewById(R.drawable.top);
  IV.setImageResource(R.drawable.quantity);  //-- NullPointerException
  right here!!!

 R.drawable.top is not a valid identifier of a widget in your layout.

 Have you tried R.id.top instead? Or something else in the R.id namespace?

 One of the downsides of all of the R.* series being int values is that
 you can pass R.drawable values where R.id values are needed.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problems with background activities or partial locks or something completely altogether?!

2009-03-01 Thread Jon Colverson

I don't think it's valid to start a Thread in a BroadcastReceiver. The
system doesn't know anything about that thread, so it wouldn't know
that it's supposed to keep the process hosting it around. My app
nanoTweeter does similar background polling and I acquire the WakeLock
in the BroadcastReceiver and then start a Service. That service
releases the lock when it's done.

--
Jon

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



[android-developers] HTML login form works in Android browser and fails with WebView ?

2009-03-01 Thread Derek

Hi all,

I'm facing the following problem. I'm opening Flickr HTML login form
with default Android browser and everything works fine when I'm
logging (click sign in button in HTML form):
 String url = http://m.flickr.com/;;
 Intent intent = new Intent();
 intent.setAction(Intent.ACTION_VIEW);
 intent.setData(Uri.parse(url));
 startActivity(intent);

But sign in button does nothing when using the same in a WebView:
String url = http://m.flickr.com/;;
 WebView webview = (WebView) findViewById(R.id.flickr_authwebview);
 webview.getSettings().setJavaScriptEnabled(true);
 webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
 webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
 webview.getSettings().setLoadsImagesAutomatically(false);
 webview.setClickable(true);
 webview.loadUrl(url);

What could be the problem ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: HTML login form works in Android browser and fails with WebView ?

2009-03-01 Thread Derek

To get the login form, use:
String url = http://m.flickr.com/signin/;;

On Mar 1, 9:03 pm, Derek cram.de...@gmail.com wrote:
 Hi all,

 I'm facing the following problem. I'm opening Flickr HTML login form
 with default Android browser and everything works fine when I'm
 logging (click sign in button in HTML form):
  String url = http://m.flickr.com/;;
  Intent intent = new Intent();
  intent.setAction(Intent.ACTION_VIEW);
  intent.setData(Uri.parse(url));
  startActivity(intent);

 But sign in button does nothing when using the same in a WebView:
 String url = http://m.flickr.com/;;
  WebView webview = (WebView) findViewById(R.id.flickr_authwebview);
  webview.getSettings().setJavaScriptEnabled(true);
  webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
  webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
  webview.getSettings().setLoadsImagesAutomatically(false);
  webview.setClickable(true);
  webview.loadUrl(url);

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



[android-developers] openGL ... does it make sense?

2009-03-01 Thread robotissues

I am in the thick of developing an app for the G1.  My app is in 2D
now ... I am imagining what it would look like in 3D ... I am trying
to determine if its worth the effort to go down this road and would
appreciate feedback from users who have actually worked with it.

1.) What is the real world impression of openGL running on an actual
phone?  Is it fast enough?  Is it a resource hog?  In other words, is
it mature enough at this point to actually use?

2.) How steep a learning curve is there to working with openGL?  I
don't mean how hard is it to draw a rotating box ... rather, how
difficult is it to get acclimated with how to actually do stuff with
it?

Thanks,
i++



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



[android-developers] Animation Styles

2009-03-01 Thread skink

hi,

i tried to use my popupWindow with some enter/exit animations - it has
setAnimationStyle() method for that purpose.

after some time i realized i cannot use my own custom animation styles
which is ok but a bit limiting. so i tried system ones:
R.style.Animation_Toast works ok, but R.style.Animation_Dialog
doesn't.

looking at xml definition files i found that Toast animation uses
simple alpha animation and Dialog animation is a set of alpha combined
wit scale animation.

is it a problem for WindowManager to deal with complex animations?

skink

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



[android-developers] Detect shaking

2009-03-01 Thread J . Pablo Fernández
Hello,

Is there an easy way to detect shaking of the phone? Or do I have to
implement it myself by monitoring the sensors? If so, any hints on how
shaking looks like from the sensor point of view?

Thanks.
-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.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: How to get auth token (GoogleLoginService?)

2009-03-01 Thread Christine

I can see why the user's Google credentials are not accessible to just
any app. I wouldn't want apps to be able to use my Google credentials
unless I specify that it's ok. The minimum requirement would be that
access to Google credentials would require a line in the manifest file
so the user knows which apps log in to Google. But still, as a user I
would want to be able to switch that off. My app just asks for the
credentials once.

Flickr has a neater way of doing this. If you want acces to your
user's Flickr account, you point them to a Flickr page where they can
check a checkbox that gives your app permanent access to their
account. The nice thing about that is that the user can switch if off,
independently of your app, in their Flickr account. Access to a Google
account can only be switched off by uninstalling the app, changing
your Google password or removing the credentials from the app - if you
trust the maker of the app.

The worst thing to do is to hand credentials from one site to another
without user interference. That's what some Twitter clients do with
Twitpic: they log in to Twitpic with your twitter credentials, thus
handing your Twitter password to a third party. That's why I don't use
Twitpic.

Christine

On Mar 1, 4:56 pm, grennis gren...@gmail.com wrote:
 I'm wondering how to use the GData APIs without requiring the user to
 type their username and password in my app. The user has to login to
 the phone, so it doesn't make much sense to me that apps would require
 them to type it in again. The phone's calendar and gmail apps
 obviously don't prompt so how is it done?

 I found some threads on this which indicate this isn't possible, but
 they are pretty old and I was wondering if there is any new
 information (i.e., given that we have a new SDK version 1.1).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: anyway to return to original activity after call ends?

2009-03-01 Thread stematt

Thanks! This defenitely helps, although not an ideal solution. I've
tried doing something in phone state listener but didn't work out,
still keep looking...

On Mar 1, 6:23 am, TAKEphONE shimo...@gmail.com wrote:
 Hi,

 Been trying to do the same myself.

 Could not find a way besides adding the

             intent-filter
                 action android:name=android.intent.action.VIEW /
                 category
 android:name=android.intent.category.DEFAULT /
                 data android:mimeType=vnd.android.cursor.dir/calls /

             /intent-filter

 This launches my app (aTAKEphONE) when a call ends, but the problem is
 it also launches my app when the user selects the missed call
 notification
 from the top status bar.

 Nice feature by itself, but this cases that missed call notification
 to stay ON -
 there is no way to turn it off by myself...

 If you find another solution - let me know...

 On Feb 28, 6:09 pm,stemattkjw...@gmail.com wrote:



  Hi everyone,

  I'm looking for a way to resume my activity (which makes phone call)
  after call ends by user. Currently after user ends a call, it always
  returns to the phone's native call-log screen instead of the activity
  that originated the call. Is there any way to prevent or customize
  this?

  Regards,
 Stematt- 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: openGL ... does it make sense?

2009-03-01 Thread Streets Of Boston

I wrote my app using OpenGL. It's The Gube.
The phone is pretty good at rendering the OpenGL vertices, textures,
lighting, etc. It works well for my app.

There is a bit of a learning curve for OpenGL. But it's doable. It did
it :-).
The main thing to keep in mind that OpenGL is implemented as a state-
machine.

On Mar 1, 3:08 pm, robotissues jason.van.an...@gmail.com wrote:
 I am in the thick of developing an app for the G1.  My app is in 2D
 now ... I am imagining what it would look like in 3D ... I am trying
 to determine if its worth the effort to go down this road and would
 appreciate feedback from users who have actually worked with it.

 1.) What is the real world impression of openGL running on an actual
 phone?  Is it fast enough?  Is it a resource hog?  In other words, is
 it mature enough at this point to actually use?

 2.) How steep a learning curve is there to working with openGL?  I
 don't mean how hard is it to draw a rotating box ... rather, how
 difficult is it to get acclimated with how to actually do stuff with
 it?

 Thanks,
 i++
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: speech to text api

2009-03-01 Thread Rob Franz
I asked the same question.  The answer is no, unfortunately.
-Rob

On Sun, Mar 1, 2009 at 12:24 AM, Zi Yong Chua chu...@gmail.com wrote:


 hi guys

 since android now has speech to text search, anyone know if the API is
 available to the developers?
 


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

2009-03-01 Thread Mark Murphy

Noam wrote:
 Hello everyone,
 Is there a way to verify that the text that the user entered into the
 EditText widget is actually an email?

http://www.google.com/search?q=email+address+validation+java

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: How to enable debug logging in android source

2009-03-01 Thread ying lcs

Thank you. In the View.java, it has code (see below), when will public
void debug() get called? Or how to call that function?



  /**
 * Prints information about this view in the log output, with the tag
 * {...@link #VIEW_LOG_TAG}.
 *
 * @hide
 */
public void debug() {
debug(0);
}

/**
 * Prints information about this view in the log output, with the tag
 * {...@link #VIEW_LOG_TAG}. Each line in the output is preceded with an
 * indentation defined by the codedepth/code.
 *
 * @param depth the indentation level
 *
 * @hide
 */
protected void debug(int depth) {
String output = debugIndent(depth - 1);

output += +  + this;
int id = getId();
if (id != -1) {
output +=  (id= + id + );
}
Object tag = getTag();
if (tag != null) {
output +=  (tag= + tag + );
}
Log.d(VIEW_LOG_TAG, output);

if ((mPrivateFlags  FOCUSED) != 0) {
output = debugIndent(depth) +  FOCUSED;
Log.d(VIEW_LOG_TAG, output);
}

output = debugIndent(depth);
output += frame={ + mLeft + ,  + mTop + ,  + mRight
+ ,  + mBottom + } scroll={ + mScrollX + ,  + mScrollY
+ } ;
Log.d(VIEW_LOG_TAG, output);

if (mPaddingLeft != 0 || mPaddingTop != 0 || mPaddingRight != 0
|| mPaddingBottom != 0) {
output = debugIndent(depth);
output += padding={ + mPaddingLeft + ,  + mPaddingTop
+ ,  + mPaddingRight + ,  + mPaddingBottom + };
Log.d(VIEW_LOG_TAG, output);
}

output = debugIndent(depth);
output += mMeasureWidth= + mMeasuredWidth +
 mMeasureHeight= + mMeasuredHeight;
Log.d(VIEW_LOG_TAG, output);

output = debugIndent(depth);
if (mLayoutParams == null) {
output += BAD! no layout params;
} else {
output = mLayoutParams.debug(output);
}
Log.d(VIEW_LOG_TAG, output);

output = debugIndent(depth);
output += flags={;
output += View.printFlags(mViewFlags);
output += };
Log.d(VIEW_LOG_TAG, output);

output = debugIndent(depth);
output += privateFlags={;
output += View.printPrivateFlags(mPrivateFlags);
output += };
Log.d(VIEW_LOG_TAG, output);
}

On Sun, Mar 1, 2009 at 1:45 AM, Mads Kristiansen
mads.kristian...@nullwire.com wrote:

 Doing something like Log.d(MyApp, Debug log entry); in your own
 application will make that entry appear in the log, which can be viewed with
 adb logcat.

 There shouldn't be any need to enable logging.

 / Mads

 On Sun, Mar 1, 2009 at 4:37 AM, ying lcs ying...@gmail.com wrote:

 Hi,

 In android source code, it has logging statements like
 Log.d().
 Log.i().

 Can you please tell me how to enable the debug logging?

 Thank you.




 


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



[android-developers] Android source code to find out which drawable a widget should use for its background?

2009-03-01 Thread Meryl Silverburgh

Hi,

Can you please tell me where is the android code which picks the
different drawable will be used as background
when it has focus?

For example, I have the following setup for my widget:

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;

item android:state_pressed=true
  android:drawable=@drawable/header_list_pressed /

item android:state_focused=true
  android:drawable=@drawable/header_list_focus /
/selector

Where is the android code which finds out which drawable it should
used for the widget's background?

I have looked at view.java, but I can't figure out which method is
doing what drawable should be used.

Thank you.

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



[android-developers] Re: Assuming Developers are Pirates

2009-03-01 Thread Dianne Hackborn
The whole premise of this discussion is wrong.  What has happened is:

1. The developer asked for their application to be copy protected with
forward locking.
2. The user is running a phone that is unlocked, so can not do that kind of
copy protection.
3. The Market does not allow the user to download the app, because their
phone does not support a feature the developer has requested.

It has nothing to do with assuming anyone is a pirate, it has to do with
doing what the developer has asked.

On Sun, Mar 1, 2009 at 3:19 PM, Disconnect dc.disconn...@gmail.com wrote:

 I meant to reply earlier, didn't get a chance.

 Something you may (or may not) find amusing. So far, google has only
 assumed their OWN EMPLOYEES are thieves. (Yes, they've said the same
 restrictions are in the unreleased adp1.1 image, but since its unreleased
 that could still change..)

 There is NO image for the adp1 that allows paid OR protected apps
 (including free-protected and paid-unprotected). The holiday image is for
 google employees only, on the phones they received instead of a bonus last
 year. So..yeah. Google has acted to indicate that they believe, given the
 chance, their employees will steal applications. (Funny, and kinda sad.
 Although they'd be getting just as much of a roasting if they had gone the
 other way with it.)


 On Thu, Feb 26, 2009 at 2:08 PM, Eric Veenendaal 
 e...@ericveenendaal.comwrote:


 I just wanted to start a thread expressing my displeasure with the
 choice to block copy-protected apps from being made available to
 ADPs.  The thing that drew me to the android platform was the fact
 that it had such a lower barrier to entry.  I can't afford to have two
 phone plans going.  The idea of investing $425 to allow me to have one
 device to both develop for and use for my day to day life was very
 attractive.  However, Google's recent assumption that developers will
 pirate drm'd software simply because they can is ridiculous. If
 someone wanted to pirate software, they'd simply open a t-mobile
 account, unlock the phone, and save $300+.  I hope Google reconsiders.




 



-- 
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.  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: Android source code to find out which drawable a widget should use for its background?

2009-03-01 Thread Romain Guy

Hi,

You should look at StateListDrawable.java.

On Sun, Mar 1, 2009 at 4:50 PM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:

 Hi,

 Can you please tell me where is the android code which picks the
 different drawable will be used as background
 when it has focus?

 For example, I have the following setup for my widget:

 ?xml version=1.0 encoding=utf-8?
 selector xmlns:android=http://schemas.android.com/apk/res/android;

    item android:state_pressed=true
          android:drawable=@drawable/header_list_pressed /

    item android:state_focused=true
          android:drawable=@drawable/header_list_focus /
 /selector

 Where is the android code which finds out which drawable it should
 used for the widget's background?

 I have looked at view.java, but I can't figure out which method is
 doing what drawable should be used.

 Thank you.

 




-- 
Romain Guy
Android framework engineer
romain...@android.com

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

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



[android-developers] Re: what happened to Logcat inside eclipse?

2009-03-01 Thread Charlie Collins

Definitely still there with 1.1. Maybe you closed the view, or
something is corrupt? You can open just that view (Eclipse view I
mean). Window-Show View-Android- pick from there.

http://code.google.com/android/intro/develop-and-debug.html#developingwitheclipse

On Mar 1, 6:39 pm, 3D ernestgfre...@gmail.com wrote:
 With SDK 1.0 I liked using Logcat inside Eclipse.  I can't find it
 with SDK 1.1 so I'm using Logcat in terminal but its not as nice - no
 color-coding and more difficult to read.  Is it still there in Eclipse?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] webview problems when rendering HTML and using loadData

2009-03-01 Thread Clay

I know that many of you know this already but I am making a post
because I spent 5 hours trying to figure out why loadData was not
working. This does not pop up easily in searches of the mailing list.

TAGS: webview background white android loadData

WebView momentContent =
(WebView) view.findViewById
(R.id.subscription_list_moment_webcontent);
WebSettings wsettings =
momentContent.getSettings();
wsettings.setJavaScriptEnabled(true);

//works great
//momentContent.loadUrl(http://www.momentarynow.com/app/public/
android/info_about.html);

//doesnt work exact same content WHY?
momentContent.loadData(
ResourceUtils.loadResToString(R.raw.content, 
mContext),
mimeType,
encoding);



!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=UTF-8
style type=text/css
!--
.bg {
font-size: x-small;
background-color: #CC6600;
}
--
/style
/head
body class=bg
foobar
/body
/html

unless you use the most simple html possible, like no style sheets,
backgrounds, etc, loadData seems to blow up. The only workaround I
have found is to use loadDataWithBaseURL instead


final String mimeType = text/html;
final String encoding = UTF-8;
//render the html
WebView momentContent =
(WebView) 
findViewById(R.id.subscription_list_moment_webcontent);
WebSettings wsettings =
momentContent.getSettings();
wsettings.setJavaScriptEnabled(true);
momentContent.loadDataWithBaseURL(http://fake.com;,
ResourceUtils.loadResToString(
R.raw.content,
getApplicationContext()),
mimeType,
encoding,
http://fake.com;);


oh now it magically works. but my forehead is a bit bruised from
hammering it against the brick wall.

I merely post to help others avoid my fate.

Clay



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

2009-03-01 Thread Charlie Collins

You probably want the SensorManager and SensorListener:

http://code.google.com/android/reference/android/hardware/SensorManager.html

http://code.google.com/android/reference/android/hardware/SensorListener.html

Also TiltLander has a nice concise example:
http://code.google.com/p/tiltlander/source/browse/trunk/TiltLander/src/org/hermit/tiltlander/LunarLander.java.

On Mar 1, 5:18 pm, J. Pablo Fernández pup...@pupeno.com wrote:
 Hello,

 Is there an easy way to detect shaking of the phone? Or do I have to
 implement it myself by monitoring the sensors? If so, any hints on how
 shaking looks like from the sensor point of view?

 Thanks.
 --
 J. Pablo Fernández pup...@pupeno.com (http://pupeno.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: Detect shaking

2009-03-01 Thread JP


Don't expect it to be terribly accurate. Good luck.

On Mar 1, 5:58 pm, Charlie Collins charlie.coll...@gmail.com wrote:
 You probably want the SensorManager and SensorListener:

 http://code.google.com/android/reference/android/hardware/SensorManag...

 http://code.google.com/android/reference/android/hardware/SensorListe...

 Also TiltLander has a nice concise 
 example:http://code.google.com/p/tiltlander/source/browse/trunk/TiltLander/sr

 On Mar 1, 5:18 pm, J. Pablo Fernández pup...@pupeno.com wrote:

  Hello,

  Is there an easy way to detect shaking of the phone? Or do I have to
  implement it myself by monitoring the sensors? If so, any hints on how
  shaking looks like from the sensor point of view?

  Thanks.
  --
  J. Pablo Fernández pup...@pupeno.com (http://pupeno.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: Media Player callbacks only function for an Activity?

2009-03-01 Thread Marco Nelissen

On Sun, Mar 1, 2009 at 4:55 PM, Paper Coder paperga...@gmail.com wrote:
 I didn't realize it wouldn't return the media player until it was ready to
 play.

 Now the methods in media player make much more sense.  I was wondering why
 there wasn't a way to create a new media player object with the new keyword,
 then set the resource id.

You can't set the resource id directly, but you can get a
filedescriptor for the resource. Something like:

MediaPlayer mp = new MediaPlayer();
AssetFileDescriptor afd =
getContext().getResources().openRawResource(R.raw.yourmp3resource);
mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(),
afd.getLength());
mp.prepare();
mp.start();

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



[android-developers] Detect existence of an app or intent

2009-03-01 Thread Wah

Is it possible for one app A to detect whether another app B or some
intent in B exists?

I know the package name and the intent name in app B, but I don't want
to invoke the intent.

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



[android-developers] Re: what happened to Logcat inside eclipse?

2009-03-01 Thread 3D

Ok, I found it.  Thanks.


On Mar 1, 5:49 pm, Charlie Collins charlie.coll...@gmail.com wrote:
 Definitely still there with 1.1. Maybe you closed the view, or
 something is corrupt? You can open just that view (Eclipse view I
 mean). Window-Show View-Android- pick from there.

 http://code.google.com/android/intro/develop-and-debug.html#developin...

 On Mar 1, 6:39 pm, 3D ernestgfre...@gmail.com wrote:

  With SDK 1.0 I liked using Logcat inside Eclipse.  I can't find it
  with SDK 1.1 so I'm using Logcat in terminal but its not as nice - no
  color-coding and more difficult to read.  Is it still there in Eclipse?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SAXParser fails on some RSS feeds

2009-03-01 Thread 3D

I just wanted to report that I've tried TagSoup and at first glance it
seems to be doing exactly what I want - this is great!  Instead of
using a SAXParserFactory I'm now using the SAXFactoryImpl class in
TagSoup to instantiate a new SAXParser.  I will need to look it over a
bit more but it just parsed through a copyright symbol without any
complaints!!


On Mar 1, 7:32 am, StefanK skyntc...@gmail.com wrote:
 In my experience, the problem is in many cases in the character
 encoding used in the feed. If the feed is encoded using ISO-8859-1
 encoding (which is what CNN top stories appears to use), and you are
 trying to read it using the default UTF-8 encoding some symbols will
 come as invalid and break the parser. The only viable solution is to
 manually detect the encoding before trying to parse and then construct
 the input stream given to the parser with the correct encoding. This
 is what I end up doing for BeyondPod in both Windows Mobile and
 Android platforms and this solved large set of parsing issues.
 Welcome to the bizarre world of RSS parsing.

 Stefan

 On Mar 1, 10:03 am, grennis gren...@gmail.com wrote:

  OK, thanks all. I didn't realize the problem was as pervasive as it
  is. I'm presenting a limited set of feeds so I'm hoping the scrub
  approach will work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Pick multiple contacts from the contacts application

2009-03-01 Thread Sanjay

Were you able to figure out how to pick multiple contacts from the
addressbook? Is there a way to do it anyone? I'm using
Intent.ACTION_GET_CONTENT to pick one contact but don't know if it's
possible to pick multiple contacts.

On Feb 17, 5:20 am, for android forandr...@gmail.com wrote:
 Is there any Intent for picking multiple contacts from the
 Intent.ACTION_PICK?If yes whats the data that needs to be passed to the
 intent?

 Thanks

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



[android-developers] Re: How to use proxy server on the g1?

2009-03-01 Thread sparso

Hello,

I've written an application which may help, it allows you to use the
browser from behind a proxy server on a WIFI network. Search for the
ProxySetting application on the market (its free).

At the moment Android only allows proxy information to be used when
you are connected to a GPRS/3G network, there's a bug raised about it
here: http://code.google.com/p/android/issues/detail?id=1273. The
ProxySetting application works around the problem, but unfortunately
it's still a bit limited (by Android): It does allow for using the web
browser behind a non-authenticated proxy, but apps such as Maps and
Youtube don't currently work and there's no way to add a username/
password for the proxy.

I'm sure this will be sorted out properly by the Android team, but
until then hopefully the ProxySetting app will help.

Please let me know if it works or if you have any problems (I've only
just posted it on the Market so haven't had any feedback yet).

Thanks!

On Feb 16, 2:43 pm, alejandro.cale...@gmail.com
alejandro.cale...@gmail.com wrote:
 Someone find any solution out for this? In my case, In the work, there
 is a wifi signal trough theproxy.

 Thanks.

 On Feb 4, 6:55 am, Al Sutton a...@funkyandroid.com wrote:

  Sounds like an opportunity for someone to write an app. The source for
  theproxysettings page is in;

  /packages/apps/Settings/src/com/android/settings/ProxySelector.java

  in the git repository, so couldn't someone write an app using that, add
  in some buttons to change configuration and some optional Geo-location
  to switchproxysettings automatically based one where you are and it'll
  probably be a popular app.

  Or is it another piece of  functionality limited to the in-crowd who can
  get their app signed with the right certificate?

  Al.http://andappstore.com/

  friedger wrote:
   I am interested as well.
   Friedger

   On Jan 30, 3:18 pm, joff m...@j0ff.com wrote:

   Anyone figured this one out yet?

   On Jan 24, 9:38 pm, DJMoran danmo...@blueyonder.co.uk wrote:

   I also need the exact same help, my school uses aproxyserver to
   access the web.

   Also my home wireless doesn't need aproxyto access the web.

   I know the iPhone and iPod touch canusemultipleproxysettings
   depending on the network it is connected to but what about theG1

   On Jan 10, 1:52 pm, kevkev...@googlemail.com

   kevkev...@googlemail.com wrote:

   Does anyone know how to connect to the internet via aproxyserver on
   ag1handset? I need touseaproxyserver at school to get on the
   internet onwifi.

   Cheers

  --
  ==
  Funky Android Limited is registered in England  Wales with the
  company number  6741909. The registered head office is Kemp House,
  152-160 City Road, London,  EC1V 2NX, UK.

  The views expressed in this email are those of the author and not
  necessarily those of Funky Android Limited, it's associates, or it's
  subsidiaries.

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



[android-developers] execute unix command from an android app

2009-03-01 Thread ledzgio

hi all guys,

I'am new of Android developement...

how can i execute a unix command from an android application?

i want to execute the setprop command from an activity and set DNS
from a simple UI..

anyone knows how to do it?

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] help about SMS BroadcastReceiver conflict with GPS LOCATION_SERVICE

2009-03-01 Thread Kevin AN

code is here:
public void onReceive(Context context, Intent intent)
{
LocationManager lm = (LocationManager) context.getSystemService
(Context.LOCATION_SERVICE);

loc = lm.getLastKnownLocation(gps).toString();

PendingIntent dummyEvent = PendingIntent.getBroadcast(context, 
0,
new Intent(com.xxx.xxx.IGNORE_ME), 0);
mng.sendTextMessage(addr, null, loc, dummyEvent, dummyEvent);

}

the problem is:
sendTextMessage work well when the two above line is commented. but
when the two line is uncommented, sendTextMessage will trigger a null
point exception!
I think this issue is because the first line
(context.getSystemService) modify the state of context.
so , can anyone help me?

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



[android-developers] Re: unzip

2009-03-01 Thread BenAveling

   # An unexpected error has been detected by Java Runtime Environment:
   #
   #  Internal Error (classFileParser.cpp:2924), pid=3624, tid=6748
   #  Error: ShouldNotReachHere()
   #
   # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode windows-
   x86)
   # An error report file with more information is saved as:
   # G:\TestWebView\hs_err_pid3624.log
   #
   # If you would like to submit a bug report, please visit:
   #  http://java.sun.com/webapps/bugreport/crash.jsp

  This error cannot be coming from Android. There is no Sun JRE in
  Android, only Dalvik. And, there is no G: drive in Android, only in
  Windows PCs.

It may be a bug in the JVM, but it's triggered by the way Android
projects are set up.

See 
http://dtmilano.blogspot.com/2008/11/android-testing-on-android-platform.html
for an explanation and a workaround/solution, depending on your
situation.

Regards, Ben



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



[android-developers] How to get an interface on a service without destroying the service at unbind

2009-03-01 Thread michael.bollm...@googlemail.com

My service works exactly the way i want as long as i use start and
stop
and communicate using intents.

However my activity needs to change the state of my service as well as
retrieving
state information.

So i thought it would be nice to broadcast some kind of state_changed
event from
my service and use a binder interface to pull information from the
service or change
the services state based on user input.

This works fine too.
The only problem is that my service gets killed when i unbind it just
as the documentation says.

Is there any way to keep the service alive but still get an interface
to control it directly.
My activity offers the user a way to stop the service and the service
kills itself anyway
after it's work is done but i don't want the service to stop every
time the activity is destroyed.

Thanks in advance
Michael

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



[android-developers] Device Interface to Android Phone

2009-03-01 Thread Mike E K

I'd like to develop a device that interfaces to a G1 or other upcoming
Android phone. The phone would be docked to this device in order to
provide some external functionality. The G1 has the following
interface - HTC ExtUSB™ (11-pin mini-USB 2.0 and audio jack in one) -
but I'm not sure if this is feasible to use. I haven't seen an
optional API that addresses the interface over a USB connection.

If the only way standard way to talk between a peripheral device and
an Android phone is Bluetooth, will the Bluetooth API be available
sometime soon? This setup would use Bluetooth to send/receive data and
the USB connection purely for power.


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



[android-developers] Android application without UI

2009-03-01 Thread Javier Segura

Hello All,

I've written a simple app for android that changes the content of a
System Setting. For use it I create a simple Activity that makes the
job. When I execute this app it shows for less than a second a black
ui (the layout of this activity). There is any method for refactor my
app in a windowless way?

-- 
Javier

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



[android-developers] Regarding installation of application in memory card in G1

2009-03-01 Thread hoffy

Hi,

Just wondering how can we install the applications in my memory card
of HTC dream...cause by default it gets installed in the phone memory
and my memory is very low now

thanks

cheers

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



[android-developers] Soap issues

2009-03-01 Thread Seer

Guys,
Is there a Soap lib for android?  I know Soap is not the best for the
android but the web services i wish to use are written in soap.  I
have tried ksoap2 but none of the versons of ksoap i have been able to
find will work with android sdk 1.0 or 1.1.  I have tried a version of
ksoap2 hosted on http://www.tuxpan.com/android-soap/ but it always
crashed when the app used it and then when i tried to comple the
source I discovered that it seems to have been built for a past
version of the sdk that has different classes.

If worst comes to worst i will use RISK WS to call a web service i
will right that will then call the soap web service but i would prefer
to directly call the soap web service instead of bouncing via another
web service.

The web services i am trying to call are detailed in this pdf
https://www.pennytel.com/api.pdf

Chris

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

2009-03-01 Thread Miles Smith
As I haven't really implemented anything with the accelerometer yet, I don't
know exactly, but I would go about it by monitoring normal, non-shaking
values from the sensor, then anything that fell out of those ranges for a
certain amount of time would be considered shaking.

my 2 cents.

On Sun, Mar 1, 2009 at 2:18 PM, J. Pablo Fernández pup...@pupeno.comwrote:

 Hello,

 Is there an easy way to detect shaking of the phone? Or do I have to
 implement it myself by monitoring the sensors? If so, any hints on how
 shaking looks like from the sensor point of view?

 Thanks.
 --
 J. Pablo Fernández pup...@pupeno.com (http://pupeno.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: Need Official HOW-TO: Upgrade from Original ADP1 firmware to RC33

2009-03-01 Thread MF

This is great news! Where will the ADP1 images be deployed to; i.e. is
there an official site (e.g. developer.android.com)?

MF

On Feb 17, 4:51 pm, Jean-Baptiste Queru j...@android.com wrote:
 We're working on having an official 1.1 system image available for the ADP1.

 It will not be PLAT-RC33, which is specific to T-Mobile US, just like
 the 1.0 version that originally came with the ADP1 was not TC4-RC30.

 JBQ



 On Tue, Feb 17, 2009 at 6:52 AM, JLMG john.l.millergeo...@gmail.com wrote:

  The announcement of Android 1.1 has been made, and I am eager to move
  forward.

  However I believe my Android Dev Phone 1 has an older version (than
  RC30) on it when it arrived and theupgradefails when I use the
 upgradeto RC33-from-RC30 zip file.

  Fortunately theupgraderolls back and leaves the phone fully
  operable. So I can keep working with v1.0_r2

  Here's some info:

   Firmware version:  1.0
   Baseband version: 62.33.20.08H_1.22.12.29
   Build number:        dream_devphone-userdebug 1.0 UNLOCKED 116222
  test-keys

  I'd like to ask the Android team to take the time to gather the the
  information and zip files to enable someone toupgradetheir ADP1s
  from the version delivered with the phone all the way to RC33 and post
  the zips and an official HOW-TO so some of us can catch up.

  As a model I'd like to suggest the many linux sites (Ubuntu comes to
  mind) that post various versions of their software along with
  information on the properupgradepath to get from early versions to
  the current one. Once the first official definitive HOW-TO is built it
  is much easier to add information for other upgrades to come.

  Even with the short time I've been working with it, I am truly amazed
  at all the stuff packed into the G-1 and the android system. I'm
  really impressed, and I have a lot of ideas, but I need some help to
  catch up with the group. I am sure there are other folks joining
  development now that could use similar help.

  Thanks,   JLMG

 --
 Jean-Baptiste M. JBQ Queru
 Android Engineer, Google.

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

2009-03-01 Thread hanifbbz

On Feb 27, 7:12 pm, BryBam bry...@gmail.com wrote:
 So, unfortunately i have no exp whatsoever with writing software.
 Just html, xhtml, php, sql basically  just web experience. I'm looking
 for a guide on writing a simple app using eclipse, i just installed
 the android SDK to it.  Something simple i'd like to learn to do is
 just build an app that encases a web page similar to the bank of
 america app or the Fbook app. Can somone point me at a guide?

FOR A FAST START:
I would recommend official Java Tutorial on SUN website:
http://java.sun.com/docs/books/tutorial/
You don't have to know everything (like RMI, Swing, JDBC) but the
following topics give you the best start:

# Getting Started  — An introduction to Java technology and lessons on
installing Java development software and using it to create a simple
program.
# Learning the Java Language — Lessons describing the essential
concepts and features of the Java Programming Language.
# Essential Java Classes — Lessons on exceptions, basic input/output,
concurrency, regular expressions, and the platform environment.
# Collections — Lessons on using and extending the Java Collections
Framework.

Before starting on the mobile programming world, it is better to gain
some basic experience with desktop application programming (JavaSE)
because running and debugging is relatively easier, simpler and
faster. When you feel comfortable with Java classes, interfaces and
basic OOP concepts, then you can jump to Android wagon and enjoy the
more technical aspects like UI, Networking, 3D, MAP, etc.

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



[android-developers] Cookies

2009-03-01 Thread Miles Smith
How does one go about setting a cookie?

I have an website that sends mp3's to clients, but the request must have a
cookie attached to it. How would I go about setting a cookie for a
MediaPlayer URL request? Is that even possible?

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



[android-developers] JKS or PKCS12 Keystores

2009-03-01 Thread Markus

Hi,

I've read that I can't import private and public keys from a PKCS12 or
JKS-Keystore in order to sign or encode a message within my android-
application.

Are there any other possibilites to import my private key into an app?

Is it planned to support these keystores?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 avoid my background thread been killed ??

2009-03-01 Thread Ashrotronics

   Hello,everyone!
   As is mentioned above,What i'm trying is to protect a sub-
thread,and keep it going on as long as the App that starts it is still
alive.In other words,If the system need more resources,Let it kill
both the App main thread and the sub-thread started from it,Instead of
just kill the sub-thread.Is there any way i can do this ??
  And another question here,The android system seems to be rude,As
it killed my thread without telling me,even in the logs,Is this the
case ?
  Thanks in advance!

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



[android-developers] Re: How to get an interface on a service without destroying the service at unbind

2009-03-01 Thread Marco Nelissen

Call startService() first, and then after that bind to the service as usual.



On Sun, Mar 1, 2009 at 10:46 AM, michael.bollm...@googlemail.com
michael.bollm...@googlemail.com wrote:

 My service works exactly the way i want as long as i use start and
 stop
 and communicate using intents.

 However my activity needs to change the state of my service as well as
 retrieving
 state information.

 So i thought it would be nice to broadcast some kind of state_changed
 event from
 my service and use a binder interface to pull information from the
 service or change
 the services state based on user input.

 This works fine too.
 The only problem is that my service gets killed when i unbind it just
 as the documentation says.

 Is there any way to keep the service alive but still get an interface
 to control it directly.
 My activity offers the user a way to stop the service and the service
 kills itself anyway
 after it's work is done but i don't want the service to stop every
 time the activity is destroyed.

 Thanks in advance
 Michael

 


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



[android-developers] Re: Detect existence of an app or intent

2009-03-01 Thread Marco Nelissen

Try PackageManager.resolveActivity()

On Sun, Mar 1, 2009 at 6:53 PM, Wah mobic...@gmail.com wrote:

 Is it possible for one app A to detect whether another app B or some
 intent in B exists?

 I know the package name and the intent name in app B, but I don't want
 to invoke the intent.

 Wah
 


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

2009-03-01 Thread Romain Guy

XML tags map to classes. Just look at the documentation of the control
you want and it should show the list of valid XML attributes at the
top with their Java API equivalent (for instance:
http://developer.android.com/reference/android/widget/FrameLayout.html)

On Sun, Mar 1, 2009 at 12:01 AM, Chris Smith (Quirk Software)
quirksoftw...@gmail.com wrote:

 Hey.

 To be plain, the android / xml widget reference material is poor at
 best.  Rather than approaching the controls from an xml point of view,
 its all driven from a class point of view, which is clunky when you
 want to figure out how to build a good xml UI.

 Is there any decent documentation with design in mind (tag names,
 attribute names, etc) or is it just figure it out and struggle through
 the best you can?

 I'm on my 2nd android app and losing patience with hunting and pecking
 for the correct attributes / tags.

 Any help would mean great appreciation from me and major karma in the
 next life.

 




-- 
Romain Guy
Android framework engineer
romain...@android.com

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

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



[android-developers] Re: Cookies

2009-03-01 Thread Marco Nelissen

On Sat, Feb 28, 2009 at 10:44 PM, Miles Smith mi...@vimae.com wrote:
 How does one go about setting a cookie?

 I have an website that sends mp3's to clients, but the request must have a
 cookie attached to it. How would I go about setting a cookie for a
 MediaPlayer URL request? Is that even possible?

No, sorry.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 ratio of dp-to-pixel change with the screen density?

2009-03-01 Thread Xiongzh

Thank you very much for your clear explaination.

Now I agree with you that we had better use dip/sp as the dimention
unit to design the UI.
However when we shall use px/mm/pt?

On 3月1日, 下午12时16分, Romain Guy romain...@google.com wrote:
 Hi,

 The reason for dip to exist is simple enough. Take for instance the
 T-Mobile G1. It has a pixel resolution of 320x480 pixels. Now image
 another device, with the same physical screen size, but more pixels,
 for instance 640x480. This device would have a higher pixel density
 than the G1.

 If you specify, in your application, a button with a width of 100
 pixels, it will look at lot smaller on the 640x480 device than on the
 320x480 device. Now, if you specify the width of the button to be 100
 dip, the button will appear to have exactly the same size on the two
 devices.

 You can easily see this happen when you compare the T-Mobile G1 with
 the Android emulator. Computer monitors usually have low/medium pixel
 densities. For instance, the monitor I'm using to write this email has
 a density of about 100 pixels per inch, whereas the G1 has about 180
 pixels per inch. This means that when I compare my application on the
 G1 with my application on the Android emulator on my computer, the
 version on my computer appears a lot bigger to me.

 It is very important that you use resolution independent units like
 dip when you create your UI. This well help make your application run
 on future Android devices that may or may not have the same pixel
 density as the G1.



 On Sat, Feb 28, 2009 at 8:06 PM, Xiongzh zx.zhangxi...@gmail.com wrote:

  I'm being confused by the 'screen density' concept in Android.
  I knwe that dpi (dot per inch) came from the printing device. 160 dpi
  means 160 dots in every inch on the paper.
  However, when dpi is used for the screen density, for example, what's
  mentioned '160 dpi screen' in Android document, what's the meaning?
  160 pixels on every inch of the display?

  As described 
  inhttp://code.google.com/intl/zh-CN/android/reference/available-resourc...,
  1 dip (density-independent pixel) means 1 pixel on a 160 dpi screen.
  Why does the ratio of dp-to-pixel not necessarily change with the
  screen density in direct proportion?

  When the dpi is changed from 160 to 80, how many pixels will 1dp will
  take? 0.5?

  I can hardly understand why dip/dp is introduced into Android.

  Thank you in advance for explaining that to me.

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

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



[android-developers] Re: How to avoid my background thread been killed ??

2009-03-01 Thread Jon Colverson

On Mar 2, 3:32 am, Ashrotronics 030440...@163.com wrote:
    As is mentioned above,What i'm trying is to protect a sub-
 thread,and keep it going on as long as the App that starts it is still
 alive.In other words,If the system need more resources,Let it kill
 both the App main thread and the sub-thread started from it,Instead of
 just kill the sub-thread.Is there any way i can do this ??
   And another question here,The android system seems to be rude,As
 it killed my thread without telling me,even in the logs,Is this the
 case ?

Are you starting the thread from an Activity? If you need a thread
that continues to run when the Activity is no longer visible, then you
should create it from a running Service.

--
Jon

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



[android-developers] Any Listener for shake movement ?

2009-03-01 Thread gganesh

hi,
Is there any Listener  able to listen for shake movement   .
when someone shakes the phone an event should  be triggered ,how I'm
supposed to do that ,any idea on this topic is appreciable.
Thanks
ganesh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: what's the way to put or access a file onthe sdcard

2009-03-01 Thread Cloudy
would you give me a example .pls  

 thanks 


2009-03-02 



Cloudy 



发件人: Marco Nelissen 
发送时间: 2009-02-25  02:09:36 
收件人: android-developers 
抄送: 
主题: [android-developers] Re: what's the way to put or access a file onthe 
sdcard 
 
The sdcard is mounted at /sdcard (or rather:
Environment.getExternalStorageDirectory() ), and you can access files
on it by path, just like you would access any other file by path.
On Mon, Feb 23, 2009 at 7:51 PM, dq dq dq1...@gmail.com wrote:

 i have a game need to network resource.i want download it on the sdcard.how
 i put the resouce on my sdcard and how can access my file
 from the sdcard.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Think twice before turning on the Copy Protection option! -- there's a serious bug in Market

2009-03-01 Thread csvy

I just had the same issue happen to my application.  I decided to
disable Copy Protection after reading how useless it was, and now
everyone is getting Force Quit errors on Activities with a WebView!!!
I have turned Copy Protection back on and added a note to the
description saying to uninstall then reinstall.  Is this the
appropriate course of action?  I can't believe this hasn't been fixed
yet! (or at least put a warning in the Market Developer Console). :(

On Feb 27, 6:31 am, wayne mcfadden- Red Droid
waynemcfad...@gmail.com wrote:
 I'm also having this problem. I have a couple of apps using copy
 protection though and this is the first one that has run into this
 problem.  I first tried to upload my app via firefox and forgot that
 that that interface is broken and has been broken for the past 2-3
 weeks. So I switched to Safari and finished the upload from there.
 I'm wondering if this is only a regional problem, the few emails that
 I've gotten are googlemail accounts which are England and Germany I
 think.  Have you found that? Or any work arounds?  Looks like turning
 off copy protection is a bad idea?

 Wayne

 On Feb 26, 12:42 am, mac gr...@czesla.de wrote:

  That will be the same for my application. I startet with copy
  protection in the first version. After some people were not able 
  todownloadthe application (another bug with some APN?) I switched off
  copy protection. Now I get crash reports that I can not understand
  after an upgrade. Uninstall and reinstall works. And I got plenty of 1
  star ratings for that. Arg

  Mirko

  On 23 Feb., 00:50, N4Spd robert.c...@gmail.com wrote:

   I'm been tracking down this exact issue with my app and it matches
   what focuser describes.
   I turned on copy protection on a free app.  People started getting
   crashes.

   The app starts with a help activity containing a webview.
   This web view is now throwing an exception trying to access a sqlite
   webview.db database on it's own thread and crashing.
   In addition, this help activity only starts up if there are no
   settings but even upgrades are getting this activity now.

   It problem extends to other android APIs as well because if I avoid
   the webview, it still crashes in other APIs.

   In summary, if you change copy protection for your app:

   1. user preferences will be wiped
   2. webview willcrash
   3. other APIs willcrash

   Removing copy protection does not help because now I've got some users
   with and without copy protection and changes in either direction
   causes the problem.  Argh...

   rob

   On Feb 22, 9:55 am, focuser linto...@gmail.com wrote:

confirmed. If you first install an apk unlocked, and then install a
locked one, you will get that sqlite exception.  also, the old
preferences seems to be deletedafterthe locked apk is installed.

Another thing is, even installed locked from scratch (uninstall and
adb install -l), there are some problems with resources.  Our app
displays an HTML page when it starts, but now I get Web page not
available:file:///android_asset/welcome.html   This works fine
if it's installed unlocked.
This might explain the resource problem that I had before?

On Feb 22, 9:18 am, Carter ccjerni...@gmail.com wrote:

 I can confirm that there is a bug with the forward locking on the
 Android Market.  The problem I've experienced is that users upgrading
 from an unlocked version of Locale to a locked version of Locale are
 experiencing acrashwhen opening the app.  The failure is that the
 app can'topenits ContentProvider (a call to
 SQLiteOpenHelper.getWritableDatabase()fails).  As an experiment, I
 tried wrapping the section in a try-catch and to use a newdatabase
filename.  My thought was that the old sqlitefilemight be
 unreadable because of permissions or other problems.  This didn't work
 though.

 In your apps, you should be able to reproduce this bug by doing a
 plain old adb install myapp.apk,openthe app on the phone, then do
 an adb install -l -r myapp.apk.  The -l option enables forward-
 locking.  When you re-openthe app of the device, you should see the
 problem reproduce.  This problem also occurs both ways, so users who
 successfully installed the locked version of the app will see acrash
 if the next version of the app is unlocked.

 I've also contacted someone at Google about this, so we'll see what
 happens.

 On Feb 21, 4:43 pm, focuser linto...@gmail.com wrote:

  There's no error whatsoever when that happens.  Apk was successfully
  created and signed just as if everything was fine.  But when you
  install and run the apk, you will see the errors.

  I will try to see if I could reproduce the problem with a smaller 
  code
  base.

  On Feb 21, 1:20 pm, Xavier Ducrohet x...@android.com wrote:

   Hello,

   do you have an output from Ant when the error happens?

[android-developers] Re: Assuming Developers are Pirates

2009-03-01 Thread Al Sutton

Market doesn't stop downloading of applications to devices that don't 
support copy protection because users with a rooted US G1 firmware are 
allowed to download the apps (see http://strazzere.com/blog/?p=185).

I'm going to play devils advocate here because I can see where many of 
the posters are coming from;

If what's been deployed is a response to developers asking for copy 
protection and forward locking why was a scheme implemented that 
couldn't be used on devices which had been sold months before the system 
was rolled out? JBQ said it was a time constraint, some will say it's 
because Google assumed that ADP1 users would the extra facilities to 
crack the copy protection,.

My personal view is that it's a side effect of project management and QA 
failures on the project which have resulted in the deployment of a 
solution which neither meets developers needs nor does it vastly 
increase the effort needed to copy and run applications on another device.

Al.


Dianne Hackborn wrote:
 The whole premise of this discussion is wrong.  What has happened is:

 1. The developer asked for their application to be copy protected with 
 forward locking.
 2. The user is running a phone that is unlocked, so can not do that 
 kind of copy protection.
 3. The Market does not allow the user to download the app, because 
 their phone does not support a feature the developer has requested.

 It has nothing to do with assuming anyone is a pirate, it has to do 
 with doing what the developer has asked.

 On Sun, Mar 1, 2009 at 3:19 PM, Disconnect dc.disconn...@gmail.com 
 mailto:dc.disconn...@gmail.com wrote:

 I meant to reply earlier, didn't get a chance.

 Something you may (or may not) find amusing. So far, google has
 only assumed their OWN EMPLOYEES are thieves. (Yes, they've said
 the same restrictions are in the unreleased adp1.1 image, but
 since its unreleased that could still change..)

 There is NO image for the adp1 that allows paid OR protected apps
 (including free-protected and paid-unprotected). The holiday image
 is for google employees only, on the phones they received instead
 of a bonus last year. So..yeah. Google has acted to indicate that
 they believe, given the chance, their employees will steal
 applications. (Funny, and kinda sad. Although they'd be getting
 just as much of a roasting if they had gone the other way with it.)


 On Thu, Feb 26, 2009 at 2:08 PM, Eric Veenendaal
 e...@ericveenendaal.com mailto:e...@ericveenendaal.com wrote:


 I just wanted to start a thread expressing my displeasure with the
 choice to block copy-protected apps from being made available to
 ADPs.  The thing that drew me to the android platform was the fact
 that it had such a lower barrier to entry.  I can't afford to
 have two
 phone plans going.  The idea of investing $425 to allow me to
 have one
 device to both develop for and use for my day to day life was very
 attractive.  However, Google's recent assumption that
 developers will
 pirate drm'd software simply because they can is ridiculous. If
 someone wanted to pirate software, they'd simply open a t-mobile
 account, unlock the phone, and save $300+.  I hope Google
 reconsiders.








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

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


 


-- 

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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