[android-developers] Re: Android Market app suspended. What do I do?

2009-04-30 Thread Al Sutton

Have a look at "passing off" - http://en.wikipedia.org/wiki/Passing_off .
It's part of UK law (it's in the UK Tradmarks Act 1994). I'm guessing Google
did the "moron in a hurry" test which although has been shown to not be
legally enforceable, it's Googles market and their T&Cs say they can
basically pull you app at any time for any reason.

As for contacting you, well, that would have been nice, but Google are doing
the distribution here so they're the ones in the firing line.

My advice; Change the name of the app and move on.

Al.
---

* 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. 


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of bryan
Sent: 30 April 2009 22:23
To: Android Developers
Subject: [android-developers] Android Market app suspended. What do I do?


I received notice that my application was suspended yesterday around lunch.
I've contacted support via email and the publisher support form with no
answer as of yet. What can I do to resolve this issue?

The violation was that after paid app support hit the UK, a UK company
(non-software) with the same name as my app yelled at Google. The result?
Suspended my application entirely, not just for the UK. I love that the
company didn't merely email me, in which case I'd have happily resolved the
issue.

So here I sit, waiting and powerless. A lot of people have purchased the app
and expect updates. I have an apk with a new name, but can't do anything
with it. The developers console has no clickable options.

Is this how the market works? One social inept company can shut down your
app permanently under shady pretexts? I didn't know that they exist. It was
in error. The news is surprising to me given that they deal in the
non-software realm. I'd like to make everyone happy and resolve this issue.
What can I do?



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

2009-04-30 Thread mak

Hi All,

In Android settings, Enable GPS Satellite menu is provided to enable /
disable GPS.
How to enable/disable GPS from Any android java application ?
I understood that there is no api expose to do that.

Any workaround or solution.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: When is a good time to require 1.5?

2009-04-30 Thread JP



On Apr 30, 9:47 pm, EboMike  wrote:
> Actually... that's not a bad idea. Have the user install the 1.1-based
> app from the market, and if the code detects the 1.5 API, it brings up
> a dialog and offers an "Cupcake version preview" for download - that
> will bring up a link to the dev's site with the .apk for download.
>
> Downsides, of course, would be...
>
> 1. The user needs to allow installing third-party APKs in the
> settings.
Correct. For the enthusiast.

> 2. This will interfere with the phone's app installation detection, so
> the Cupcake version will confuse programs (including the Market app
> itself) that try to determine whether or not an upgrade is available.
Hmm, I never spent much thought on this - the apk's manifest includes
the pertaining information so one would think this would be the single
point of reference - regardless whether the apk is posted on a web
site, or on the Market.

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

2009-04-30 Thread cre

Mark,
I got to see the error condition with hierarchyviewer. The ListView is
visible but the TextViews that contain the lines of text are missing
from the diagram.  That is why the list of items does not appear.  I
did a print screen to capture the diagrams of the error condition and
the normal condition.



Here are the properties and values of the ListView.  Does this provide
any clues?

absolute_x  0
absolute_y  91
getBaseline()   -1
getDescendantFocusability() FOCUS_BEFORE_DESCENDANTS
getHeight() 0
getPersistentDrawingCache() SCROLLING
getSelectedView()   null
getTag()null
getVisibility() VISIBLE
getWidth()  0
hasFocus()  true
isAlwaysDrawnWithCacheEnabled() false
isAnimationCacheEnabled()   true
isChildrenDrawnWithCacheEnabled()   false
isClickable()   false
isDrawingCacheEnabled() false
isEnabled() true
isFocusable()   true
isFocusableInTouchMode()true
isFocused() true
isInTouchMode() true
isSelected()false
isSoundEffectsEnabled() true
layout_bottomMargin 0
layout_height   FILL_PARENT
layout_leftMargin   0
layout_rightMargin  0
layout_topMargin0
layout_widthFILL_PARENT
mBottom 0
mFirstPosition  0
mID id/tab2
mItemCount  3
mLeft   0
mMeasuredHeight 0
mMeasuredWidth  0
mNextSelectedPosition   -1
mPaddingBottom  0
mPaddingLeft0
mPaddingRight   0
mPaddingTop 0
mRight  0
mScrollX0
mScrollY0
mSelectedPosition   -1
mTop0
mUserPaddingBottom  0

On Apr 30, 12:26 pm, "Mark Murphy"  wrote:
> > How are bugs reported to Google?
>
> http://b.android.com.
>
> --
> 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: SlidingDrawer issue #1?

2009-04-30 Thread Sheepz

anyone else found something here?

On Apr 30, 5:43 pm, Sheepz  wrote:
> okay, that didnt work :(
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:handle="@+id/ImageView01"
> android:content="@+id/ImageView02">
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:src="@drawable/back2"> ImageView>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:src="@drawable/ahh"> ImageView>
> 
>
> still getting the same message in the ADT only now when launching the
> app, it simply stalls half drawn instead of giving an error message
> saying the application threw an exception...
>
> On Apr 30, 5:40 pm, Romain Guy  wrote:
>
> > You must use different views, it doesn't make sense to have the same
> > view, it's going to confuse SlidingDrawer :)
>
> > On Thu, Apr 30, 2009 at 2:38 PM, Sheepz  wrote:
>
> > > yeah, i figured that might be it, but even after this fix:
> > >  > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content" android:handle="@+id/ImageView01"
> > > android:content="@+id/ImageView01">
> > >  > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content" android:src="@drawable/ahh"> > > ImageView>
> > > 
> > > i still get the same error - i'm gonna try using diffrent views for
> > > the content and the handle
> > > brb :)
>
> > > On Apr 30, 5:32 pm, Romain Guy  wrote:
> > >> There is a bug indeed, the exception message says the "handle" is
> > >> missing, but the "content" is missing. Check out the javadoc. I'll fix
> > >> the exception message.
>
> > >> On Thu, Apr 30, 2009 at 2:26 PM, Sheepz  wrote:
>
> > >> > okay, i might be missing something, the reason i think that this is a
> > >> > bug is that if you use the supplied tool, and cannot avoid getting an
> > >> > exception - it's a bug...
> > >> > i don't see any way around it - the way to create this widget is:
> > >> > a) create widget
> > >> > b) get exception
> > >> > c) fix error
> > >> > d) populate it with the values you want
>
> > >> > by the way, i still havent gotten it to work on my app - here's the
> > >> > code:
> > >> > 
> > >> > 
> > >> > ...
> > >> > 
>
> > >> >  > >> > android:layout_width="wrap_content"
> > >> > android:layout_height="wrap_content" android:handle="@+id/
> > >> > ImageView01">
>
> > >> >  > >> > android:layout_width="wrap_content"
> > >> > android:layout_height="wrap_content" android:src="@drawable/ahh"> > >> > ImageView>
>
> > >> > 
> > >> > 
>
> > >> > I guess i'm doing something wrong here - but i'm used to the whole
> > >> > hierarchical way of things - why is this different in it's
> > >> > implementation?
> > >> > Thanks for the quick answers btw!
> > >> > Sh.
> > >> > (p.s. if you want to see the rest of the layout, it's available at:
> > >> >http://code.google.com/p/bestcardgameever-android/)
>
> > >> > On Apr 30, 5:21 pm, Romain Guy  wrote:
> > >> >> It *needs* a handle. It's not a bug, it's a requirement to make the 
> > >> >> widget work.
>
> > >> >> On Thu, Apr 30, 2009 at 2:16 PM, Sheepz  wrote:
>
> > >> >> > so you mean i have to put some content in it and only then it will 
> > >> >> > be
> > >> >> > visilble? even if this is true, it's still a bug - albeit with a 
> > >> >> > much
> > >> >> > lower severity...
> > >> >> > i'll check it out and report back in a few.
>
> > >> >> > On Apr 30, 5:10 pm, Romain Guy  wrote:
> > >> >> >> Do what the exception says:
>
> > >> >> >> "java.lang.IllegalArgumentException: The handle attribute is 
> > >> >> >> required
> > >> >> >> and must refer to a valid child."
>
> > >> >> >> You need to define the widget to use as the handle of the drawer.
>
> > >> >> >> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>
> > >> >> >> > when adding a slidingDrawer object to my application, i got this 
> > >> >> >> > error
> > >> >> >> > when trying to display it on the main.xml layout view
> > >> >> >> > i used that view to create it as the bottommost component, and
> > >> >> >> > immediatly got this message in the console window and the layout
> > >> >> >> > stopped showing.
> > >> >> >> > here is the exception:
> > >> >> >> > java.lang.IllegalArgumentException: The handle attribute is 
> > >> >> >> > required
> > >> >> >> > and must refer to a valid child.
> > >> >> >> >        at 
> > >> >> >> > android.widget.SlidingDrawer.(SlidingDrawer.java:203)
> > >> >> >> >        at 
> > >> >> >> > android.widget.SlidingDrawer.(SlidingDrawer.java:180)
> > >> >> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
> > >> >> >> > (Native
> > >> >> >> > Method)
> > >> >> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance
> > >> >> >> > (Unknown
> > >> >> >> > Source)
> > >> >> >> >        at 
> > >> >> >> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> > >> >> >> > (Unknown
> > >> >> >> > Source)
> > >> >> >> >        at java.lang.reflect.Constructor.newInstance(Unknown 
> > >> >> >> > Source)

[android-developers] Re: Maps Intent in CupCake

2009-04-30 Thread JP

Xavier,
Having exhausted all the below, I find that calling Street View is
crashing. Both from the built-in Maps app (as well as my app that
calls it). Am I alone with this?

Also, map tiles are not displayed with a 1.5-based build of the app.
The 1.1-based build using identical source code  base runs on an id=3
AVD just fine. Except for the Street View issue, of course.
JP


On Apr 30, 5:30 pm, Xavier Ducrohet  wrote:
> That is correct.
>
> A few more details for everyone.
>
> Maps is not bundled on the default Android 1.5 System Image bundled
> with the SDK.
> Because your app doesn't actually use the Maps API (ie doesn't have
>  with maps), it will install on devices that do not have
> Google Maps.
>
> Therefore:
> - You should use the System Image provided with the "Google APIs" to
> do your testing where you want Maps to be present. In the 1.5 SDK, the
> target id for this add-on is 3. This may change once you add/remove
> platforms/add-on, so it's best to always do a "android list target" to
> find the proper target id.
>
> - You should also test using the default system image that does not
> have Maps. This will simulate devices that may run your applications
> but don't have Maps. Basically, you should catch the exception and
> properly handle it with user feedback.
> If your application absolutely need maps, you could add the
>  tag (even though you don't use the Maps API). This will
> make sure your app only install on devices with Maps.
>
> Xav
>
> On Thu, Apr 30, 2009 at 3:17 PM, agirardello
>
>
>
>  wrote:
>
> > Create a new AVD with:
>
> > android create avd -n my_androidMAPS -t 3
>
> > and then use it while running your app!
>
> > ;)
>
> > On Apr 30, 1:14 pm, agirardello  wrote:
> >> I have the same problem!!!
>
> >> Any help?
>
> >> On Apr 29, 6:55 pm, khose  wrote:
>
> >> > Hello!
>
> >> > I'm migrating my app from 1.1 to 1.5. It works right but i get a
> >> > problem thowing a new intent which used to open a Geo URI in google
> >> > Maps. I think that it must be related with the fact of Gmaps not beign
> >> > included as part of the core. Is there any way to solve it or change
> >> > it if i want to keep the track of 1.1??
>
> >> > This is the code:
>
> >> > Intent mapsIntent = new 
> >> > Intent(Intent.ACTION_VIEW);
> >> > 
> >> > mapsIntent.setData(Uri.parse("geo:0,0?q=" + address + "&z=19"));
> >> > startActivity(mapsIntent);
>
> >> > This is the throwed exception...
>
> >> > android.content.ActivityNotFoundException: No Activity found to handle
> >> > Intent { action=android.intent.action.VIEW data=geo:0,0?q=Av. Príncipe
> >> > de Asturias,}
>
> >> > Thanks!
>
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: When is a good time to require 1.5?

2009-04-30 Thread EboMike

Actually... that's not a bad idea. Have the user install the 1.1-based
app from the market, and if the code detects the 1.5 API, it brings up
a dialog and offers an "Cupcake version preview" for download - that
will bring up a link to the dev's site with the .apk for download.

Downsides, of course, would be...

1. The user needs to allow installing third-party APKs in the
settings.
2. This will interfere with the phone's app installation detection, so
the Cupcake version will confuse programs (including the Market app
itself) that try to determine whether or not an upgrade is available.



On Apr 30, 9:43 pm, JP  wrote:
> Looks like there is no obvious good answer. Comes back to personal
> taste.
> Personally I prefer to offer only one edition/version of my app to
> avoid confusing the user. Keep in mind as devels we're into this, but
> the regular user may not be aware of all the complications. Having a
> phone floating around in the pocket should remain a fairly low
> maintenance affair IMO.
>
> Previewing 1.5 on your own server may not be such a bad idea after
> all. For the enthusiast. Set up a web site, include a manual and some
> more information such as a compatibility matrix. Of course you need to
> steer your users over to the site somehow. Happens I've set that all
> up (except for an 1.5-based release, has been "broken" by 1.5) and
> included a "More" button in the "About" dialog.
>
> On Apr 30, 8:54 pm, EboMike  wrote:
>
> > Yeah, I did that, and I had to make minor changes to a TableLayout so
> > it looked right in an 1.5 environment.
>
> > The real thing is widget support - I really want to add that soon. I
> > don't want to wait too long, at the same time I don't want to make the
> > app inaccessible to users with 1.1. I considered hosting the 1.5
> > version on my own server, but that's plain whack. And adding two
> > versions of the app sounds a bit backwards too... then again, some
> > people add two versions of their apps.
>
> > On Apr 30, 8:34 pm, JP  wrote:
>
> > > My approach exactly. Plus I recommend you install your 1.1-based apk
> > > on the 1.5 emulator (or device) to see how it performs.
> > > Based on test results, I am preparing to release an 1.1-based update
> > > that disables access to a couple of features that I found crashing or
> > > hanging when running on 1.5 (BTW regardless whether the apk is a 1.1
> > > or 1.5 build).
>
> > > On Apr 30, 8:00 pm, EboMike  wrote:
>
> > > > I'd like to add widget support to my app, but I suppose that it'll
> > > > take quite a while until 1.5 is globally rolled out.
>
> > > > I assume that widget support means that I need to compile against 1.5
> > > > and set up the minSdkVersion to 3, so I'll effectively lock out
> > > > anybody with 1.1. Other than adding a second version of the same app
> > > > for 1.5, what's the best way to approach this? Wait a couple of months
> > > > until 1.5 is globally spread? (Assuming that all carriers even decide
> > > > to roll it out in the first place.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] work around of Animator class

2009-04-30 Thread Honest

I am porting one open gl based applet application to android. In that
there is use of Animator class of JOGL. which class i can use instead
of it in open gl in android.


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



[android-developers] Re: When is a good time to require 1.5?

2009-04-30 Thread JP


Looks like there is no obvious good answer. Comes back to personal
taste.
Personally I prefer to offer only one edition/version of my app to
avoid confusing the user. Keep in mind as devels we're into this, but
the regular user may not be aware of all the complications. Having a
phone floating around in the pocket should remain a fairly low
maintenance affair IMO.

Previewing 1.5 on your own server may not be such a bad idea after
all. For the enthusiast. Set up a web site, include a manual and some
more information such as a compatibility matrix. Of course you need to
steer your users over to the site somehow. Happens I've set that all
up (except for an 1.5-based release, has been "broken" by 1.5) and
included a "More" button in the "About" dialog.


On Apr 30, 8:54 pm, EboMike  wrote:
> Yeah, I did that, and I had to make minor changes to a TableLayout so
> it looked right in an 1.5 environment.
>
> The real thing is widget support - I really want to add that soon. I
> don't want to wait too long, at the same time I don't want to make the
> app inaccessible to users with 1.1. I considered hosting the 1.5
> version on my own server, but that's plain whack. And adding two
> versions of the app sounds a bit backwards too... then again, some
> people add two versions of their apps.
>
> On Apr 30, 8:34 pm, JP  wrote:
>
> > My approach exactly. Plus I recommend you install your 1.1-based apk
> > on the 1.5 emulator (or device) to see how it performs.
> > Based on test results, I am preparing to release an 1.1-based update
> > that disables access to a couple of features that I found crashing or
> > hanging when running on 1.5 (BTW regardless whether the apk is a 1.1
> > or 1.5 build).
>
> > On Apr 30, 8:00 pm, EboMike  wrote:
>
> > > I'd like to add widget support to my app, but I suppose that it'll
> > > take quite a while until 1.5 is globally rolled out.
>
> > > I assume that widget support means that I need to compile against 1.5
> > > and set up the minSdkVersion to 3, so I'll effectively lock out
> > > anybody with 1.1. Other than adding a second version of the same app
> > > for 1.5, what's the best way to approach this? Wait a couple of months
> > > until 1.5 is globally spread? (Assuming that all carriers even decide
> > > to roll it out in the first place.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] surprise, No process called surfaceflinger listed by ps

2009-04-30 Thread wen yi

After I did a 'ps' I am surprised not to be able to see
"surfaceflinger" process listed even though I saw the binary /system/
bin/surfaceflinger.

I didn't find any scripts that starts surfaceflinger and I couldn't
figure it out from the code. Can someone explain how native services
such as surfaceflinger get started?

Thanks.

- Wen



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



[android-developers] AudioFlinger - many "write blocked for" log WARN messages

2009-04-30 Thread Mark Carter

I'm using the MediaPlayer to play audio (mp3) files. I don't think I'm
doing anything out of the ordinary, but, during playback, I get many
(several per second) log messages like these:

05-01 09:46:20.685: WARN/AudioFlinger(554): write blocked for 47 msecs
05-01 09:46:20.785: WARN/AudioFlinger(554): write blocked for 47 msecs
05-01 09:46:20.895: WARN/AudioFlinger(554): write blocked for 49 msecs
05-01 09:46:20.985: WARN/AudioFlinger(554): write blocked for 47 msecs

I've searched all over the place for this - other people seem to
experience the same thing but I can find any sort of explanation as to
what it means.

Am I doing something wrong?

Also, how do I define a LogCat filter (in eclipse) to *remove*, say,
all AudioFlinger messages? I can't seem to find the "not" syntax.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView get position within page

2009-04-30 Thread sagar.indianic

Wat type of position are you talking about??

If u want to get position of the text within the webview then you can
use javascript for that.
Give unique id inside the tag of which you want to get the position.
Then use javascript function document.getElementById
('yourId').offsetTop();


On Apr 30, 12:34 pm, rukiman  wrote:
> After I have loaded WebView with a html page, is it possible to get
> the position of the region that is currently being displayed within
> the WebView widget?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Installing App From Eclipse to AVD

2009-04-30 Thread Nmix

Just started testing my apps against the 1.5 SDK and got these console
messages when I re-install an app to the AVD.  Eclipse project is set
to 1.1 and the AVD is 1.5:

[2009-04-30 22:22:49 - ...] Starting activity com... on device
[2009-04-30 22:22:57 - ...] ActivityManager: DDM dispatch reg wait
timeout
[2009-04-30 22:22:57 - ...] ActivityManager: Can't dispatch DDM chunk
52454151: no handler defined
[2009-04-30 22:22:57 - ...] ActivityManager: Can't dispatch DDM chunk
48454c4f: no handler defined
[2009-04-30 22:23:04 - ...] ActivityManager: Starting: Intent { ...

Apart from these console messages and an extra 30 seconds of delay
(for the timeout to occur?), the app does install and run just fine.
If there's something I'm doing wrong in the build I would like to know
so that I avoid problems down the line.  From the 'DDM' it may be
related to the debugger, however I am not attempting to use it.

I've also noticed that the emulator in this SDK is very sluggish in
comparison to previous versions when it comes to switching tasks etc.

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: SQLite Pre-populated Database

2009-04-30 Thread hivebrain

Mark,

Do you know if after the resource has been moved to the SD card,
whether it can be deleted from the package to free up main memory for
the user?

I am enjoying your book, by the way.

--Mike

On Apr 11, 6:40 am, Mark Murphy  wrote:
> fg1921 wrote:
> > 1. Included the db as an asset
> > 2. Copied it to the SDCard at startup
> > 3. The above fails with a "uncompress_data_max" when it's being pulled
> > out of the Assets directory
>
> How are you trying to do this?
>
> I just ran a test with a 6MB MP4 file and it worked just fine. I renamed
> it to test.db to see if it was perhaps not compressing the MP4 file
> based on file extension, and that too worked just fine. It works on both
> the emulator and a G1. It takes a few seconds on the G1, writing to the
> stockSDcard that shipped with it (not sure what class ofSDcard that
> is, so someSDcards may be faster or slower).
>
> The code I used is here:
>
> http://pastie.org/443676
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: When is a good time to require 1.5?

2009-04-30 Thread EboMike

Yeah, I did that, and I had to make minor changes to a TableLayout so
it looked right in an 1.5 environment.

The real thing is widget support - I really want to add that soon. I
don't want to wait too long, at the same time I don't want to make the
app inaccessible to users with 1.1. I considered hosting the 1.5
version on my own server, but that's plain whack. And adding two
versions of the app sounds a bit backwards too... then again, some
people add two versions of their apps.



On Apr 30, 8:34 pm, JP  wrote:
> My approach exactly. Plus I recommend you install your 1.1-based apk
> on the 1.5 emulator (or device) to see how it performs.
> Based on test results, I am preparing to release an 1.1-based update
> that disables access to a couple of features that I found crashing or
> hanging when running on 1.5 (BTW regardless whether the apk is a 1.1
> or 1.5 build).
>
> On Apr 30, 8:00 pm, EboMike  wrote:
>
> > I'd like to add widget support to my app, but I suppose that it'll
> > take quite a while until 1.5 is globally rolled out.
>
> > I assume that widget support means that I need to compile against 1.5
> > and set up the minSdkVersion to 3, so I'll effectively lock out
> > anybody with 1.1. Other than adding a second version of the same app
> > for 1.5, what's the best way to approach this? Wait a couple of months
> > until 1.5 is globally spread? (Assuming that all carriers even decide
> > to roll it out in the first place.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: When is a good time to require 1.5?

2009-04-30 Thread JP

My approach exactly. Plus I recommend you install your 1.1-based apk
on the 1.5 emulator (or device) to see how it performs.
Based on test results, I am preparing to release an 1.1-based update
that disables access to a couple of features that I found crashing or
hanging when running on 1.5 (BTW regardless whether the apk is a 1.1
or 1.5 build).


On Apr 30, 8:00 pm, EboMike  wrote:
> I'd like to add widget support to my app, but I suppose that it'll
> take quite a while until 1.5 is globally rolled out.
>
> I assume that widget support means that I need to compile against 1.5
> and set up the minSdkVersion to 3, so I'll effectively lock out
> anybody with 1.1. Other than adding a second version of the same app
> for 1.5, what's the best way to approach this? Wait a couple of months
> until 1.5 is globally spread? (Assuming that all carriers even decide
> to roll it out in the first place.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Video play error

2009-04-30 Thread Nithin Varamballi

Thanks for reply...

Can know why it is no available, May this feature is not
available in android...?

Thank You
Nithin n v

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



[android-developers] When is a good time to require 1.5?

2009-04-30 Thread EboMike

I'd like to add widget support to my app, but I suppose that it'll
take quite a while until 1.5 is globally rolled out.

I assume that widget support means that I need to compile against 1.5
and set up the minSdkVersion to 3, so I'll effectively lock out
anybody with 1.1. Other than adding a second version of the same app
for 1.5, what's the best way to approach this? Wait a couple of months
until 1.5 is globally spread? (Assuming that all carriers even decide
to roll it out in the first place.)

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



[android-developers] Re: New to Android

2009-04-30 Thread JP

It's been a while since I've seen "majorminor-49er".
Here's the usual cause:
http://forums.sun.com/thread.jspa?threadID=736596
You see this is likely a problem with your Java installation. I
suspect you have an old Java version, probably 1.4.2. The bytecode of
the android tool has been compiled against a newer version. You need
at least JDK 5, according to the documentation here:
http://developer.android.com/sdk/1.5_r1/requirements.html
Check your Java version with the following command:
$ java -version
Update as necessary. BTW, there's an Android Beginner group...

On Apr 30, 5:32 am, sreemon  wrote:
> Hello Friends,
>
> I am very new to Android.
>
> I am having a problem in creating avd. Please see the execption
> occured
>
> D:\Stabilix\Personal\Android\android-sdk-windows-1.5_r1\tools>android
> Exception in thread "main" java.lang.UnsupportedClassVersionError: com/
> android/sdkmanager/Main (Unsupported major.minor version 49.0)
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>
> Urgent help needed. Thanks in advance..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Searching maps

2009-04-30 Thread JP


To the best of my knowledge... has been discussed before:
http://groups.google.com/group/android-developers/browse_thread/thread/bc1e6e1524dcca5a/0c4d20a769e666e5?lnk=gst&q=googlenav#0c4d20a769e666e5



On Apr 29, 11:23 am, "c.a.jeffer...@googlemail.com"
 wrote:
> Hi,
> I am writing an application (on v1.0) that needs to search Google
> maps for the nearest facility to my current location e.g. what are the
> nearest bike shops. Can anyone give advice on how to do this? I looked
> at googlenav.Search but this has been deprecated for some reason. I
> did look at the Qype APIs but gave up early as these were difficult to
> use. I am really stuck and would appreciate any advise here.
>
> Thanks,
>
> Clive
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: "R cannot be resolved" after updating to 1.5 SDK Pre, and trying to compile for 1.1

2009-04-30 Thread John B. Hansen

Yes, I selected Android 1.1 platform API Level 2.
I also made sure src and gen folders were included in the Build path.
I also included res folder in Build path but it had no effect.

FYI: I am able to build a new Hello World program that just works.
But,
I can't figure out why that one works and my migrated projects don't
work?

jh

On Apr 30, 5:24 pm, Xavier Ducrohet  wrote:
> Did you setup the Build target for your older project?
>
> Xav
>
> On Thu, Apr 30, 2009 at 2:54 PM, John B. Hansen  wrote:
>
>
>
>
>
> > I have the same problem i.e. after converting to Android 1.5 SDK,
> > my project files won't compile due to dozens of R.* files "cannot be
> > resolved".
>
> > I've tried:
> >   1. Adding the sdk 'tools' to my path
> >   2. Reinstalling ADT
> >   3. Cleaning my project
>
> > Nothing is working. Anyone have any other suggestions. I'm stopped.
>
> > jh
>
> > On Apr 28, 10:31 am, Raphael  wrote:
> >> The first time you convert an old project to the 0.9 ADT with1.5SDK,
> >> you should try to use Project > Clean if you see any error on missing
> >> or duplicate classes.
>
> >> R/
>
> >> On Mon, Apr 27, 2009 at 9:44 PM, hc  wrote:
>
> >> > Do you have to uninstall before you reinstall it? I just updated my
> >> > ADT to 0.9 (the non-pre ADT), and update to1.5_R1 SDK, but I still
> >> > get the same error if I try to compile for Android1.1
>
> >> > On Apr 28, 9:29 am, Jay lee  wrote:
> >> >> I saw the same error.
> >> >> so I reinstalled ADT and recheck build target "Android1.1"
> >> >> then I can seeR.java which is generated at "gen" folder.
>
> >> >> try this.
>
> >> >> On Apr 27, 10:46 pm, hc  wrote:
>
> >> >> > Hi,
>
> >> >> > I just tried that. But it does not work. After removing the file, I
> >> >> > still get the same error when I try to compile for 1.1 SDK.
>
> >> >> > Worse, when I try to compile for1.5SDK after that, I get the
> >> >> > following error but application compiled successfully
> >> >> > Conversion to Dalvik format failed with error 1
>
> >> >> > On Apr 27, 9:05 pm, Satya Komatineni 
> >> >> > wrote:
>
> >> >> > > considering thatR.javais a generated file, try deleting it and see
> >> >> > > if the environment rebuilds according to your preference.
>
> >> >> > > On Mon, Apr 27, 2009 at 8:57 AM, hc  wrote:
>
> >> >> > > > I updated to1.5SDK pre, together with the ADT. I followed the
> >> >> > > > instruction to select Android1.5as target by right clicking on the
> >> >> > > > project, Preferences>Android. In this window there are 3 options,
> >> >> > > > Android 1.1
> >> >> > > > Android1.5
> >> >> > > > Google APIs
>
> >> >> > > > I selected Android1.5and Apply, clicked OK. Application compiled
> >> >> > > > nicely.
>
> >> >> > > > If I go back to the same Preferences and select Android 1.1, 
> >> >> > > > Apply, I
> >> >> > > > can no longer compile my application successfully.
> >> >> > > > I get hundreds of the same error
> >> >> > > >Rcannotberesolved
>
> >> >> > > > Then I try to open this project in another computer that I have 
> >> >> > > > not
> >> >> > > > updated the SDK yet. I get the same error. Can anyone help to 
> >> >> > > > solve
> >> >> > > > this? I'm trapped until the new SDK is out.
>
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Theme and Styles stores

2009-04-30 Thread Raja Nagendra Kumar

Hi,

Any Theme and Style store available for preview and purchase.

What is the good source to develop Themes and styles for andorid.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.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: Video play error

2009-04-30 Thread Dave Sparks

Android does not support playing two video streams at the same time.

On Apr 30, 1:48 am, N V  wrote:
> Hi to all
>
>      I am playing 2 videos(.mpg4) at time... Some times its works
> fine, But some times give
> error like "Cannot Play the Video" Can any One tell me Why its
> Happens...?
>
> Thank You
> Nithin N V
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SurfaceView on G1

2009-04-30 Thread jj

I dont see any log (seems that it hangs just inside setContentView,
which is at the very beginning of the app. I know this because I am
able to debug it, and put a breackpoint in this line)
anyway, I can get this list of threads... I dont know if that's useful
somehow...
babel [Android Application]
DalvikVM[localhost:8600]
Thread [<3> main] (Suspended)
DexFile.defineClass(String, ClassLoader, int, 
ProtectionDomain)
line: not available [native method] [local variables unavailable]
DexFile.loadClass(String, ClassLoader) line: 92
PathClassLoader.findClass(String) line: 175
PathClassLoader(ClassLoader).loadClass(String, boolean) 
line: 453
PathClassLoader(ClassLoader).loadClass(String) line: 421
PhoneLayoutInflater(LayoutInflater).createView(String, 
String,
AttributeSet) line: 465

PhoneLayoutInflater(LayoutInflater).createViewFromTag(String,
AttributeSet) line: 564

PhoneLayoutInflater(LayoutInflater).rInflate(XmlPullParser, View,
AttributeSet) line: 617

PhoneLayoutInflater(LayoutInflater).inflate(XmlPullParser,
ViewGroup, boolean) line: 407
PhoneLayoutInflater(LayoutInflater).inflate(int, 
ViewGroup,
boolean) line: 320
PhoneLayoutInflater(LayoutInflater).inflate(int, 
ViewGroup) line:
276
PhoneWindow.setContentView(int) line: 231
babel(Activity).setContentView(int) line: 1569
babel.onCreate(Bundle) line: 467
Instrumentation.callActivityOnCreate(Activity, Bundle) 
line: 1122

ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord)
line: 2104

ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord)
line: 2157
ActivityThread.access$1800(ActivityThread, 
ActivityThread
$ActivityRecord) line: 112
ActivityThread$H.handleMessage(Message) line: 1581
ActivityThread$H(Handler).dispatchMessage(Message) 
line: 88
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3739
Method.invokeNative(Object, Object[], Class, Class[], 
Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 515
ZygoteInit$MethodAndArgsCaller.run() line: 739
ZygoteInit.main(String[]) line: 497
NativeStart.main(String[]) line: not available [native 
method]
Thread [<13> Binder Thread #2] (Running)
Thread [<11> Binder Thread #1] (Running)


On May 1, 1:40 am, Dave Sparks  wrote:
> Do you have a stack trace from the log?
>
> On Apr 30, 4:51 pm, petunio  wrote:
>
> > Hi
>
> > I am finally testing my application on a G1 and even though it works
> > fine on the emulator, it crashes on the G1
>
> > it crashes when it does:
> > setContentView(R.layout.mylayout);
>
> > the xml is fairly simple:
> >                  >                         android:id="@+id/testid"
> >                         android:layout_width="fill_parent"
> >                         android:layout_height="fill_parent">
> >                 
>
> > and the view is defined like this:
>
> > public class myView extends SurfaceView implements
> > SurfaceHolder.Callback
> > {
>
> > }
>
> > Has anybody found a similar problem?
>
> > 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: widget views

2009-04-30 Thread shleeforandroid

Hi Jeff

I'm happy your comment of possible to implement animation to use
Dialog or Translucent theme.

please let me knos some detail ways?

Thanks
shlee

On 4월30일, 오전2시31분, Jeff Sharkey  wrote:
> > ive read the docu for home screen widgets but i couldn't find a
> > possiblity to set the widgets width to fill_parent, instead i must
> > use
> > dip. Thewidgetshould fill the screen width regardless of the screen
> > orientation.
> > Somebody have a idea?
>
> In the current desktop you can request a width of 4-cells, which would
> be equivalent on the current home screen.
>
> > It is posssible to set a animation to a home screenwidget?
> > Something like,if special button of thewidget is clicked, thewidget
> > shows a view that breaks out of the widgets borders which are defined
> > in the home screenwidgetmeta-data file?
>
> You could launch an Activity with a Dialog or Translucent theme, and
> perform animations from there.
>
> --
> Jeff Sharkey
> jshar...@google.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: SurfaceView on G1

2009-04-30 Thread Dave Sparks

Do you have a stack trace from the log?

On Apr 30, 4:51 pm, petunio  wrote:
> Hi
>
> I am finally testing my application on a G1 and even though it works
> fine on the emulator, it crashes on the G1
>
> it crashes when it does:
> setContentView(R.layout.mylayout);
>
> the xml is fairly simple:
>                                          android:id="@+id/testid"
>                         android:layout_width="fill_parent"
>                         android:layout_height="fill_parent">
>                 
>
> and the view is defined like this:
>
> public class myView extends SurfaceView implements
> SurfaceHolder.Callback
> {
>
> }
>
> Has anybody found a similar problem?
>
> 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: Maps Intent in CupCake

2009-04-30 Thread Xavier Ducrohet

That is correct.

A few more details for everyone.

Maps is not bundled on the default Android 1.5 System Image bundled
with the SDK.
Because your app doesn't actually use the Maps API (ie doesn't have
 with maps), it will install on devices that do not have
Google Maps.

Therefore:
- You should use the System Image provided with the "Google APIs" to
do your testing where you want Maps to be present. In the 1.5 SDK, the
target id for this add-on is 3. This may change once you add/remove
platforms/add-on, so it's best to always do a "android list target" to
find the proper target id.

- You should also test using the default system image that does not
have Maps. This will simulate devices that may run your applications
but don't have Maps. Basically, you should catch the exception and
properly handle it with user feedback.
If your application absolutely need maps, you could add the
 tag (even though you don't use the Maps API). This will
make sure your app only install on devices with Maps.

Xav

On Thu, Apr 30, 2009 at 3:17 PM, agirardello
 wrote:
>
> Create a new AVD with:
>
> android create avd -n my_androidMAPS -t 3
>
> and then use it while running your app!
>
> ;)
>
>
>
>
>
> On Apr 30, 1:14 pm, agirardello  wrote:
>> I have the same problem!!!
>>
>> Any help?
>>
>> On Apr 29, 6:55 pm, khose  wrote:
>>
>> > Hello!
>>
>> > I'm migrating my app from 1.1 to 1.5. It works right but i get a
>> > problem thowing a new intent which used to open a Geo URI in google
>> > Maps. I think that it must be related with the fact of Gmaps not beign
>> > included as part of the core. Is there any way to solve it or change
>> > it if i want to keep the track of 1.1??
>>
>> > This is the code:
>>
>> >                                 Intent mapsIntent = new 
>> > Intent(Intent.ACTION_VIEW);
>> >                                 mapsIntent.setData(Uri.parse("geo:0,0?q=" 
>> > + address + "&z=19"));
>> >                                 startActivity(mapsIntent);
>>
>> > This is the throwed exception...
>>
>> > android.content.ActivityNotFoundException: No Activity found to handle
>> > Intent { action=android.intent.action.VIEW data=geo:0,0?q=Av. Príncipe
>> > de Asturias,}
>>
>> > Thanks!
>>
>>
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: "R cannot be resolved" after updating to 1.5 SDK Pre, and trying to compile for 1.1

2009-04-30 Thread Xavier Ducrohet

Did you setup the Build target for your older project?

Xav

On Thu, Apr 30, 2009 at 2:54 PM, John B. Hansen  wrote:
>
> I have the same problem i.e. after converting to Android 1.5 SDK,
> my project files won't compile due to dozens of R.* files "cannot be
> resolved".
>
> I've tried:
>   1. Adding the sdk 'tools' to my path
>   2. Reinstalling ADT
>   3. Cleaning my project
>
> Nothing is working. Anyone have any other suggestions. I'm stopped.
>
> jh
>
> On Apr 28, 10:31 am, Raphael  wrote:
>> The first time you convert an old project to the 0.9 ADT with1.5SDK,
>> you should try to use Project > Clean if you see any error on missing
>> or duplicate classes.
>>
>> R/
>>
>> On Mon, Apr 27, 2009 at 9:44 PM, hc  wrote:
>>
>> > Do you have to uninstall before you reinstall it? I just updated my
>> > ADT to 0.9 (the non-pre ADT), and update to1.5_R1 SDK, but I still
>> > get the same error if I try to compile for Android1.1
>>
>> > On Apr 28, 9:29 am, Jay lee  wrote:
>> >> I saw the same error.
>> >> so I reinstalled ADT and recheck build target "Android1.1"
>> >> then I can seeR.java which is generated at "gen" folder.
>>
>> >> try this.
>>
>> >> On Apr 27, 10:46 pm, hc  wrote:
>>
>> >> > Hi,
>>
>> >> > I just tried that. But it does not work. After removing the file, I
>> >> > still get the same error when I try to compile for 1.1 SDK.
>>
>> >> > Worse, when I try to compile for1.5SDK after that, I get the
>> >> > following error but application compiled successfully
>> >> > Conversion to Dalvik format failed with error 1
>>
>> >> > On Apr 27, 9:05 pm, Satya Komatineni 
>> >> > wrote:
>>
>> >> > > considering thatR.javais a generated file, try deleting it and see
>> >> > > if the environment rebuilds according to your preference.
>>
>> >> > > On Mon, Apr 27, 2009 at 8:57 AM, hc  wrote:
>>
>> >> > > > I updated to1.5SDK pre, together with the ADT. I followed the
>> >> > > > instruction to select Android1.5as target by right clicking on the
>> >> > > > project, Preferences>Android. In this window there are 3 options,
>> >> > > > Android 1.1
>> >> > > > Android1.5
>> >> > > > Google APIs
>>
>> >> > > > I selected Android1.5and Apply, clicked OK. Application compiled
>> >> > > > nicely.
>>
>> >> > > > If I go back to the same Preferences and select Android 1.1, Apply, 
>> >> > > > I
>> >> > > > can no longer compile my application successfully.
>> >> > > > I get hundreds of the same error
>> >> > > >Rcannotberesolved
>>
>> >> > > > Then I try to open this project in another computer that I have not
>> >> > > > updated the SDK yet. I get the same error. Can anyone help to solve
>> >> > > > this? I'm trapped until the new SDK is out.
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

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

2009-04-30 Thread Josh Dobbs
I don't really think it's an issue at this point. Especially since you can
get a refund up to 24 hours after purchase.

On Thu, Apr 30, 2009 at 4:18 PM, Rob Franz  wrote:

> Nothing, but when he's charging $5 for an app with info that you could
> google easily, you really kind of see what he's after.
> If you look at the feedback for his other apps, there's a recurring theme -
> he's almost a scam artist...
>
> Just saying.
>
>
> On Thu, Apr 30, 2009 at 6:49 PM, Marco Nelissen wrote:
>
>> On Thu, Apr 30, 2009 at 3:42 PM, Rob Franz  wrote:
>>
>>> I was going to let this thread die but I saw this and had to add on to it
>>> because I think it reinforces the need for better filtering options in the
>>> Market.
>>>
>>> I posted this originally because I came across one particular developer
>>> (I won't mention the name, but you can find him easily) who's released a
>>> number of applications charging $4.99 for most of them, which are basically
>>> slideshows with some text and audio.  I believe about 98% get 1 star.
>>> While I've not downloaded any of them, I do get a laugh out of some of
>>> the comments that people leave - apparently they are god awful.
>>>
>>> So today he released an app called "Swine Flu" - of which the goal was to
>>> provide "information that how to stay safe against Swine Flu including
>>> symptoms, causes, protection, and treatment."
>>>
>>> Seriously?  That's a bit tasteless.  I'm not for banning developers but
>>> we really need something to filter crap applications like this...
>>>
>>
>> I haven't tried this app or any other of his apps, but what's wrong with
>> providing information about swine flu?
>>
>>
>>
>>
>
> >
>

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



[android-developers] SurfaceView on G1

2009-04-30 Thread petunio

Hi

I am finally testing my application on a G1 and even though it works
fine on the emulator, it crashes on the G1

it crashes when it does:
setContentView(R.layout.mylayout);

the xml is fairly simple:



and the view is defined like this:

public class myView extends SurfaceView implements
SurfaceHolder.Callback
{
}


Has anybody found a similar problem?

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: Regarding AbsoluteLayout being deprecated in SDK 1.5

2009-04-30 Thread Nik Bhattacharya

That is a much better answer.  I can certainly live with that.

Nik

On Apr 30, 6:32 pm, Romain Guy  wrote:
> Then write a custom Animation class, which should not be different
> than what you are doing already.
>
> On Thu, Apr 30, 2009 at 4:31 PM, Nik Bhattacharya
>
>
>
>  wrote:
>
> > So if I have a fine grained animation that moves along a complex
> > curve, I will have to have potentially hundreds of translate
> > animations in my anim file?  Just to implement the S movement, along a
> > HVGA screen, I could see a lot of linear translate animations in the
> > animation set.  How long will the xml parser take to even read the
> > file leave alone animating.  Not sure I entirely agree with this
> > method for complex animations.
>
> > Nik
>
> > On Apr 30, 5:48 pm, Romain Guy  wrote:
> >> Just use an AnimationSet containing several TranslateAnimation.
>
> >> On Thu, Apr 30, 2009 at 3:37 PM, Nik Bhattacharya
>
> >>  wrote:
>
> >> > What if I want to animate a view (lets say a button) in an "S" shape
> >> > from the top right of the screen to the bottom left of the screen?
> >> > Use a FrameLayout and then have a whole bunch of translate animations
> >> > that I have to hand-code?
>
> >> > With a handler and an AbsoluteLayout, I can do this easily wherein at
> >> > each callback I change the x/y position of the view and redraw.  Might
> >> > not be the most efficient way to draw, but atleast I can do it.
>
> >> > Please let me know how I can achieve this without an AbsoluteLayout.
>
> >> > Thanks,
> >> > Nik
>
> >> > On Apr 29, 3:21 pm, Romain Guy  wrote:
> >> >> Everything you can do with AbsoluteLayout can be done with FrameLayout
> >> >> and RelativeLayout. AbsoluteLayout was deprecated because its use
> >> >> encourage applications that will NOT work with devices with different
> >> >> screen dimensions/resolutions. As such we decided to deprecate
> >> >> AbsoluteLayout to encourage developers to do the right thing and use
> >> >> layouts that will work much better with other screen
> >> >> dimensions/resolutions.
>
> >> >> On Wed, Apr 29, 2009 at 1:19 PM, nEx.Software 
> >> >>  wrote:
>
> >> >> > I'd like to know the reasoning behind the deprecation of this layout.
> >> >> > I suppose you could maybe pull the code from 1.1 and keep using it, I
> >> >> > don't see the FrameLayout or RelativeLayout being viable alternatives
> >> >> > despite being recommended in the docs.
>
> >> >> > On Apr 29, 1:12 pm, karthikr  wrote:
> >> >> >> Hi,
>
> >> >> >> I have just realised that AbsoluteLayout has been deprecated in the
> >> >> >> latest sdk, however I have designed my apps based on AbsoluteLayout
> >> >> >> and it is very difficult for me to remove them and change it to a
> >> >> >> different layout. Can someone help me as to how I should proceed?
> >> >> >> Absolute layout was really helpful in positioning the elements to be
> >> >> >> accurate. One could always had different layout definitions for
> >> >> >> different screen sizes, and based on the current width and height the
> >> >> >> required layout can be set. Removing of AbsoluteLayout  is creating a
> >> >> >> lot of frustration to me as I have already designed most of the
> >> >> >> things
> >> >> >> using it. Somebody please help me out.
>
> >> >> >> Regards,
> >> >> >> R.Karthik
>
> >> >> --
> >> >> 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
>
> >> --
> >> 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
>
> --
> 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: Regarding AbsoluteLayout being deprecated in SDK 1.5

2009-04-30 Thread Romain Guy

Then write a custom Animation class, which should not be different
than what you are doing already.

On Thu, Apr 30, 2009 at 4:31 PM, Nik Bhattacharya
 wrote:
>
> So if I have a fine grained animation that moves along a complex
> curve, I will have to have potentially hundreds of translate
> animations in my anim file?  Just to implement the S movement, along a
> HVGA screen, I could see a lot of linear translate animations in the
> animation set.  How long will the xml parser take to even read the
> file leave alone animating.  Not sure I entirely agree with this
> method for complex animations.
>
> Nik
>
> On Apr 30, 5:48 pm, Romain Guy  wrote:
>> Just use an AnimationSet containing several TranslateAnimation.
>>
>> On Thu, Apr 30, 2009 at 3:37 PM, Nik Bhattacharya
>>
>>
>>
>>  wrote:
>>
>> > What if I want to animate a view (lets say a button) in an "S" shape
>> > from the top right of the screen to the bottom left of the screen?
>> > Use a FrameLayout and then have a whole bunch of translate animations
>> > that I have to hand-code?
>>
>> > With a handler and an AbsoluteLayout, I can do this easily wherein at
>> > each callback I change the x/y position of the view and redraw.  Might
>> > not be the most efficient way to draw, but atleast I can do it.
>>
>> > Please let me know how I can achieve this without an AbsoluteLayout.
>>
>> > Thanks,
>> > Nik
>>
>> > On Apr 29, 3:21 pm, Romain Guy  wrote:
>> >> Everything you can do with AbsoluteLayout can be done with FrameLayout
>> >> and RelativeLayout. AbsoluteLayout was deprecated because its use
>> >> encourage applications that will NOT work with devices with different
>> >> screen dimensions/resolutions. As such we decided to deprecate
>> >> AbsoluteLayout to encourage developers to do the right thing and use
>> >> layouts that will work much better with other screen
>> >> dimensions/resolutions.
>>
>> >> On Wed, Apr 29, 2009 at 1:19 PM, nEx.Software  
>> >> wrote:
>>
>> >> > I'd like to know the reasoning behind the deprecation of this layout.
>> >> > I suppose you could maybe pull the code from 1.1 and keep using it, I
>> >> > don't see the FrameLayout or RelativeLayout being viable alternatives
>> >> > despite being recommended in the docs.
>>
>> >> > On Apr 29, 1:12 pm, karthikr  wrote:
>> >> >> Hi,
>>
>> >> >> I have just realised that AbsoluteLayout has been deprecated in the
>> >> >> latest sdk, however I have designed my apps based on AbsoluteLayout
>> >> >> and it is very difficult for me to remove them and change it to a
>> >> >> different layout. Can someone help me as to how I should proceed?
>> >> >> Absolute layout was really helpful in positioning the elements to be
>> >> >> accurate. One could always had different layout definitions for
>> >> >> different screen sizes, and based on the current width and height the
>> >> >> required layout can be set. Removing of AbsoluteLayout  is creating a
>> >> >> lot of frustration to me as I have already designed most of the
>> >> >> things
>> >> >> using it. Somebody please help me out.
>>
>> >> >> Regards,
>> >> >> R.Karthik
>>
>> >> --
>> >> 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
>>
>> --
>> 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
> >
>



-- 
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: Regarding AbsoluteLayout being deprecated in SDK 1.5

2009-04-30 Thread Nik Bhattacharya

So if I have a fine grained animation that moves along a complex
curve, I will have to have potentially hundreds of translate
animations in my anim file?  Just to implement the S movement, along a
HVGA screen, I could see a lot of linear translate animations in the
animation set.  How long will the xml parser take to even read the
file leave alone animating.  Not sure I entirely agree with this
method for complex animations.

Nik

On Apr 30, 5:48 pm, Romain Guy  wrote:
> Just use an AnimationSet containing several TranslateAnimation.
>
> On Thu, Apr 30, 2009 at 3:37 PM, Nik Bhattacharya
>
>
>
>  wrote:
>
> > What if I want to animate a view (lets say a button) in an "S" shape
> > from the top right of the screen to the bottom left of the screen?
> > Use a FrameLayout and then have a whole bunch of translate animations
> > that I have to hand-code?
>
> > With a handler and an AbsoluteLayout, I can do this easily wherein at
> > each callback I change the x/y position of the view and redraw.  Might
> > not be the most efficient way to draw, but atleast I can do it.
>
> > Please let me know how I can achieve this without an AbsoluteLayout.
>
> > Thanks,
> > Nik
>
> > On Apr 29, 3:21 pm, Romain Guy  wrote:
> >> Everything you can do with AbsoluteLayout can be done with FrameLayout
> >> and RelativeLayout. AbsoluteLayout was deprecated because its use
> >> encourage applications that will NOT work with devices with different
> >> screen dimensions/resolutions. As such we decided to deprecate
> >> AbsoluteLayout to encourage developers to do the right thing and use
> >> layouts that will work much better with other screen
> >> dimensions/resolutions.
>
> >> On Wed, Apr 29, 2009 at 1:19 PM, nEx.Software  
> >> wrote:
>
> >> > I'd like to know the reasoning behind the deprecation of this layout.
> >> > I suppose you could maybe pull the code from 1.1 and keep using it, I
> >> > don't see the FrameLayout or RelativeLayout being viable alternatives
> >> > despite being recommended in the docs.
>
> >> > On Apr 29, 1:12 pm, karthikr  wrote:
> >> >> Hi,
>
> >> >> I have just realised that AbsoluteLayout has been deprecated in the
> >> >> latest sdk, however I have designed my apps based on AbsoluteLayout
> >> >> and it is very difficult for me to remove them and change it to a
> >> >> different layout. Can someone help me as to how I should proceed?
> >> >> Absolute layout was really helpful in positioning the elements to be
> >> >> accurate. One could always had different layout definitions for
> >> >> different screen sizes, and based on the current width and height the
> >> >> required layout can be set. Removing of AbsoluteLayout  is creating a
> >> >> lot of frustration to me as I have already designed most of the
> >> >> things
> >> >> using it. Somebody please help me out.
>
> >> >> Regards,
> >> >> R.Karthik
>
> >> --
> >> 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
>
> --
> 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: Quality of paid applications on the Market...

2009-04-30 Thread Rob Franz
Nothing, but when he's charging $5 for an app with info that you could
google easily, you really kind of see what he's after.
If you look at the feedback for his other apps, there's a recurring theme -
he's almost a scam artist...

Just saying.

On Thu, Apr 30, 2009 at 6:49 PM, Marco Nelissen  wrote:

> On Thu, Apr 30, 2009 at 3:42 PM, Rob Franz  wrote:
>
>> I was going to let this thread die but I saw this and had to add on to it
>> because I think it reinforces the need for better filtering options in the
>> Market.
>>
>> I posted this originally because I came across one particular developer (I
>> won't mention the name, but you can find him easily) who's released a number
>> of applications charging $4.99 for most of them, which are basically
>> slideshows with some text and audio.  I believe about 98% get 1 star.
>> While I've not downloaded any of them, I do get a laugh out of some of the
>> comments that people leave - apparently they are god awful.
>>
>> So today he released an app called "Swine Flu" - of which the goal was to
>> provide "information that how to stay safe against Swine Flu including
>> symptoms, causes, protection, and treatment."
>>
>> Seriously?  That's a bit tasteless.  I'm not for banning developers but we
>> really need something to filter crap applications like this...
>>
>
> I haven't tried this app or any other of his apps, but what's wrong with
> providing information about swine flu?
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: out of memory exception on transferring large file to DataOutputStream

2009-04-30 Thread zeeshan

I used httpclient but i got 411 error code!

i am desperately looking for any solution to avoid buffering for my
audio streams.

any help would be appreciated


On Apr 29, 12:39 pm, zeeshan  wrote:
> Hi Mike,
>
> thanks for the reply.
>
> this link is very helpfull but my problem is still there, i need to
> use HttpURLConnection as above and post it without buffering; i dont
> know the length of my stream.
>  i tried conn.setChunkedStreamingMode(1024*4); now it doesn't buffer
> but unable to post.
>
> please advise how can i post without buffering if i dont know my
> stream length. ?
>
> On Apr 28, 4:05 pm, Mike Baroukh  wrote:
>
> > Maybe you could try using httpclient ?
> > haven't tried myself but using "chunked" request, the output will not be
> > buffered.
> > for exemple, 
> > cfhttp://www.java-tips.org/other-api-tips/httpclient/how-to-use-unbuffe...
>
> > Mike
>
> > zeeshan a écrit :
>
> > > Hi Experts,
>
> > > I need to post some files on my server, it works fine for small files
> > > like 1mb but when i try for more than 4 mb ; it force close because of
> > > memory overload.
>
> > > please have a look on my code below:
>
> > >    URL url = new URL(uri);
> > >    URLConnection conn = url.openConnection();
>
> > >                    String boundary = "myboundary";
> > >                    conn.setDoOutput(true);
>
> > >                    conn.setDoInput(true);
> > >                    conn.setUseCaches(false);
> > >                    conn.setRequestProperty("Connection","Keep-Alive");
> > >                    conn.setRequestProperty("user-
> > > agent",this.user_agent);
> > >                    conn.setRequestProperty("accept-
> > > language",this.accept_language);
> > >                    conn.setRequestProperty("user-agent-
> > > id",this.user_agent_id);
> > >                    conn.setRequestProperty("Content-Type","multipart/
> > > form-data; boundary=" + boundary);
> > >                    DataOutputStream wr = new DataOutputStream
> > > (conn.getOutputStream());
> > >                    // Send the normal form data
>
> > >                    Iterator i = parameters.entrySet().iterator();
> > >                    while (i.hasNext()) {
> > >                        Map.Entry param = (Map.Entry)i.next();
> > >                        wr.write( ("--" + boundary + "\r\n").getBytes
> > > () );
> > >                        wr.write( ("Content-Disposition: form-data; name=
> > > \""+(String)param.getKey()+"\"\r\n\r\n").getBytes());
>
> > >                        wr.write( ((String)param.getValue() +
> > > "\r").getBytes());
>
> > >                        wr.flush();
> > >                    }
> > >                   /* wr.write( ("\r--" + boundary + "--\r\n").getBytes
> > > ());
> > >                    wr.flush();*/
> > >                  if(includeFiles){
> > >                    int bytesRead = 0;
>
> > >                    byte [] buffer = new byte[1024*4];
> > >                    InputStream is;
> > >                    Iterator i2 = fileParameters.entrySet().iterator
> > > ();
> > >                    while (i2.hasNext()) {
>
> > >                        Map.Entry param = (Map.Entry)i2.next();
> > >                        String filekey = (String)param.getKey();
> > >                        String fileName = (String)param.getValue();
>
> > >                        wr.write( ("--" + boundary + "\r\n").getBytes
> > > () );
> > >                        wr.write( ("Content-Disposition: form-data; name=
> > > \""+(String)param.getKey()+"\"; ").getBytes());
>
> > >                        if(filekey.endsWith("message[audio]")){
> > >                             if(fileName.contains("/sdcard")){
> > >                                     wr.write( ("filename=\"" + fileName +
> > > "\"\r").getBytes());
> > >                                            File file = new File(fileName);
> > >                                                Uri ab= 
> > > Uri.parse(fileName);
> > >                                                is = new 
> > > FileInputStream(fileName);}
> > >                             else {
> > >                                     wr.write( ("filename=\"" + 
> > > fileName.concat
> > > (".amr") + "\"\r").getBytes());
> > >                                     is = this.cr.openInputStream( 
> > > Uri.parse
> > > (fileName));}
> > >                        wr.write( ("Content-Type: audio \r\n\r
> > > \n").getBytes());
> > >                        wr.flush();
>
> > >                        /*File file = new File(fileName);
> > >                        Uri ab= Uri.parse(fileName);
> > >                        is = new FileInputStream(fileName);*/
> > >                        }
> > >                        else{
> > >                             if(fileName.contains("/sdcard")){
>
> > >                                            File file = new File(fileName);
> > >                                            //long temp=file.length();
> > >                                                Uri ab

[android-developers] Re: paint individual button - please help!

2009-04-30 Thread nEx.Software

I would extend Button, then in the constructor do setBackgroundDrawable
(null); then override onDraw and do your custom drawing there. If you
want to draw once, create and draw a Bitmap and store it in a local
variable for reuse.

On Apr 30, 1:15 pm, guruk  wrote:
> hi,
> i know i can set a drawable as background to a button.
>
> but HOW can i for example:
>
> create/paint a small image in the size of a button and
> set this as the backgroundimage of that button?
>
> please help.
> just some lines how to create an image *for example just two different
> dots*
> and how to set this image as background for a button.
>
> thanks
> christian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Quality of paid applications on the Market...

2009-04-30 Thread Marco Nelissen
On Thu, Apr 30, 2009 at 3:42 PM, Rob Franz  wrote:

> I was going to let this thread die but I saw this and had to add on to it
> because I think it reinforces the need for better filtering options in the
> Market.
>
> I posted this originally because I came across one particular developer (I
> won't mention the name, but you can find him easily) who's released a number
> of applications charging $4.99 for most of them, which are basically
> slideshows with some text and audio.  I believe about 98% get 1 star.
> While I've not downloaded any of them, I do get a laugh out of some of the
> comments that people leave - apparently they are god awful.
>
> So today he released an app called "Swine Flu" - of which the goal was to
> provide "information that how to stay safe against Swine Flu including
> symptoms, causes, protection, and treatment."
>
> Seriously?  That's a bit tasteless.  I'm not for banning developers but we
> really need something to filter crap applications like this...
>

I haven't tried this app or any other of his apps, but what's wrong with
providing information about swine flu?

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

2009-04-30 Thread Romain Guy

You can also use the View's drawing cache API.

On Thu, Apr 30, 2009 at 3:38 PM, dan raaka  wrote:
> Bitmap b = Bitmap.create( );
> Canvas c = new Canvas(b);
> your_view.draw(c);
> use b to in setDrawable else where
>
> there are missing lines, but you should get the idea
> Dan
>
> On Thu, Apr 30, 2009 at 2:23 PM, Moto  wrote:
>>
>> Hi,
>>
>> I need to somehow get a drawable of the contents of a Layout, once I
>> get that "drawable" I want to set it as a background on an empty
>> layout
>>
>> How can I go about doing this?
>>
>> Thanks!
>> Moto!
>>
>
>
> >
>



-- 
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: Regarding AbsoluteLayout being deprecated in SDK 1.5

2009-04-30 Thread Romain Guy

Just use an AnimationSet containing several TranslateAnimation.

On Thu, Apr 30, 2009 at 3:37 PM, Nik Bhattacharya
 wrote:
>
> What if I want to animate a view (lets say a button) in an "S" shape
> from the top right of the screen to the bottom left of the screen?
> Use a FrameLayout and then have a whole bunch of translate animations
> that I have to hand-code?
>
> With a handler and an AbsoluteLayout, I can do this easily wherein at
> each callback I change the x/y position of the view and redraw.  Might
> not be the most efficient way to draw, but atleast I can do it.
>
> Please let me know how I can achieve this without an AbsoluteLayout.
>
> Thanks,
> Nik
>
> On Apr 29, 3:21 pm, Romain Guy  wrote:
>> Everything you can do with AbsoluteLayout can be done with FrameLayout
>> and RelativeLayout. AbsoluteLayout was deprecated because its use
>> encourage applications that will NOT work with devices with different
>> screen dimensions/resolutions. As such we decided to deprecate
>> AbsoluteLayout to encourage developers to do the right thing and use
>> layouts that will work much better with other screen
>> dimensions/resolutions.
>>
>>
>>
>> On Wed, Apr 29, 2009 at 1:19 PM, nEx.Software  
>> wrote:
>>
>> > I'd like to know the reasoning behind the deprecation of this layout.
>> > I suppose you could maybe pull the code from 1.1 and keep using it, I
>> > don't see the FrameLayout or RelativeLayout being viable alternatives
>> > despite being recommended in the docs.
>>
>> > On Apr 29, 1:12 pm, karthikr  wrote:
>> >> Hi,
>>
>> >> I have just realised that AbsoluteLayout has been deprecated in the
>> >> latest sdk, however I have designed my apps based on AbsoluteLayout
>> >> and it is very difficult for me to remove them and change it to a
>> >> different layout. Can someone help me as to how I should proceed?
>> >> Absolute layout was really helpful in positioning the elements to be
>> >> accurate. One could always had different layout definitions for
>> >> different screen sizes, and based on the current width and height the
>> >> required layout can be set. Removing of AbsoluteLayout  is creating a
>> >> lot of frustration to me as I have already designed most of the
>> >> things
>> >> using it. Somebody please help me out.
>>
>> >> Regards,
>> >> R.Karthik
>>
>> --
>> 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
> >
>



-- 
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: "R cannot be resolved" after updating to 1.5 SDK Pre, and trying to compile for 1.1

2009-04-30 Thread John B. Hansen

I also checked and the 'gen' dir is in my java source build path.
Its still not working.

jh

On Apr 30, 2:54 pm, "John B. Hansen"  wrote:
> I have the same problem i.e. after converting to Android 1.5 SDK,
> my project files won't compile due to dozens of R.* files "cannot be
> resolved".
>
> I've tried:
>    1. Adding the sdk 'tools' to my path
>    2. Reinstalling ADT
>    3. Cleaning my project
>
> Nothing is working. Anyone have any other suggestions. I'm stopped.
>
> jh
>
> On Apr 28, 10:31 am, Raphael  wrote:
>
> > The first time you convert an old project to the 0.9 ADT with1.5SDK,
> > you should try to use Project > Clean if you see any error on missing
> > or duplicate classes.
>
> > R/
>
> > On Mon, Apr 27, 2009 at 9:44 PM, hc  wrote:
>
> > > Do you have to uninstall before you reinstall it? I just updated my
> > > ADT to 0.9 (the non-pre ADT), and update to1.5_R1 SDK, but I still
> > > get the same error if I try to compile for Android1.1
>
> > > On Apr 28, 9:29 am, Jay lee  wrote:
> > >> I saw the same error.
> > >> so I reinstalled ADT and recheck build target "Android1.1"
> > >> then I can seeR.java which is generated at "gen" folder.
>
> > >> try this.
>
> > >> On Apr 27, 10:46 pm, hc  wrote:
>
> > >> > Hi,
>
> > >> > I just tried that. But it does not work. After removing the file, I
> > >> > still get the same error when I try to compile for 1.1 SDK.
>
> > >> > Worse, when I try to compile for1.5SDK after that, I get the
> > >> > following error but application compiled successfully
> > >> > Conversion to Dalvik format failed with error 1
>
> > >> > On Apr 27, 9:05 pm, Satya Komatineni 
> > >> > wrote:
>
> > >> > > considering thatR.javais a generated file, try deleting it and see
> > >> > > if the environment rebuilds according to your preference.
>
> > >> > > On Mon, Apr 27, 2009 at 8:57 AM, hc  wrote:
>
> > >> > > > I updated to1.5SDK pre, together with the ADT. I followed the
> > >> > > > instruction to select Android1.5as target by right clicking on the
> > >> > > > project, Preferences>Android. In this window there are 3 options,
> > >> > > > Android 1.1
> > >> > > > Android1.5
> > >> > > > Google APIs
>
> > >> > > > I selected Android1.5and Apply, clicked OK. Application compiled
> > >> > > > nicely.
>
> > >> > > > If I go back to the same Preferences and select Android 1.1, 
> > >> > > > Apply, I
> > >> > > > can no longer compile my application successfully.
> > >> > > > I get hundreds of the same error
> > >> > > >Rcannotberesolved
>
> > >> > > > Then I try to open this project in another computer that I have not
> > >> > > > updated the SDK yet. I get the same error. Can anyone help to solve
> > >> > > > this? I'm trapped until the new SDK is out.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Porting 1.0 to 1.5, map tiles stopped displaying

2009-04-30 Thread Ron

I had to generate a new Google maps key using the new keystore in my
project before the tiles would show.

On Apr 29, 8:44 pm, JP  wrote:
> I started porting a functioning 1.0 app to 1.5 last night. It uses
> MapView and associated classes and everything checks out on 1.0. No
> such luck after taking it to 1.5. I've included maps API, the usual
> touch points (API key, Internet permission) are in place of course
> (coming from 1.0).
> I've created an id=3 AVD (Google Maps app works), and followed the
> porting instructions I found posted, but map tiles do not display
> after porting. Everything else, i.e. the overlaying functionality, is
> there. Nothing terrible shows in LogCat, so I am scratching my head
> what might be missing. Pointers welcome, THX in advance!
> JP
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Quality of paid applications on the Market...

2009-04-30 Thread Josh Dobbs
Let the users filter them. Eventually those apps will fall to the bottom of
the list (if they havent already). Apple has an approval process and they
still have tasteless apps get thru.

On Thu, Apr 30, 2009 at 3:42 PM, Rob Franz  wrote:

> I was going to let this thread die but I saw this and had to add on to it
> because I think it reinforces the need for better filtering options in the
> Market.
>
> I posted this originally because I came across one particular developer (I
> won't mention the name, but you can find him easily) who's released a number
> of applications charging $4.99 for most of them, which are basically
> slideshows with some text and audio.  I believe about 98% get 1 star.
> While I've not downloaded any of them, I do get a laugh out of some of the
> comments that people leave - apparently they are god awful.
>
> So today he released an app called "Swine Flu" - of which the goal was to
> provide "information that how to stay safe against Swine Flu including
> symptoms, causes, protection, and treatment."
>
> Seriously?  That's a bit tasteless.  I'm not for banning developers but we
> really need something to filter crap applications like this...
>
> my $.02
>
>
>
>
>
>
>
> On Thu, Apr 16, 2009 at 4:43 PM, Jason Proctor  wrote:
>
>>
>> google presumably wants to take over the desktop with Android on the
>> coming tsunami of netbooks.
>>
>> IMHO personal computers are now workstations, so we need a new
>> personal computer. the netbook is it - the platform will grow up out
>> of the phone, as opposed to down from the PC.
>>
>>
>>
>> >Ok, you caught me.  I didn't research it at all.  So T-Mobile (in the
>> >states) gets the 30%?  Where is google's motivation in this whole
>> >thing?  It all made sense to me when I thought google was getting all
>> >or part of that 30% but if they get none, where's the money coming
>> >from to justify the Android work they are doing?  If it's internal,
>> >what are their plans for revenue based on the platform?
>> >
>> >On Apr 16, 11:59 am, Sundog  wrote:
>> >>  On Apr 16, 10:46 am, Robert Green  wrote:
>> >>
>> >>  > Can I ask the obvious question, then?  If it doesn't go to google,
>> >>  > then where does it go?
>> >>
>> >>  Can I give the obvious reply? Oooh, me, me, me.
>> >>
>> >>  This information is easily available to anyone who has done even the
>> >>  *slightest* research. It's for carrier fees, as has been made
>> >>  completely clear to anyone paying attention over the last six months.
>> >
>>
>>
>>
>
> >
>

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

2009-04-30 Thread Rob Franz
I was going to let this thread die but I saw this and had to add on to it
because I think it reinforces the need for better filtering options in the
Market.

I posted this originally because I came across one particular developer (I
won't mention the name, but you can find him easily) who's released a number
of applications charging $4.99 for most of them, which are basically
slideshows with some text and audio.  I believe about 98% get 1 star.
While I've not downloaded any of them, I do get a laugh out of some of the
comments that people leave - apparently they are god awful.

So today he released an app called "Swine Flu" - of which the goal was to
provide "information that how to stay safe against Swine Flu including
symptoms, causes, protection, and treatment."

Seriously?  That's a bit tasteless.  I'm not for banning developers but we
really need something to filter crap applications like this...

my $.02







On Thu, Apr 16, 2009 at 4:43 PM, Jason Proctor  wrote:

>
> google presumably wants to take over the desktop with Android on the
> coming tsunami of netbooks.
>
> IMHO personal computers are now workstations, so we need a new
> personal computer. the netbook is it - the platform will grow up out
> of the phone, as opposed to down from the PC.
>
>
>
> >Ok, you caught me.  I didn't research it at all.  So T-Mobile (in the
> >states) gets the 30%?  Where is google's motivation in this whole
> >thing?  It all made sense to me when I thought google was getting all
> >or part of that 30% but if they get none, where's the money coming
> >from to justify the Android work they are doing?  If it's internal,
> >what are their plans for revenue based on the platform?
> >
> >On Apr 16, 11:59 am, Sundog  wrote:
> >>  On Apr 16, 10:46 am, Robert Green  wrote:
> >>
> >>  > Can I ask the obvious question, then?  If it doesn't go to google,
> >>  > then where does it go?
> >>
> >>  Can I give the obvious reply? Oooh, me, me, me.
> >>
> >>  This information is easily available to anyone who has done even the
> >>  *slightest* research. It's for carrier fees, as has been made
> >>  completely clear to anyone paying attention over the last six months.
> >
>
> >
>

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

2009-04-30 Thread dan raaka
Bitmap b = Bitmap.create( );
Canvas c = new Canvas(b);
your_view.draw(c);
use b to in setDrawable else where

there are missing lines, but you should get the idea
Dan

On Thu, Apr 30, 2009 at 2:23 PM, Moto  wrote:

>
> Hi,
>
> I need to somehow get a drawable of the contents of a Layout, once I
> get that "drawable" I want to set it as a background on an empty
> layout
>
> How can I go about doing this?
>
> Thanks!
> Moto!
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Regarding AbsoluteLayout being deprecated in SDK 1.5

2009-04-30 Thread Nik Bhattacharya

What if I want to animate a view (lets say a button) in an "S" shape
from the top right of the screen to the bottom left of the screen?
Use a FrameLayout and then have a whole bunch of translate animations
that I have to hand-code?

With a handler and an AbsoluteLayout, I can do this easily wherein at
each callback I change the x/y position of the view and redraw.  Might
not be the most efficient way to draw, but atleast I can do it.

Please let me know how I can achieve this without an AbsoluteLayout.

Thanks,
Nik

On Apr 29, 3:21 pm, Romain Guy  wrote:
> Everything you can do with AbsoluteLayout can be done with FrameLayout
> and RelativeLayout. AbsoluteLayout was deprecated because its use
> encourage applications that will NOT work with devices with different
> screen dimensions/resolutions. As such we decided to deprecate
> AbsoluteLayout to encourage developers to do the right thing and use
> layouts that will work much better with other screen
> dimensions/resolutions.
>
>
>
> On Wed, Apr 29, 2009 at 1:19 PM, nEx.Software  
> wrote:
>
> > I'd like to know the reasoning behind the deprecation of this layout.
> > I suppose you could maybe pull the code from 1.1 and keep using it, I
> > don't see the FrameLayout or RelativeLayout being viable alternatives
> > despite being recommended in the docs.
>
> > On Apr 29, 1:12 pm, karthikr  wrote:
> >> Hi,
>
> >> I have just realised that AbsoluteLayout has been deprecated in the
> >> latest sdk, however I have designed my apps based on AbsoluteLayout
> >> and it is very difficult for me to remove them and change it to a
> >> different layout. Can someone help me as to how I should proceed?
> >> Absolute layout was really helpful in positioning the elements to be
> >> accurate. One could always had different layout definitions for
> >> different screen sizes, and based on the current width and height the
> >> required layout can be set. Removing of AbsoluteLayout  is creating a
> >> lot of frustration to me as I have already designed most of the
> >> things
> >> using it. Somebody please help me out.
>
> >> Regards,
> >> R.Karthik
>
> --
> 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: Eclipse + cupcake + other android projects in build path = VerifyError

2009-04-30 Thread Guillaume Perrot
Android lib projects would be a good feature.
But why not having a dependency system between APKs like debian packages ?

2009/5/1 Xavier Ducrohet 

>
> Hello,
>
> Editing the .classpath is a good solution. Let me explain why.
>
> ADT supports referenced projects so that you can have library projects
> reused by your main Application project.
>
> In the past, the build system provided by ADT just looked at the list
> of referenced projects, and added their output (bin/*/*.class) to the
> classes.dex of the application project.
>
> The main issue here is that those referenced projects should never
> have been Android project themselves.
>
> The reason is that those Android projects could have resources, which
> in turn creates an R.java file, which in turn is potentially used by
> the library project classes. Even if the resources from the library
> projects are copied into the main application project, there's no
> guarantee that the IDs in R.java will be similar between the projects.
> Therefore, at runtime, the classes from the library would access the
> wrong resources.
>
> We noticed this when we implemented the JUnit support. Instrumentation
> projects (look under samples/ApiDemos/test/) must reference the
> project they're testing to be able to compile, but they shouldn't
> include the code of the application they test.
> To fix this, we've restricted support of referenced projects to
> projects that are not Android projects (ie, do not have the Android
> Nature).
>
> Now, we do realize that you may still want to be able to share code
> that reference or extend Android classes, and this is not convenient.
> The solution to edit the .classpath to remove the nature and builder
> is one that will work, as long as you ensure that you are not using a
> previously generated R.java.
> For code that doesn't reference Android code, just make a standard Java
> project.
>
> In the future we will probably add a new type of Android project
> (maybe Android Library Project), that will allow you to compile
> against the Android framework but doesn't support Android resources,
> and doesn't generate R.java classes.
>
> Xav
>
> On Thu, Apr 30, 2009 at 7:26 AM, JMoger  wrote:
> >
> > I've got a working solution to this similar to your hint about J2SE
> > projects.  Assuming your lib project is an android project, modify
> > the .project file to remove all Android builders and Android natures.
> > I removed the "resourcemanagerbuilder", "precompilerbuilder",
> > "apkbuilder", and "androidnature".  My lib project does not have any
> > resources so I don't know what happens in that situation; its just my
> > android code common to multiple projects.
> >
> > The .classpath file remains unchanged:
> >
> > 
> >
> >
> > > path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
> >
> > 
> >
> > This allows the project to compile against the Android library
> > specified by the new "default.properties" file without manually
> > specifying the android.jar and your dependent applications projects
> > still compile in Eclipse and generate proper APKs.
> >
> > This is still less than ideal, but it has allowed me to get back on
> > track.  YMMV.
> >
> > -J
> >
> > >
> >
>
>
>
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.
>
> >
>

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

2009-04-30 Thread agirardello

Create a new AVD with:

android create avd -n my_androidMAPS -t 3

and then use it while running your app!

;)





On Apr 30, 1:14 pm, agirardello  wrote:
> I have the same problem!!!
>
> Any help?
>
> On Apr 29, 6:55 pm, khose  wrote:
>
> > Hello!
>
> > I'm migrating my app from 1.1 to 1.5. It works right but i get a
> > problem thowing a new intent which used to open a Geo URI in google
> > Maps. I think that it must be related with the fact of Gmaps not beign
> > included as part of the core. Is there any way to solve it or change
> > it if i want to keep the track of 1.1??
>
> > This is the code:
>
> >                                 Intent mapsIntent = new 
> > Intent(Intent.ACTION_VIEW);
> >                                 mapsIntent.setData(Uri.parse("geo:0,0?q=" + 
> > address + "&z=19"));
> >                                 startActivity(mapsIntent);
>
> > This is the throwed exception...
>
> > android.content.ActivityNotFoundException: No Activity found to handle
> > Intent { action=android.intent.action.VIEW data=geo:0,0?q=Av. Príncipe
> > de Asturias,}
>
> > 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: Eclipse + cupcake + other android projects in build path = VerifyError

2009-04-30 Thread Xavier Ducrohet

Hello,

Editing the .classpath is a good solution. Let me explain why.

ADT supports referenced projects so that you can have library projects
reused by your main Application project.

In the past, the build system provided by ADT just looked at the list
of referenced projects, and added their output (bin/*/*.class) to the
classes.dex of the application project.

The main issue here is that those referenced projects should never
have been Android project themselves.

The reason is that those Android projects could have resources, which
in turn creates an R.java file, which in turn is potentially used by
the library project classes. Even if the resources from the library
projects are copied into the main application project, there's no
guarantee that the IDs in R.java will be similar between the projects.
Therefore, at runtime, the classes from the library would access the
wrong resources.

We noticed this when we implemented the JUnit support. Instrumentation
projects (look under samples/ApiDemos/test/) must reference the
project they're testing to be able to compile, but they shouldn't
include the code of the application they test.
To fix this, we've restricted support of referenced projects to
projects that are not Android projects (ie, do not have the Android
Nature).

Now, we do realize that you may still want to be able to share code
that reference or extend Android classes, and this is not convenient.
The solution to edit the .classpath to remove the nature and builder
is one that will work, as long as you ensure that you are not using a
previously generated R.java.
For code that doesn't reference Android code, just make a standard Java project.

In the future we will probably add a new type of Android project
(maybe Android Library Project), that will allow you to compile
against the Android framework but doesn't support Android resources,
and doesn't generate R.java classes.

Xav

On Thu, Apr 30, 2009 at 7:26 AM, JMoger  wrote:
>
> I've got a working solution to this similar to your hint about J2SE
> projects.  Assuming your lib project is an android project, modify
> the .project file to remove all Android builders and Android natures.
> I removed the "resourcemanagerbuilder", "precompilerbuilder",
> "apkbuilder", and "androidnature".  My lib project does not have any
> resources so I don't know what happens in that situation; its just my
> android code common to multiple projects.
>
> The .classpath file remains unchanged:
>
> 
>        
>        
>         path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
>        
> 
>
> This allows the project to compile against the Android library
> specified by the new "default.properties" file without manually
> specifying the android.jar and your dependent applications projects
> still compile in Eclipse and generate proper APKs.
>
> This is still less than ideal, but it has allowed me to get back on
> track.  YMMV.
>
> -J
>
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: "R cannot be resolved" after updating to 1.5 SDK Pre, and trying to compile for 1.1

2009-04-30 Thread John B. Hansen

I have the same problem i.e. after converting to Android 1.5 SDK,
my project files won't compile due to dozens of R.* files "cannot be
resolved".

I've tried:
   1. Adding the sdk 'tools' to my path
   2. Reinstalling ADT
   3. Cleaning my project

Nothing is working. Anyone have any other suggestions. I'm stopped.

jh

On Apr 28, 10:31 am, Raphael  wrote:
> The first time you convert an old project to the 0.9 ADT with1.5SDK,
> you should try to use Project > Clean if you see any error on missing
> or duplicate classes.
>
> R/
>
> On Mon, Apr 27, 2009 at 9:44 PM, hc  wrote:
>
> > Do you have to uninstall before you reinstall it? I just updated my
> > ADT to 0.9 (the non-pre ADT), and update to1.5_R1 SDK, but I still
> > get the same error if I try to compile for Android1.1
>
> > On Apr 28, 9:29 am, Jay lee  wrote:
> >> I saw the same error.
> >> so I reinstalled ADT and recheck build target "Android1.1"
> >> then I can seeR.java which is generated at "gen" folder.
>
> >> try this.
>
> >> On Apr 27, 10:46 pm, hc  wrote:
>
> >> > Hi,
>
> >> > I just tried that. But it does not work. After removing the file, I
> >> > still get the same error when I try to compile for 1.1 SDK.
>
> >> > Worse, when I try to compile for1.5SDK after that, I get the
> >> > following error but application compiled successfully
> >> > Conversion to Dalvik format failed with error 1
>
> >> > On Apr 27, 9:05 pm, Satya Komatineni 
> >> > wrote:
>
> >> > > considering thatR.javais a generated file, try deleting it and see
> >> > > if the environment rebuilds according to your preference.
>
> >> > > On Mon, Apr 27, 2009 at 8:57 AM, hc  wrote:
>
> >> > > > I updated to1.5SDK pre, together with the ADT. I followed the
> >> > > > instruction to select Android1.5as target by right clicking on the
> >> > > > project, Preferences>Android. In this window there are 3 options,
> >> > > > Android 1.1
> >> > > > Android1.5
> >> > > > Google APIs
>
> >> > > > I selected Android1.5and Apply, clicked OK. Application compiled
> >> > > > nicely.
>
> >> > > > If I go back to the same Preferences and select Android 1.1, Apply, I
> >> > > > can no longer compile my application successfully.
> >> > > > I get hundreds of the same error
> >> > > >Rcannotberesolved
>
> >> > > > Then I try to open this project in another computer that I have not
> >> > > > updated the SDK yet. I get the same error. Can anyone help to solve
> >> > > > this? I'm trapped until the new SDK is out.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Updated to 1.5 and R.java is not regeneratated

2009-04-30 Thread Xavier Ducrohet

When updating an old project that doesn't have the gen source folder
setup, it first detects if the gen folder already exists, and if so,
generates this error.
The idea was to not convert and pre-existing gen folder (or file) into
an Eclipse source folder.

Are you sure you didn't have the gen folder before updating to ADT 0.9?

thanks
Xav

On Thu, Apr 30, 2009 at 2:46 PM, Richard Schilling
 wrote:
>
> O.K. I resolved this.  The problem was related to the fact that
> Eclipse couldn't properly handle the gen directory that it created.
> This error is generated:
>
> [2009-04-30 14:14:15 - MyApp] /MyApp/gen already exists but is not a
> source folder. Convert to a source folder or rename it.
>
> So, here's how I resolved this problem:
>
> 1. Make sure Android 1.1 platform is selected for the project.
> 2. Delete the gen directory - let Eclipse update .classpath (if it
> asks).
> 3. Clean the project - Eclipse will regenerate the gen directory
> 4. Add the directory gen to the Java source classpath if R.java cannot
> be resolved.
> 5. Clean the project again.
> 6. if you still have a problem with the above error showing up, delete
> the gen directory again and let Eclipse regenerate it.
>
> This should clear up the error.  Perhaps a change to the Eclipse
> plugin or the Eclipse API needs to be made - I don't know.
>
> But, at least my projects are building now.
>
> Cheers,
>
> Richard Schilling
> Root Wireless, Inc.
> www.rootwireless.com
>
>
>
> On Apr 30, 2:34 pm, Richard Schilling 
> wrote:
>> I also get this in the message window:
>>
>> [2009-04-30 14:14:15 - MyApp] /MyApp/gen already exists but is not a
>> source folder. Convert to a source folder or rename it.
>>
>> Richard
>>
>> On Apr 30, 2:29 pm, Richard Schilling 
>> wrote:
>>
>>
>>
>> > I have a number of projects that were built and ran just fine under
>> > the 1.1 version of the SDK.  I'm updating all of my projects.  Some
>> > projects update with no problem.
>>
>> > But, some Eclipse projects don't regenerate R.java properly in the gen
>> > directory.
>>
>> > I've set the Android platform to 1.1.
>> > I've cleaned the project.
>> > I've refreshed the project.
>> > R.java is still not being generated.
>>
>> > Help!  This issue prevents production applications from being bult at
>> > the moment.
>>
>> > Richard Schilling
>> > Root Wireless- Hide quoted text -
>>
>> - Show quoted text -
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

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



[android-developers] Re: App widgets and remote views

2009-04-30 Thread shleeforandroid

Hi Tom

Thanks for your reply .

Is there any ways to apply animation effect to HomeScreen?

I doubted and tested it by using AppWidget API, but it's failed.
I can see some changes on RemoteViews' imageView.



On May 1, 3:26 am, Tom Gibara  wrote:
> There's no way of applying an animation to the views within a remote view
> because you're constrained to what you can declare in the layout XML and the
> actions RemoteViews provides for. Neither of these provide for setting
> animations.
>
> > AppWidgetHostView, RemoteViews's apply() , reapply()
>
> These are only relevant to process which is displaying the app widget, not
> the process that is supplying it.
>
> Tom.
>
> 2009/4/30 shleeforandroid 
>
>
>
>
>
> > Hi Tom
>
> > I have some questions about the RemoteViews functionality.
> > I want to know that it is possible to implement animation effect with
> > AppWidget using RemoteViews object.
>
> > On the Service routine, I've created RemoteViews object but I can't
> > find any method to relate animation.
>
> > I doubt some way to use AppWidgetHostView, RemoteViews's apply() ,
> > reapply() methods.
> > I'll appreciate a few hints to do. Any Idea?
>
> > Thanks
> > shlee
>
> > On 4월22일, 오전4시17분, Tom Gibara  wrote:
> > > It's an intentional limitation. Only views that are implemented by the
> > > framework can be used, and only those that are annotated as safe for
> > > remoting.
> > > I don't know if there is a list provided in the SDK docs, but as of 1.5
> > the
> > > supported Views are:
>
> > > AbsoluteLayout
> > > AnalogClock
> > > Button
> > > Chronometer
> > > FrameLayout
> > > ImageButton
> > > ImageView
> > > LinearLayout
> > > ProgressBar
> > > RelativeLayout
> > > TextView
>
> > > Tom
>
> > > 2009/4/21 Joel 
>
> > > > I'm excited about the app widget functionality, and I've been playing
> > > > with it for a bit.  I love the idea that downloadable apps can
> > > > customize the home screen with arbitrary data.
>
> > > > Is it possible to create my own custom views and use them inside of an
> > > > app widget?  For instance, if I wanted to have MyView (which extends
> > > > View) and use it in my layout, would that be possible?  I tried to do
> > > > this, but ran into an InflateException that was thrown as a result of
> > > > a ClassNotFoundException.  I wasn't sure if this was a result of some
> > > > coding error on my part or if this was an intentional limitation of
> > > > the framework.
>
> > > > Joel- 따온 텍스트 숨기기 -
>
> > > - 따온 텍스트 보기 -- 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: Updated to 1.5 and R.java is not regeneratated

2009-04-30 Thread Richard Schilling

O.K. I resolved this.  The problem was related to the fact that
Eclipse couldn't properly handle the gen directory that it created.
This error is generated:

[2009-04-30 14:14:15 - MyApp] /MyApp/gen already exists but is not a
source folder. Convert to a source folder or rename it.

So, here's how I resolved this problem:

1. Make sure Android 1.1 platform is selected for the project.
2. Delete the gen directory - let Eclipse update .classpath (if it
asks).
3. Clean the project - Eclipse will regenerate the gen directory
4. Add the directory gen to the Java source classpath if R.java cannot
be resolved.
5. Clean the project again.
6. if you still have a problem with the above error showing up, delete
the gen directory again and let Eclipse regenerate it.

This should clear up the error.  Perhaps a change to the Eclipse
plugin or the Eclipse API needs to be made - I don't know.

But, at least my projects are building now.

Cheers,

Richard Schilling
Root Wireless, Inc.
www.rootwireless.com



On Apr 30, 2:34 pm, Richard Schilling 
wrote:
> I also get this in the message window:
>
> [2009-04-30 14:14:15 - MyApp] /MyApp/gen already exists but is not a
> source folder. Convert to a source folder or rename it.
>
> Richard
>
> On Apr 30, 2:29 pm, Richard Schilling 
> wrote:
>
>
>
> > I have a number of projects that were built and ran just fine under
> > the 1.1 version of the SDK.  I'm updating all of my projects.  Some
> > projects update with no problem.
>
> > But, some Eclipse projects don't regenerate R.java properly in the gen
> > directory.
>
> > I've set the Android platform to 1.1.
> > I've cleaned the project.
> > I've refreshed the project.
> > R.java is still not being generated.
>
> > Help!  This issue prevents production applications from being bult at
> > the moment.
>
> > Richard Schilling
> > Root Wireless- 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: compiling application with full android source code

2009-04-30 Thread Mark Murphy

ravi wrote:
> Hi All,
>I want to compile my application with full android source code. Its
> because If I compile it alone then I need different library with it
> and so .apk size will increase. So please tell me in which make file
> or configuration file should I do the change. I have placed my
> application inside ..mydroid/package/app . My application is developed
> in Eclipse and is compilable in eclipse.
>If there is other way by which .apk size can kept smaller please
> elaborate.

Questions regarding the Android source code are best asked in a
discussion list pertaining to the Android source code:

http://source.android.com/discuss

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

Android App Developer Books: http://commonsware.com/books.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: Problem with extends TabActivity

2009-04-30 Thread Mark Murphy

rico_1 wrote:
> Hello!
> 
> I have problem with extends TabActivity.
> 
> My code is:
> import android.widget.TabHost;
> import android.content.Intent;
> import android.app.TabActivity;
> import android.app.Activity;
> import android.os.Bundle;
> 
> public class MyProgram extends TabActivity {
> 
> /** Called when the activity is first created. */
>   TabHost mTabHost;
> @Override
> public void onCreate(Bundle savedInstanceState) {
>   super.onCreate(savedInstanceState);
> 
> 
> }
> }
> 
> When I run this simple program it return "The application ... has
> stopped" and LogCat
> Error java.lang.NullPointerException
> 
> when I change TabActivity to Activity everything is ok.
> What is wrong?

For starters, you don't add any tabs.

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

Android App Developer Books: http://commonsware.com/books.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: SlidingDrawer issue #1?

2009-04-30 Thread Sheepz

okay, that didnt work :(





still getting the same message in the ADT only now when launching the
app, it simply stalls half drawn instead of giving an error message
saying the application threw an exception...

On Apr 30, 5:40 pm, Romain Guy  wrote:
> You must use different views, it doesn't make sense to have the same
> view, it's going to confuse SlidingDrawer :)
>
>
>
> On Thu, Apr 30, 2009 at 2:38 PM, Sheepz  wrote:
>
> > yeah, i figured that might be it, but even after this fix:
> >  > android:layout_width="wrap_content"
> > android:layout_height="wrap_content" android:handle="@+id/ImageView01"
> > android:content="@+id/ImageView01">
> >  > android:layout_width="wrap_content"
> > android:layout_height="wrap_content" android:src="@drawable/ahh"> > ImageView>
> > 
> > i still get the same error - i'm gonna try using diffrent views for
> > the content and the handle
> > brb :)
>
> > On Apr 30, 5:32 pm, Romain Guy  wrote:
> >> There is a bug indeed, the exception message says the "handle" is
> >> missing, but the "content" is missing. Check out the javadoc. I'll fix
> >> the exception message.
>
> >> On Thu, Apr 30, 2009 at 2:26 PM, Sheepz  wrote:
>
> >> > okay, i might be missing something, the reason i think that this is a
> >> > bug is that if you use the supplied tool, and cannot avoid getting an
> >> > exception - it's a bug...
> >> > i don't see any way around it - the way to create this widget is:
> >> > a) create widget
> >> > b) get exception
> >> > c) fix error
> >> > d) populate it with the values you want
>
> >> > by the way, i still havent gotten it to work on my app - here's the
> >> > code:
> >> > 
> >> > 
> >> > ...
> >> > 
>
> >> >  >> > android:layout_width="wrap_content"
> >> > android:layout_height="wrap_content" android:handle="@+id/
> >> > ImageView01">
>
> >> >  >> > android:layout_width="wrap_content"
> >> > android:layout_height="wrap_content" android:src="@drawable/ahh"> >> > ImageView>
>
> >> > 
> >> > 
>
> >> > I guess i'm doing something wrong here - but i'm used to the whole
> >> > hierarchical way of things - why is this different in it's
> >> > implementation?
> >> > Thanks for the quick answers btw!
> >> > Sh.
> >> > (p.s. if you want to see the rest of the layout, it's available at:
> >> >http://code.google.com/p/bestcardgameever-android/)
>
> >> > On Apr 30, 5:21 pm, Romain Guy  wrote:
> >> >> It *needs* a handle. It's not a bug, it's a requirement to make the 
> >> >> widget work.
>
> >> >> On Thu, Apr 30, 2009 at 2:16 PM, Sheepz  wrote:
>
> >> >> > so you mean i have to put some content in it and only then it will be
> >> >> > visilble? even if this is true, it's still a bug - albeit with a much
> >> >> > lower severity...
> >> >> > i'll check it out and report back in a few.
>
> >> >> > On Apr 30, 5:10 pm, Romain Guy  wrote:
> >> >> >> Do what the exception says:
>
> >> >> >> "java.lang.IllegalArgumentException: The handle attribute is required
> >> >> >> and must refer to a valid child."
>
> >> >> >> You need to define the widget to use as the handle of the drawer.
>
> >> >> >> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>
> >> >> >> > when adding a slidingDrawer object to my application, i got this 
> >> >> >> > error
> >> >> >> > when trying to display it on the main.xml layout view
> >> >> >> > i used that view to create it as the bottommost component, and
> >> >> >> > immediatly got this message in the console window and the layout
> >> >> >> > stopped showing.
> >> >> >> > here is the exception:
> >> >> >> > java.lang.IllegalArgumentException: The handle attribute is 
> >> >> >> > required
> >> >> >> > and must refer to a valid child.
> >> >> >> >        at 
> >> >> >> > android.widget.SlidingDrawer.(SlidingDrawer.java:203)
> >> >> >> >        at 
> >> >> >> > android.widget.SlidingDrawer.(SlidingDrawer.java:180)
> >> >> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
> >> >> >> > (Native
> >> >> >> > Method)
> >> >> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance
> >> >> >> > (Unknown
> >> >> >> > Source)
> >> >> >> >        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> >> >> >> > (Unknown
> >> >> >> > Source)
> >> >> >> >        at java.lang.reflect.Constructor.newInstance(Unknown Source)
> >> >> >> >        at 
> >> >> >> > android.view.LayoutInflater.createView(LayoutInflater.java:
> >> >> >> > 499)
> >> >> >> >        at android.view.BridgeInflater.onCreateView
> >> >> >> > (BridgeInflater.java:77)
> >> >> >> >        at android.view.LayoutInflater.createViewFromTag
> >> >> >> > (LayoutInflater.java:
> >> >> >> > 562)
> >> >> >> >        at android.view.BridgeInflater.createViewFromTag
> >> >> >> > (BridgeInflater.java:
> >> >> >> > 122)
> >> >> >> >        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
> >> >> >> > 617)
> >> >> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> >> >> >> > 407)
> >> >> >> >        at android.view.LayoutInflater.inflate(L

[android-developers] Re: SlidingDrawer issue #1?

2009-04-30 Thread Romain Guy

You must use different views, it doesn't make sense to have the same
view, it's going to confuse SlidingDrawer :)

On Thu, Apr 30, 2009 at 2:38 PM, Sheepz  wrote:
>
> yeah, i figured that might be it, but even after this fix:
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:handle="@+id/ImageView01"
> android:content="@+id/ImageView01">
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:src="@drawable/ahh"> ImageView>
> 
> i still get the same error - i'm gonna try using diffrent views for
> the content and the handle
> brb :)
>
> On Apr 30, 5:32 pm, Romain Guy  wrote:
>> There is a bug indeed, the exception message says the "handle" is
>> missing, but the "content" is missing. Check out the javadoc. I'll fix
>> the exception message.
>>
>>
>>
>> On Thu, Apr 30, 2009 at 2:26 PM, Sheepz  wrote:
>>
>> > okay, i might be missing something, the reason i think that this is a
>> > bug is that if you use the supplied tool, and cannot avoid getting an
>> > exception - it's a bug...
>> > i don't see any way around it - the way to create this widget is:
>> > a) create widget
>> > b) get exception
>> > c) fix error
>> > d) populate it with the values you want
>>
>> > by the way, i still havent gotten it to work on my app - here's the
>> > code:
>> > 
>> > 
>> > ...
>> > 
>>
>> > > > android:layout_width="wrap_content"
>> > android:layout_height="wrap_content" android:handle="@+id/
>> > ImageView01">
>>
>> > > > android:layout_width="wrap_content"
>> > android:layout_height="wrap_content" android:src="@drawable/ahh">> > ImageView>
>>
>> > 
>> > 
>>
>> > I guess i'm doing something wrong here - but i'm used to the whole
>> > hierarchical way of things - why is this different in it's
>> > implementation?
>> > Thanks for the quick answers btw!
>> > Sh.
>> > (p.s. if you want to see the rest of the layout, it's available at:
>> >http://code.google.com/p/bestcardgameever-android/)
>>
>> > On Apr 30, 5:21 pm, Romain Guy  wrote:
>> >> It *needs* a handle. It's not a bug, it's a requirement to make the 
>> >> widget work.
>>
>> >> On Thu, Apr 30, 2009 at 2:16 PM, Sheepz  wrote:
>>
>> >> > so you mean i have to put some content in it and only then it will be
>> >> > visilble? even if this is true, it's still a bug - albeit with a much
>> >> > lower severity...
>> >> > i'll check it out and report back in a few.
>>
>> >> > On Apr 30, 5:10 pm, Romain Guy  wrote:
>> >> >> Do what the exception says:
>>
>> >> >> "java.lang.IllegalArgumentException: The handle attribute is required
>> >> >> and must refer to a valid child."
>>
>> >> >> You need to define the widget to use as the handle of the drawer.
>>
>> >> >> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>>
>> >> >> > when adding a slidingDrawer object to my application, i got this 
>> >> >> > error
>> >> >> > when trying to display it on the main.xml layout view
>> >> >> > i used that view to create it as the bottommost component, and
>> >> >> > immediatly got this message in the console window and the layout
>> >> >> > stopped showing.
>> >> >> > here is the exception:
>> >> >> > java.lang.IllegalArgumentException: The handle attribute is required
>> >> >> > and must refer to a valid child.
>> >> >> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
>> >> >> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
>> >> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
>> >> >> > (Native
>> >> >> > Method)
>> >> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance
>> >> >> > (Unknown
>> >> >> > Source)
>> >> >> >        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
>> >> >> > (Unknown
>> >> >> > Source)
>> >> >> >        at java.lang.reflect.Constructor.newInstance(Unknown Source)
>> >> >> >        at android.view.LayoutInflater.createView(LayoutInflater.java:
>> >> >> > 499)
>> >> >> >        at android.view.BridgeInflater.onCreateView
>> >> >> > (BridgeInflater.java:77)
>> >> >> >        at android.view.LayoutInflater.createViewFromTag
>> >> >> > (LayoutInflater.java:
>> >> >> > 562)
>> >> >> >        at android.view.BridgeInflater.createViewFromTag
>> >> >> > (BridgeInflater.java:
>> >> >> > 122)
>> >> >> >        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
>> >> >> > 617)
>> >> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
>> >> >> > 407)
>> >> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
>> >> >> > 296)
>> >> >> >        at com.android.layoutlib.bridge.Bridge.computeLayout
>> >> >> > (Bridge.java:371)
>> >> >> >        at
>> >> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
>> >> >> > (Unknown Source)
>> >> >> >        at
>> >> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
>> >> >> > (Unknown Source)
>> >> >> >        at 
>> >> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEd

[android-developers] Re: SlidingDrawer issue #1?

2009-04-30 Thread Sheepz

yeah, i figured that might be it, but even after this fix:



i still get the same error - i'm gonna try using diffrent views for
the content and the handle
brb :)

On Apr 30, 5:32 pm, Romain Guy  wrote:
> There is a bug indeed, the exception message says the "handle" is
> missing, but the "content" is missing. Check out the javadoc. I'll fix
> the exception message.
>
>
>
> On Thu, Apr 30, 2009 at 2:26 PM, Sheepz  wrote:
>
> > okay, i might be missing something, the reason i think that this is a
> > bug is that if you use the supplied tool, and cannot avoid getting an
> > exception - it's a bug...
> > i don't see any way around it - the way to create this widget is:
> > a) create widget
> > b) get exception
> > c) fix error
> > d) populate it with the values you want
>
> > by the way, i still havent gotten it to work on my app - here's the
> > code:
> > 
> > 
> > ...
> > 
>
> >  > android:layout_width="wrap_content"
> > android:layout_height="wrap_content" android:handle="@+id/
> > ImageView01">
>
> >  > android:layout_width="wrap_content"
> > android:layout_height="wrap_content" android:src="@drawable/ahh"> > ImageView>
>
> > 
> > 
>
> > I guess i'm doing something wrong here - but i'm used to the whole
> > hierarchical way of things - why is this different in it's
> > implementation?
> > Thanks for the quick answers btw!
> > Sh.
> > (p.s. if you want to see the rest of the layout, it's available at:
> >http://code.google.com/p/bestcardgameever-android/)
>
> > On Apr 30, 5:21 pm, Romain Guy  wrote:
> >> It *needs* a handle. It's not a bug, it's a requirement to make the widget 
> >> work.
>
> >> On Thu, Apr 30, 2009 at 2:16 PM, Sheepz  wrote:
>
> >> > so you mean i have to put some content in it and only then it will be
> >> > visilble? even if this is true, it's still a bug - albeit with a much
> >> > lower severity...
> >> > i'll check it out and report back in a few.
>
> >> > On Apr 30, 5:10 pm, Romain Guy  wrote:
> >> >> Do what the exception says:
>
> >> >> "java.lang.IllegalArgumentException: The handle attribute is required
> >> >> and must refer to a valid child."
>
> >> >> You need to define the widget to use as the handle of the drawer.
>
> >> >> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>
> >> >> > when adding a slidingDrawer object to my application, i got this error
> >> >> > when trying to display it on the main.xml layout view
> >> >> > i used that view to create it as the bottommost component, and
> >> >> > immediatly got this message in the console window and the layout
> >> >> > stopped showing.
> >> >> > here is the exception:
> >> >> > java.lang.IllegalArgumentException: The handle attribute is required
> >> >> > and must refer to a valid child.
> >> >> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
> >> >> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
> >> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
> >> >> > (Native
> >> >> > Method)
> >> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance
> >> >> > (Unknown
> >> >> > Source)
> >> >> >        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> >> >> > (Unknown
> >> >> > Source)
> >> >> >        at java.lang.reflect.Constructor.newInstance(Unknown Source)
> >> >> >        at android.view.LayoutInflater.createView(LayoutInflater.java:
> >> >> > 499)
> >> >> >        at android.view.BridgeInflater.onCreateView
> >> >> > (BridgeInflater.java:77)
> >> >> >        at android.view.LayoutInflater.createViewFromTag
> >> >> > (LayoutInflater.java:
> >> >> > 562)
> >> >> >        at android.view.BridgeInflater.createViewFromTag
> >> >> > (BridgeInflater.java:
> >> >> > 122)
> >> >> >        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
> >> >> > 617)
> >> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> >> >> > 407)
> >> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> >> >> > 296)
> >> >> >        at com.android.layoutlib.bridge.Bridge.computeLayout
> >> >> > (Bridge.java:371)
> >> >> >        at
> >> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
> >> >> > (Unknown Source)
> >> >> >        at
> >> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
> >> >> > (Unknown Source)
> >> >> >        at com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor
> >> >> > $2.run
> >> >> > (Unknown Source)
> >> >> >        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:
> >> >> > 35)
> >> >> >        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
> >> >> > (Synchronizer.java:133)
> >> >> >        at org.eclipse.swt.widgets.Display.runAsyncMessages
> >> >> > (Display.java:
> >> >> > 3800)
> >> >> >        at org.eclipse.swt.widgets.Display.readAndDispatch
> >> >> > (Display.java:3425)
> >> >> >        at org.eclipse.ui.internal.Workbench.runEventLoop
> >> >> > (Workbench.java:
> >> >> > 2384)
> >> >> > 

[android-developers] Re: OutOfMemoryError from BitmapFactory

2009-04-30 Thread Streets Of Boston

"I assume you mean any of my own bitmap caches..."
Yep, if you have any.

I don't have an issue when my app finishes. Memory seems to get
released quite OK. So far, repeatedly re-starting my app does not seem
to leak any (bitmap) memory.

By any chance, do you have Drawables cached (i.e. referenced through a
static variable, or in a map/collection that is referenced through a
static variable)? Drawables (BitmapDrawables in your case) hold on to
a reference of the activity in which they're used.

I've been bitten by leaking memory before. I try to avoid mutable
static variables in Android as the plague. And, if i really need one,
i make absolutely sure the static variable is either cleaned up
properly (set to null) and/or that it holds no (indirect) references
to activities.

On Apr 30, 4:39 pm, Ward Willats  wrote:
> Thanks for these tips.
>
> At 1:14 PM -0700 4/30/09, Streets Of Boston wrote:
>
> >In my app, i've been dillegently 'unloading' bitmaps when i need
> >memory.
> >- clear any bitmap cache
>
> I assume you mean any of my own bitmap caches...
>
> >So far, this scheme has served me well. Before i got a lot of OOM-
> >errors. Now i get a lot less. And, if i still get one, i try to
> >handle it gracefully.
>
> It still seems like Voodo to me. If I have to manually call
> setImageBitmap(null) it implies (to me) that the image view is not
> being released in the first place, which means the view hierarchy is
> not being released, even though I have called finish(). At the moment
> I am looking for static variables and leaked contexts
>
> -- Ward
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OutOfMemoryError from BitmapFactory

2009-04-30 Thread fadden

On Apr 30, 1:39 pm, Ward Willats  wrote:
> It still seems like Voodo to me. If I have to manually call
> setImageBitmap(null) it implies (to me) that the image view is not
> being released in the first place, which means the view hierarchy is
> not being released, even though I have called finish(). At the moment
> I am looking for static variables and leaked contexts

The "hprof" dump can help with that.  I added a quick writeup:

  
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/heap-profiling.html;hb=HEAD

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Updated to 1.5 and R.java is not regeneratated

2009-04-30 Thread Richard Schilling

I also get this in the message window:

[2009-04-30 14:14:15 - MyApp] /MyApp/gen already exists but is not a
source folder. Convert to a source folder or rename it.

Richard




On Apr 30, 2:29 pm, Richard Schilling 
wrote:
> I have a number of projects that were built and ran just fine under
> the 1.1 version of the SDK.  I'm updating all of my projects.  Some
> projects update with no problem.
>
> But, some Eclipse projects don't regenerate R.java properly in the gen
> directory.
>
> I've set the Android platform to 1.1.
> I've cleaned the project.
> I've refreshed the project.
> R.java is still not being generated.
>
> Help!  This issue prevents production applications from being bult at
> the moment.
>
> Richard Schilling
> Root Wireless
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SlidingDrawer issue #1?

2009-04-30 Thread Romain Guy

There is a bug indeed, the exception message says the "handle" is
missing, but the "content" is missing. Check out the javadoc. I'll fix
the exception message.

On Thu, Apr 30, 2009 at 2:26 PM, Sheepz  wrote:
>
> okay, i might be missing something, the reason i think that this is a
> bug is that if you use the supplied tool, and cannot avoid getting an
> exception - it's a bug...
> i don't see any way around it - the way to create this widget is:
> a) create widget
> b) get exception
> c) fix error
> d) populate it with the values you want
>
> by the way, i still havent gotten it to work on my app - here's the
> code:
> 
> 
> ...
> 
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:handle="@+id/
> ImageView01">
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:src="@drawable/ahh"> ImageView>
>
> 
> 
>
> I guess i'm doing something wrong here - but i'm used to the whole
> hierarchical way of things - why is this different in it's
> implementation?
> Thanks for the quick answers btw!
> Sh.
> (p.s. if you want to see the rest of the layout, it's available at:
> http://code.google.com/p/bestcardgameever-android/ )
>
> On Apr 30, 5:21 pm, Romain Guy  wrote:
>> It *needs* a handle. It's not a bug, it's a requirement to make the widget 
>> work.
>>
>>
>>
>> On Thu, Apr 30, 2009 at 2:16 PM, Sheepz  wrote:
>>
>> > so you mean i have to put some content in it and only then it will be
>> > visilble? even if this is true, it's still a bug - albeit with a much
>> > lower severity...
>> > i'll check it out and report back in a few.
>>
>> > On Apr 30, 5:10 pm, Romain Guy  wrote:
>> >> Do what the exception says:
>>
>> >> "java.lang.IllegalArgumentException: The handle attribute is required
>> >> and must refer to a valid child."
>>
>> >> You need to define the widget to use as the handle of the drawer.
>>
>> >> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>>
>> >> > when adding a slidingDrawer object to my application, i got this error
>> >> > when trying to display it on the main.xml layout view
>> >> > i used that view to create it as the bottommost component, and
>> >> > immediatly got this message in the console window and the layout
>> >> > stopped showing.
>> >> > here is the exception:
>> >> > java.lang.IllegalArgumentException: The handle attribute is required
>> >> > and must refer to a valid child.
>> >> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
>> >> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
>> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
>> >> > (Native
>> >> > Method)
>> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance
>> >> > (Unknown
>> >> > Source)
>> >> >        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
>> >> > (Unknown
>> >> > Source)
>> >> >        at java.lang.reflect.Constructor.newInstance(Unknown Source)
>> >> >        at android.view.LayoutInflater.createView(LayoutInflater.java:
>> >> > 499)
>> >> >        at android.view.BridgeInflater.onCreateView
>> >> > (BridgeInflater.java:77)
>> >> >        at android.view.LayoutInflater.createViewFromTag
>> >> > (LayoutInflater.java:
>> >> > 562)
>> >> >        at android.view.BridgeInflater.createViewFromTag
>> >> > (BridgeInflater.java:
>> >> > 122)
>> >> >        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
>> >> > 617)
>> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
>> >> > 407)
>> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
>> >> > 296)
>> >> >        at com.android.layoutlib.bridge.Bridge.computeLayout
>> >> > (Bridge.java:371)
>> >> >        at
>> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
>> >> > (Unknown Source)
>> >> >        at
>> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
>> >> > (Unknown Source)
>> >> >        at com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor
>> >> > $2.run
>> >> > (Unknown Source)
>> >> >        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:
>> >> > 35)
>> >> >        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
>> >> > (Synchronizer.java:133)
>> >> >        at org.eclipse.swt.widgets.Display.runAsyncMessages
>> >> > (Display.java:
>> >> > 3800)
>> >> >        at org.eclipse.swt.widgets.Display.readAndDispatch
>> >> > (Display.java:3425)
>> >> >        at org.eclipse.ui.internal.Workbench.runEventLoop
>> >> > (Workbench.java:
>> >> > 2384)
>> >> >        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:
>> >> > 2348)
>> >> >        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:
>> >> > 2200)
>> >> >        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
>> >> >        at
>> >> > org.eclipse.core.databinding.observable.Realm.runWithDefault
>> >> > (Realm.java:288)
>> >> >        at org.eclipse.ui.internal.Workbench

[android-developers] Updated to 1.5 and R.java is not regeneratated

2009-04-30 Thread Richard Schilling

I have a number of projects that were built and ran just fine under
the 1.1 version of the SDK.  I'm updating all of my projects.  Some
projects update with no problem.

But, some Eclipse projects don't regenerate R.java properly in the gen
directory.

I've set the Android platform to 1.1.
I've cleaned the project.
I've refreshed the project.
R.java is still not being generated.


Help!  This issue prevents production applications from being bult at
the moment.

Richard Schilling
Root Wireless

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

2009-04-30 Thread c.a.jeffer...@googlemail.com

Hello?


On Apr 29, 7:23 pm, "c.a.jeffer...@googlemail.com"
 wrote:
> Hi,
>     I am writing an application (on v1.0) that needs to search Google
> maps for the nearest facility to my current location e.g. what are the
> nearest bike shops. Can anyone give advice on how to do this? I looked
> at googlenav.Search but this has been deprecated for some reason. I
> did look at the Qype APIs but gave up early as these were difficult to
> use. I am really stuck and would appreciate any advise here.
>
> Thanks,
>
> Clive
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] camCorder not working well in emulator

2009-04-30 Thread Sheepz

hi all, just installed myself a new AVD and set the camera to true,
however the camcorder is very unresponsive and seems like it's not
working...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SlidingDrawer issue #1?

2009-04-30 Thread Sheepz

okay, i might be missing something, the reason i think that this is a
bug is that if you use the supplied tool, and cannot avoid getting an
exception - it's a bug...
i don't see any way around it - the way to create this widget is:
a) create widget
b) get exception
c) fix error
d) populate it with the values you want

by the way, i still havent gotten it to work on my app - here's the
code:


...









I guess i'm doing something wrong here - but i'm used to the whole
hierarchical way of things - why is this different in it's
implementation?
Thanks for the quick answers btw!
Sh.
(p.s. if you want to see the rest of the layout, it's available at:
http://code.google.com/p/bestcardgameever-android/ )

On Apr 30, 5:21 pm, Romain Guy  wrote:
> It *needs* a handle. It's not a bug, it's a requirement to make the widget 
> work.
>
>
>
> On Thu, Apr 30, 2009 at 2:16 PM, Sheepz  wrote:
>
> > so you mean i have to put some content in it and only then it will be
> > visilble? even if this is true, it's still a bug - albeit with a much
> > lower severity...
> > i'll check it out and report back in a few.
>
> > On Apr 30, 5:10 pm, Romain Guy  wrote:
> >> Do what the exception says:
>
> >> "java.lang.IllegalArgumentException: The handle attribute is required
> >> and must refer to a valid child."
>
> >> You need to define the widget to use as the handle of the drawer.
>
> >> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>
> >> > when adding a slidingDrawer object to my application, i got this error
> >> > when trying to display it on the main.xml layout view
> >> > i used that view to create it as the bottommost component, and
> >> > immediatly got this message in the console window and the layout
> >> > stopped showing.
> >> > here is the exception:
> >> > java.lang.IllegalArgumentException: The handle attribute is required
> >> > and must refer to a valid child.
> >> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
> >> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
> >> > (Native
> >> > Method)
> >> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance
> >> > (Unknown
> >> > Source)
> >> >        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> >> > (Unknown
> >> > Source)
> >> >        at java.lang.reflect.Constructor.newInstance(Unknown Source)
> >> >        at android.view.LayoutInflater.createView(LayoutInflater.java:
> >> > 499)
> >> >        at android.view.BridgeInflater.onCreateView
> >> > (BridgeInflater.java:77)
> >> >        at android.view.LayoutInflater.createViewFromTag
> >> > (LayoutInflater.java:
> >> > 562)
> >> >        at android.view.BridgeInflater.createViewFromTag
> >> > (BridgeInflater.java:
> >> > 122)
> >> >        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
> >> > 617)
> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> >> > 407)
> >> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> >> > 296)
> >> >        at com.android.layoutlib.bridge.Bridge.computeLayout
> >> > (Bridge.java:371)
> >> >        at
> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
> >> > (Unknown Source)
> >> >        at
> >> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
> >> > (Unknown Source)
> >> >        at com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor
> >> > $2.run
> >> > (Unknown Source)
> >> >        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:
> >> > 35)
> >> >        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
> >> > (Synchronizer.java:133)
> >> >        at org.eclipse.swt.widgets.Display.runAsyncMessages
> >> > (Display.java:
> >> > 3800)
> >> >        at org.eclipse.swt.widgets.Display.readAndDispatch
> >> > (Display.java:3425)
> >> >        at org.eclipse.ui.internal.Workbench.runEventLoop
> >> > (Workbench.java:
> >> > 2384)
> >> >        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:
> >> > 2348)
> >> >        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:
> >> > 2200)
> >> >        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> >> >        at
> >> > org.eclipse.core.databinding.observable.Realm.runWithDefault
> >> > (Realm.java:288)
> >> >        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
> >> > (Workbench.java:490)
> >> >        at org.eclipse.ui.PlatformUI.createAndRunWorkbench
> >> > (PlatformUI.java:
> >> > 149)
> >> >        at
> >> > org.eclipse.ui.internal.ide.application.IDEApplication.start
> >> > (IDEApplication.java:113)
> >> >        at org.eclipse.equinox.internal.app.EclipseAppHandle.run
> >> > (EclipseAppHandle.java:193)
> >> >        at
> >> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
> >> > (EclipseAppLauncher.java:110)
> >> >        at
> >> > org.eclipse.core.runtime.internal.adaptor.Eclipse

[android-developers] Re: Date in sms

2009-04-30 Thread Yves Liu
Thanks.

On Thu, Apr 30, 2009 at 1:28 AM, swarup  wrote:

>
> try using android.text.format.DateUtils.formatDateTime(Context
> context, long millis, int flags)
> also look at /packages/apps/Mms/src/com/android/mms/ui/
> MessageUtils.java : formatTimeStampString()
>
>
> On Apr 30, 1:03 pm, "yves...@gmail.com"  wrote:
> > I am using contentProvider to retrieve old sms. And for the column
> > "Date", I got a big number, like 1241077422384. Can anyone tell me how
> > to translate this into readable date and time?
> >
>

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



[android-developers] How to Snap a picture of a Layouts contents?

2009-04-30 Thread Moto

Hi,

I need to somehow get a drawable of the contents of a Layout, once I
get that "drawable" I want to set it as a background on an empty
layout

How can I go about doing this?

Thanks!
Moto!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Market app suspended. What do I do?

2009-04-30 Thread bryan

I received notice that my application was suspended yesterday around
lunch. I've contacted support via email and the publisher support form
with no answer as of yet. What can I do to resolve this issue?

The violation was that after paid app support hit the UK, a UK company
(non-software) with the same name as my app yelled at Google. The
result? Suspended my application entirely, not just for the UK. I love
that the company didn't merely email me, in which case I'd have
happily resolved the issue.

So here I sit, waiting and powerless. A lot of people have purchased
the app and expect updates. I have an apk with a new name, but can't
do anything with it. The developers console has no clickable options.

Is this how the market works? One social inept company can shut down
your app permanently under shady pretexts? I didn't know that they
exist. It was in error. The news is surprising to me given that they
deal in the non-software realm. I'd like to make everyone happy and
resolve this issue. What can I do?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SlidingDrawer issue #1?

2009-04-30 Thread Romain Guy

It *needs* a handle. It's not a bug, it's a requirement to make the widget work.

On Thu, Apr 30, 2009 at 2:16 PM, Sheepz  wrote:
>
> so you mean i have to put some content in it and only then it will be
> visilble? even if this is true, it's still a bug - albeit with a much
> lower severity...
> i'll check it out and report back in a few.
>
> On Apr 30, 5:10 pm, Romain Guy  wrote:
>> Do what the exception says:
>>
>> "java.lang.IllegalArgumentException: The handle attribute is required
>> and must refer to a valid child."
>>
>> You need to define the widget to use as the handle of the drawer.
>>
>>
>>
>> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>>
>> > when adding a slidingDrawer object to my application, i got this error
>> > when trying to display it on the main.xml layout view
>> > i used that view to create it as the bottommost component, and
>> > immediatly got this message in the console window and the layout
>> > stopped showing.
>> > here is the exception:
>> > java.lang.IllegalArgumentException: The handle attribute is required
>> > and must refer to a valid child.
>> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
>> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
>> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
>> > (Native
>> > Method)
>> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance
>> > (Unknown
>> > Source)
>> >        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
>> > (Unknown
>> > Source)
>> >        at java.lang.reflect.Constructor.newInstance(Unknown Source)
>> >        at android.view.LayoutInflater.createView(LayoutInflater.java:
>> > 499)
>> >        at android.view.BridgeInflater.onCreateView
>> > (BridgeInflater.java:77)
>> >        at android.view.LayoutInflater.createViewFromTag
>> > (LayoutInflater.java:
>> > 562)
>> >        at android.view.BridgeInflater.createViewFromTag
>> > (BridgeInflater.java:
>> > 122)
>> >        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
>> > 617)
>> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
>> > 407)
>> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
>> > 296)
>> >        at com.android.layoutlib.bridge.Bridge.computeLayout
>> > (Bridge.java:371)
>> >        at
>> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
>> > (Unknown Source)
>> >        at
>> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
>> > (Unknown Source)
>> >        at com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor
>> > $2.run
>> > (Unknown Source)
>> >        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:
>> > 35)
>> >        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
>> > (Synchronizer.java:133)
>> >        at org.eclipse.swt.widgets.Display.runAsyncMessages
>> > (Display.java:
>> > 3800)
>> >        at org.eclipse.swt.widgets.Display.readAndDispatch
>> > (Display.java:3425)
>> >        at org.eclipse.ui.internal.Workbench.runEventLoop
>> > (Workbench.java:
>> > 2384)
>> >        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:
>> > 2348)
>> >        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:
>> > 2200)
>> >        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
>> >        at
>> > org.eclipse.core.databinding.observable.Realm.runWithDefault
>> > (Realm.java:288)
>> >        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
>> > (Workbench.java:490)
>> >        at org.eclipse.ui.PlatformUI.createAndRunWorkbench
>> > (PlatformUI.java:
>> > 149)
>> >        at
>> > org.eclipse.ui.internal.ide.application.IDEApplication.start
>> > (IDEApplication.java:113)
>> >        at org.eclipse.equinox.internal.app.EclipseAppHandle.run
>> > (EclipseAppHandle.java:193)
>> >        at
>> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
>> > (EclipseAppLauncher.java:110)
>> >        at
>> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
>> > (EclipseAppLauncher.java:79)
>> >        at org.eclipse.core.runtime.adaptor.EclipseStarter.run
>> > (EclipseStarter.java:386)
>> >        at org.eclipse.core.runtime.adaptor.EclipseStarter.run
>> > (EclipseStarter.java:179)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>> > Source)
>> >        at java.lang.reflect.Method.invoke(Unknown Source)
>> >        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:
>> > 549)
>> >        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
>> >        at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to pro

[android-developers] Re: SlidingDrawer issue #1?

2009-04-30 Thread Romain Guy

Do what the exception says:

"java.lang.IllegalArgumentException: The handle attribute is required
and must refer to a valid child."

You need to define the widget to use as the handle of the drawer.

On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>
> when adding a slidingDrawer object to my application, i got this error
> when trying to display it on the main.xml layout view
> i used that view to create it as the bottommost component, and
> immediatly got this message in the console window and the layout
> stopped showing.
> here is the exception:
> java.lang.IllegalArgumentException: The handle attribute is required
> and must refer to a valid child.
>        at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
>        at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
> (Native
> Method)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance
> (Unknown
> Source)
>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> (Unknown
> Source)
>        at java.lang.reflect.Constructor.newInstance(Unknown Source)
>        at android.view.LayoutInflater.createView(LayoutInflater.java:
> 499)
>        at android.view.BridgeInflater.onCreateView
> (BridgeInflater.java:77)
>        at android.view.LayoutInflater.createViewFromTag
> (LayoutInflater.java:
> 562)
>        at android.view.BridgeInflater.createViewFromTag
> (BridgeInflater.java:
> 122)
>        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
> 617)
>        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> 407)
>        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> 296)
>        at com.android.layoutlib.bridge.Bridge.computeLayout
> (Bridge.java:371)
>        at
> com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
> (Unknown Source)
>        at
> com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
> (Unknown Source)
>        at com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor
> $2.run
> (Unknown Source)
>        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:
> 35)
>        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
> (Synchronizer.java:133)
>        at org.eclipse.swt.widgets.Display.runAsyncMessages
> (Display.java:
> 3800)
>        at org.eclipse.swt.widgets.Display.readAndDispatch
> (Display.java:3425)
>        at org.eclipse.ui.internal.Workbench.runEventLoop
> (Workbench.java:
> 2384)
>        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:
> 2348)
>        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:
> 2200)
>        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
>        at
> org.eclipse.core.databinding.observable.Realm.runWithDefault
> (Realm.java:288)
>        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
> (Workbench.java:490)
>        at org.eclipse.ui.PlatformUI.createAndRunWorkbench
> (PlatformUI.java:
> 149)
>        at
> org.eclipse.ui.internal.ide.application.IDEApplication.start
> (IDEApplication.java:113)
>        at org.eclipse.equinox.internal.app.EclipseAppHandle.run
> (EclipseAppHandle.java:193)
>        at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
> (EclipseAppLauncher.java:110)
>        at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
> (EclipseAppLauncher.java:79)
>        at org.eclipse.core.runtime.adaptor.EclipseStarter.run
> (EclipseStarter.java:386)
>        at org.eclipse.core.runtime.adaptor.EclipseStarter.run
> (EclipseStarter.java:179)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:
> 549)
>        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
>        at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> >
>



-- 
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: SlidingDrawer issue #1?

2009-04-30 Thread Sheepz

so you mean i have to put some content in it and only then it will be
visilble? even if this is true, it's still a bug - albeit with a much
lower severity...
i'll check it out and report back in a few.

On Apr 30, 5:10 pm, Romain Guy  wrote:
> Do what the exception says:
>
> "java.lang.IllegalArgumentException: The handle attribute is required
> and must refer to a valid child."
>
> You need to define the widget to use as the handle of the drawer.
>
>
>
> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz  wrote:
>
> > when adding a slidingDrawer object to my application, i got this error
> > when trying to display it on the main.xml layout view
> > i used that view to create it as the bottommost component, and
> > immediatly got this message in the console window and the layout
> > stopped showing.
> > here is the exception:
> > java.lang.IllegalArgumentException: The handle attribute is required
> > and must refer to a valid child.
> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
> >        at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0
> > (Native
> > Method)
> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance
> > (Unknown
> > Source)
> >        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> > (Unknown
> > Source)
> >        at java.lang.reflect.Constructor.newInstance(Unknown Source)
> >        at android.view.LayoutInflater.createView(LayoutInflater.java:
> > 499)
> >        at android.view.BridgeInflater.onCreateView
> > (BridgeInflater.java:77)
> >        at android.view.LayoutInflater.createViewFromTag
> > (LayoutInflater.java:
> > 562)
> >        at android.view.BridgeInflater.createViewFromTag
> > (BridgeInflater.java:
> > 122)
> >        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
> > 617)
> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> > 407)
> >        at android.view.LayoutInflater.inflate(LayoutInflater.java:
> > 296)
> >        at com.android.layoutlib.bridge.Bridge.computeLayout
> > (Bridge.java:371)
> >        at
> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
> > (Unknown Source)
> >        at
> > com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
> > (Unknown Source)
> >        at com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor
> > $2.run
> > (Unknown Source)
> >        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:
> > 35)
> >        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
> > (Synchronizer.java:133)
> >        at org.eclipse.swt.widgets.Display.runAsyncMessages
> > (Display.java:
> > 3800)
> >        at org.eclipse.swt.widgets.Display.readAndDispatch
> > (Display.java:3425)
> >        at org.eclipse.ui.internal.Workbench.runEventLoop
> > (Workbench.java:
> > 2384)
> >        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:
> > 2348)
> >        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:
> > 2200)
> >        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> >        at
> > org.eclipse.core.databinding.observable.Realm.runWithDefault
> > (Realm.java:288)
> >        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
> > (Workbench.java:490)
> >        at org.eclipse.ui.PlatformUI.createAndRunWorkbench
> > (PlatformUI.java:
> > 149)
> >        at
> > org.eclipse.ui.internal.ide.application.IDEApplication.start
> > (IDEApplication.java:113)
> >        at org.eclipse.equinox.internal.app.EclipseAppHandle.run
> > (EclipseAppHandle.java:193)
> >        at
> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
> > (EclipseAppLauncher.java:110)
> >        at
> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
> > (EclipseAppLauncher.java:79)
> >        at org.eclipse.core.runtime.adaptor.EclipseStarter.run
> > (EclipseStarter.java:386)
> >        at org.eclipse.core.runtime.adaptor.EclipseStarter.run
> > (EclipseStarter.java:179)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> > Source)
> >        at java.lang.reflect.Method.invoke(Unknown Source)
> >        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:
> > 549)
> >        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> >        at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
>
> --
> 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

[android-developers] Re: "R cannot be resolved" after updating to 1.5 SDK Pre, and trying to compile for 1.1

2009-04-30 Thread Richard Schilling

I had the same problem but solved it.  Perhaps this will help:  Make
sure the 'gen' directory is part of the java source build path.

Right Click on project name (Package Explorer) -> Properties (Context
Menu) ->
Java Build Path (tree) -> Source (tab) -> Add Folder (Button) ->
"gen" (directory name)
-> OK (BUtton)

Now R will be properly resolved.

Richard Schilling
Root Wireless, Inc.

On Apr 28, 10:31 am, Raphael  wrote:
> The first time you convert an old project to the 0.9 ADT with 1.5 SDK,
> you should try to use Project > Clean if you see any error on missing
> or duplicate classes.
>
> R/
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SlidingDoor issue #1?

2009-04-30 Thread dan raaka
you will need to define the handle as well.
Take a look at the launcher code for example.

Dan

On Thu, Apr 30, 2009 at 2:01 PM, Sheepz  wrote:

>
> when adding a slidingDrawer object to my application, i got this error
> when trying to display it on the main.xml layout view
> i used that view to create it as the bottommost component, and
> immediatly got this message in the console window and the layout
> stopped showing.
> here is the exception:
> java.lang.IllegalArgumentException: The handle attribute is required
> and must refer to a valid child.
>at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
>at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>at java.lang.reflect.Constructor.newInstance(Unknown Source)
>at android.view.LayoutInflater.createView(LayoutInflater.java:499)
>at android.view.BridgeInflater.onCreateView(BridgeInflater.java:77)
>at
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:
> 562)
>at
> android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:
> 122)
>at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
>at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
>at android.view.LayoutInflater.inflate(LayoutInflater.java:296)
>at
> com.android.layoutlib.bridge.Bridge.computeLayout(Bridge.java:371)
>at
> com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
> (Unknown Source)
>at
>
> com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
> (Unknown Source)
>at
> com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor$2.run
> (Unknown Source)
>at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
> (Synchronizer.java:133)
>at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:
> 3800)
>at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
>at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
> 2384)
>at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
>at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
>at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
>at org.eclipse.core.databinding.observable.Realm.runWithDefault
> (Realm.java:288)
>at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
> (Workbench.java:490)
>at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
> 149)
>at org.eclipse.ui.internal.ide.application.IDEApplication.start
> (IDEApplication.java:113)
>at org.eclipse.equinox.internal.app.EclipseAppHandle.run
> (EclipseAppHandle.java:193)
>at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
> (EclipseAppLauncher.java:110)
>at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
> (EclipseAppLauncher.java:79)
>at org.eclipse.core.runtime.adaptor.EclipseStarter.run
> (EclipseStarter.java:386)
>at org.eclipse.core.runtime.adaptor.EclipseStarter.run
> (EclipseStarter.java:179)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>at java.lang.reflect.Method.invoke(Unknown Source)
>at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
>at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
>at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> >
>

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



[android-developers] SlidingDrawer issue #1?

2009-04-30 Thread Sheepz

when adding a slidingDrawer object to my application, i got this error
when trying to display it on the main.xml layout view
i used that view to create it as the bottommost component, and
immediatly got this message in the console window and the layout
stopped showing.
here is the exception:
java.lang.IllegalArgumentException: The handle attribute is required
and must refer to a valid child.
at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0
(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance
(Unknown
Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at android.view.LayoutInflater.createView(LayoutInflater.java:
499)
at android.view.BridgeInflater.onCreateView
(BridgeInflater.java:77)
at android.view.LayoutInflater.createViewFromTag
(LayoutInflater.java:
562)
at android.view.BridgeInflater.createViewFromTag
(BridgeInflater.java:
122)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:
617)
at android.view.LayoutInflater.inflate(LayoutInflater.java:
407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:
296)
at com.android.layoutlib.bridge.Bridge.computeLayout
(Bridge.java:371)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
(Unknown Source)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
(Unknown Source)
at com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor
$2.run
(Unknown Source)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:
35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages
(Display.java:
3800)
at org.eclipse.swt.widgets.Display.readAndDispatch
(Display.java:3425)
at org.eclipse.ui.internal.Workbench.runEventLoop
(Workbench.java:
2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:
2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:
2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault
(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench
(PlatformUI.java:
149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start
(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run
(EclipseAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:
549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] SlidingDoor issue #1?

2009-04-30 Thread Sheepz

when adding a slidingDrawer object to my application, i got this error
when trying to display it on the main.xml layout view
i used that view to create it as the bottommost component, and
immediatly got this message in the console window and the layout
stopped showing.
here is the exception:
java.lang.IllegalArgumentException: The handle attribute is required
and must refer to a valid child.
at android.widget.SlidingDrawer.(SlidingDrawer.java:203)
at android.widget.SlidingDrawer.(SlidingDrawer.java:180)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at android.view.LayoutInflater.createView(LayoutInflater.java:499)
at android.view.BridgeInflater.onCreateView(BridgeInflater.java:77)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:
562)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:
122)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:296)
at com.android.layoutlib.bridge.Bridge.computeLayout(Bridge.java:371)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
(Unknown Source)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
(Unknown Source)
at com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor$2.run
(Unknown Source)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:
3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at org.eclipse.core.databinding.observable.Realm.runWithDefault
(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start
(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run
(EclipseAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] OutOfMemoryError from BitmapFactory

2009-04-30 Thread Ward Willats

Thanks for these tips.

At 1:14 PM -0700 4/30/09, Streets Of Boston wrote:
>In my app, i've been dillegently 'unloading' bitmaps when i need
>memory.
>- clear any bitmap cache

I assume you mean any of my own bitmap caches...

>So far, this scheme has served me well. Before i got a lot of OOM-
>errors. Now i get a lot less. And, if i still get one, i try to
>handle it gracefully.

It still seems like Voodo to me. If I have to manually call 
setImageBitmap(null) it implies (to me) that the image view is not 
being released in the first place, which means the view hierarchy is 
not being released, even though I have called finish(). At the moment 
I am looking for static variables and leaked contexts

-- Ward

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



[android-developers] Re: How to run android widget example in emulator

2009-04-30 Thread Jeff Sharkey

svn checkout the source code from Google Code, import as an Eclipse
project, and launch.

j


On Thu, Apr 30, 2009 at 11:56 AM, Daniel Dreiberg
 wrote:
> Hi,
> Can you please tell me how can I deploy the widget example to my emulator?
>
> http://android-developers.blogspot.com/2009/04/introducing-home-screen-widgets-and.html
> Thank you.
>
> >
>



-- 
Jeff Sharkey
jshar...@google.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: Tap Outside Listener for Dialog

2009-04-30 Thread Jeff Sharkey

So Theme.Dialog Activities still receive onTouchEvent() calls, even
outside of their floating window area.  If you can grab the exact
window size, you could do the math to figure out if touches are
outside the window.

j


On Thu, Apr 30, 2009 at 11:46 AM, UBZack  wrote:
>
> Hi all,
>
> I was wondering if anyone knew of an event listener that receives "tap
> outside" events, that is, taps that happen outside the widget's
> physical boundaries, and could this listener be assigned to a dialog
> box (or for that matter, any visual window).  Here's what the code
> MIGHT look like to construct a Dialog with this functionality:
>
> AlertDialog.Builder(this)
> .setTitle("My dialog")
> .setMessage("This is my dialog")
> .setOnOutsideClickListener(new MyOnClickListener()) // <- does
> something like this exist?
> .create();
>
> Any help or insight anyone can give would be great.  I know that the
> menu currently supports taps outside of its boundaries, so I think
> this may be possible.
>
> Thank you!
>
> -UBZack
> >
>



-- 
Jeff Sharkey
jshar...@google.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: create an image "on the fly" and assign it to a button

2009-04-30 Thread guruk

ok, lets forget about drawable.

finaly can someone help with a small source:
  - create a small image / lets say two small dots with two colors.
  - set this image as background of a button.

than i am quit happy :)

thanks
chris


On Apr 3, 11:19 am, Peli  wrote:
> I guess what you are looking for is a "stateful drawable".
>
> Here is a sample 
> code:http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_...
>
> The drawable is an xml file, which says which png file should be used
> depending on whether thebuttonis pressed or not, selected, ...
>
> Probably someone else knows a better tutorial for stateful drawables?
>
> Peliwww.openintents.org
>
> On Apr 2, 11:01 pm, guruk  wrote:
>
>
>
> > a complete redesign... :) for sure always a nice idea.. just not
> > practical now.
>
> > #1 what you mean with view#setbackgroundcolor().. than I can just
> > change to on color...
> > thats how i already do.. or how do you mean... small example somewhere
> > would be helpful.
>
> > #2 come one.. i dont like to shoot with canons on birds .. there have
> > to be something more
> > simple
>
> > #3 ... thats what i am thinking about... to create a set of
> > backgrounds that include all options..
> > hmmm.. but for that i thought i find a more pro solution #1 sounds
> > best till now if someone
> > show me how to add a view on abutton.
>
> > still any small example is most welcome.. even if its lets say in the
> > api demo or any other
> > source...
>
> > whats about the idea from Dianne.. with the Bitmapdrawable.. i was
> > reading something they
> > are also stretchable.
>
> > also... thanks.. just for any support you already gave its a good
> > start :)
>
> > greets
> > chris
>
> > On Apr 2, 11:22 pm, "Mark Murphy"  wrote:
>
> > > > so any other ideas?
>
> > > Idea #1: use View#setBackgroundColor()
>
> > > Idea #2: switch to Canvas and 2D graphics, or OpenGL, or something with
> > > greater flexibility, instead of trying to work within the View hierarchy
>
> > > Idea #3: redesign your application to only need a handful of colors, and
> > > hand-create backgrounds for those, embedded as nine-patch drawables in
> > > your app
>
> > > --
> > > 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] paint individual button - please help!

2009-04-30 Thread guruk

hi,
i know i can set a drawable as background to a button.

but HOW can i for example:

create/paint a small image in the size of a button and
set this as the backgroundimage of that button?

please help.
just some lines how to create an image *for example just two different
dots*
and how to set this image as background for a button.

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

2009-04-30 Thread Streets Of Boston

In my app, i've been dillegently 'unloading' bitmaps when i need
memory.
I clear out as much as I can.

E.g. when a view becomes invisible (onPause) or just before you start
loading a big bitmap:
- do a setImageBitmap(null) (or similar methods, depending on which
class of View you're actually using) on these views
- clear any bitmap cache

I actually implemented a global 'bitmap memory notifier' to any
instance that may be interested in it. Instances can register with
this notifier as a listener. If some part of my code needs to create a
large bitmap, it calls this notifier which causes all listeners to get
notified and they can take action to clear out as much bitmap-memory
as possible (someBitmap.recycle(); someBitmap = null; clean caches;
etc.)

So far, this scheme has served me well. Before i got a lot of OOM-
errors. Now i get a lot less. And, if i still get one, i try to
handle it gracefully.

On Apr 30, 4:00 pm, Ward Willats  wrote:
> At 11:23 AM -0700 4/30/09, fadden wrote:
>
> >It's possible that it didn't actually jump back down.  The event log
> >shows results from all running processes, not just your app, so you
> >may be seeing output from other things mixed in.
>
> Ah, OK. Now I see a steady increase in my limit and allocs from 1.1
> up to about 10 MB when it crashes, and I've got another 3.5 in my
> regular heap -- still less than 16, but ok, -- so this makes sense,
> and I hope this thread is useful to others --> you can "leak" and
> look fine in ddms!
>
> But this means that the bitmaps for my startup animations, say, are
> never getting freed, as are the contents of previous screens. Now,
> none of this stuff is kept in static variables or anything (he said,
> though you can be sure he is going to check this yet again!)
>
> Is there a way to really really make these things get tossed? There
> ain't no recycle() on drawable (or animation I think)just
> bitmaps
>
> >(This is why the python script I posted yesterday shows the pid and 5-
> >char app id on each line.)
>
> I seem to have completely missed this post...
>
> Thanks
>
> -- Ward
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: NEW Gesture Recognition Application!

2009-04-30 Thread Michael Elsdörfer

 > check out our blog and demonstration video and comment to let us know
 > what you think.

I don't like having to click on a button (Call, SMS etc) after drawing 
the gesture. Instead, I'd like to see the app doing that by itself 
depending on where the gesture was defined.

Apart from that, where and when can I get it!? ;)

Michael

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



[android-developers] Re: android 1.5: How do we use the AudioTrack class?

2009-04-30 Thread blindfold

Has anybody had any success with OnPlaybackPositionUpdateListener? I'm
successfully playing one-second PCM sound clips with AudioTrack in
MODE_STATIC mode (although the playback often appears truncated), but
no matter what I do, onMarkerReached() is never called. I set
setNotificationMarkerPosition() to a position a bit less than my
sample count. I do not have any such problems with its MediaPlayer
counterpart setOnCompletionListener(). I simply want onMarkerReached()
to run when my AudioTrack instance has finished playing, but the
getPlayState() remains PLAYSTATE_PLAYING after my AudioTrack has
finished sounding. What might be wrong? What does it take to get
AudioTrack to run onMarkerReached() at the end of the data? Any
concrete sample code for this that works?

Another strange thing is that at the end of a one second sound at
sample rate 16000, getPlaybackHeadPosition() returns 16000 as
expected, but for a sample rate of 22050 getPlaybackHeadPosition()
becomes consistently 22016, for a sample rate of 11025
getPlaybackHeadPosition() becomes 11008, while for a sample rate of
8000 the getPlaybackHeadPosition() returns consistently 8000 again.
Are the discrepancies for sample rates of 11025 and 22050 due to
rounding inaccuracies in the AudioTrack sample rate divider?

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] OutOfMemoryError from BitmapFactory

2009-04-30 Thread Ward Willats

At 11:23 AM -0700 4/30/09, fadden wrote:
>It's possible that it didn't actually jump back down.  The event log
>shows results from all running processes, not just your app, so you
>may be seeing output from other things mixed in.

Ah, OK. Now I see a steady increase in my limit and allocs from 1.1 
up to about 10 MB when it crashes, and I've got another 3.5 in my 
regular heap -- still less than 16, but ok, -- so this makes sense, 
and I hope this thread is useful to others --> you can "leak" and 
look fine in ddms!

But this means that the bitmaps for my startup animations, say, are 
never getting freed, as are the contents of previous screens. Now, 
none of this stuff is kept in static variables or anything (he said, 
though you can be sure he is going to check this yet again!)

Is there a way to really really make these things get tossed? There 
ain't no recycle() on drawable (or animation I think)just 
bitmaps

>(This is why the python script I posted yesterday shows the pid and 5-
>char app id on each line.)

I seem to have completely missed this post...

Thanks

-- Ward

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



[android-developers] Re: Is there a way to define default attributes of a Widget as applicable the application in context

2009-04-30 Thread Jeff Sharkey

So with AppWidgets you can't rely on the android:theme, since it is
applied to an entire window, and home screens typically use one theme
for their entire window.

One way of implementing different styles is to have multiple layouts,
internally store the user's preference, and build each new
RemoteViews() using the desired layout.

j


On Thu, Apr 30, 2009 at 8:18 AM, Raja Nagendra Kumar
 wrote:
>
> Hi,
>
> Is there a way define widget default values in the context of an
> application.
>
> Does Theme and Style do the same thing..Any good starters document on
> Theme support.  Are there any good IDE's which help in building
> themes.
>
> Also are there any 3 rd party Themes available for purchase.
>
> Regards,
> Raja Nagendra Kumar,
> C.T.O
> www.tejasoft.com
> >
>



-- 
Jeff Sharkey
jshar...@google.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: Cupcake's bug ? Caused by: android.content.res.Resources

2009-04-30 Thread Jeff Sharkey

So the root cause is back in your XML code:

Caused by: android.content.res.Resources
$NotFoundException: Resource is not a Drawable (color or path):
TypedValue{t=0x2/d=0x1010059 a=-1}

Are you setting an android:background or android:src to something that
isn't a @drawable?

j


On Thu, Apr 30, 2009 at 3:11 AM, Karima  wrote:
>
> Hi,
>
> My application works fine but in adb logcat, I see a bug in your lib.
> Is it my fault ?
>
> Thanks, bye.
>
> I/ActivityManager(  568): Start proc com.orange.bagua for activity
> com.example/.ExampleActivity: pid=884 uid=10019 gids={}
> W/WindowManager(  568): Exception when adding starting window
> W/WindowManager(  568): android.view.InflateException: Binary XML file
> line #24: Error inflating class java.lang.reflect.Constructor
> W/WindowManager(  568):         at
> android.view.LayoutInflater.createView(LayoutInflater.java:512)
> W/WindowManager(  568):         at
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView
> (PhoneLayoutInflater.java:56)
> W/WindowManager(  568):         at
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> W/WindowManager(  568):         at android.view.LayoutInflater.inflate
> (LayoutInflater.java:385)
> W/WindowManager(  568):         at android.view.LayoutInflater.inflate
> (LayoutInflater.java:320)
> W/WindowManager(  568):         at android.view.LayoutInflater.inflate
> (LayoutInflater.java:276)
> W/WindowManager(  568):         at
> com.android.internal.policy.impl.PhoneWindow.generateLayoutPhoneWindow.jav
> a:2149)
> W/WindowManager(  568):         at
> com.android.internal.policy.impl.PhoneWindow.installDecor
> (PhoneWindow.java:2203)
> W/WindowManager(  568):         at
> com.android.internal.policy.impl.PhoneWindow.getDecorView
> (PhoneWindow.java:1442)
> W/WindowManager(  568):         at
> com.android.internal.policy.impl.PhoneWindowManager.addStartingWindow
> (PhoneWindowManager.java:648)
> W/WindowManager(  568):         at
> com.android.server.WindowManagerService$H.handleMessage
> (WindowManagerService.java:7092)
> W/WindowManager(  568):         at android.os.Handler.dispatchMessage
> (Handler.java:99)
> W/WindowManager(  568):         at android.os.Looper.loop(Looper.java:
> 123)
> W/WindowManager(  568):         at
> com.android.server.WindowManagerService$WMThread.run
> (WindowManagerService.java:440)
> W/WindowManager(  568): Caused by:
> java.lang.reflect.InvocationTargetException
> W/WindowManager(  568):         at android.widget.FrameLayout.
> (FrameLayout.java:79)
> W/WindowManager(  568):         at
> java.lang.reflect.Constructor.constructNative(Native Method)
> W/WindowManager(  568):         at
> java.lang.reflect.Constructor.newInstance(Constructor.java:446)
> W/WindowManager(  568):         at
> android.view.LayoutInflater.createView(LayoutInflater.java:499)
> W/WindowManager(  568):         ... 13 more
> W/WindowManager(  568): Caused by: android.content.res.Resources
> $NotFoundException: Resource is not a Drawable (color or path):
> TypedValue{t=0x2/d=0x1010059 a=-1}
> W/WindowManager(  568):         at
> android.content.res.Resources.loadDrawable(Resources.java:1609)
> W/WindowManager(  568):         at
> android.content.res.TypedArray.getDrawable(TypedArray.java:548)
> W/WindowManager(  568):         at android.widget.FrameLayout.
> (FrameLayout.java:91)
> W/WindowManager(  568):         ... 17 more
> D/AndroidRuntime(  877): Shutting down VM
> D/dalvikvm(  877): DestroyJavaVM waiting for non-daemon threads to
> exit
> D/dalvikvm(  877): DestroyJavaVM shutting VM down
> D/dalvikvm(  877): HeapWorker thread shutting down
> D/dalvikvm(  877): HeapWorker thread has shut down
> D/jdwp    (  877): JDWP shutting down net...
> D/jdwp    (  877): +++ peer disconnected
> I/dalvikvm(  877): Debugger has detached; object registry had 1
> entries
> D/dalvikvm(  877): VM cleaning up
> D/dalvikvm(  877): LinearAlloc 0x0 used 639228 of 4194304 (15%)
> I/jdwp    (  884): received file descriptor 10 from ADB
> W/InputManagerService(  568): Starting input on non-focused client
> com.android.internal.view.IInputMethodClien
> t$stub$pr...@436f1b98 (uid=10003 pid=611)
> I/ActivityManager(  568): Displayed activity
> com.example/.ExampleActivity: 815 ms
> >
>



-- 
Jeff Sharkey
jshar...@google.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] Instrumentation for Dialog's and alike

2009-04-30 Thread Rick

I've seen a few posts with no answer. Consider this scenario:

I use Android's InstrumentationTestCase to run functional testing
through a complex application with many activities and services
running.

Most of it works well, but if I invoke a menu item through the
instrumentation that creates a dialog - the only way I can access that
dialog is using the handset/emulator sendKey events.

It would be great to grab that dialog and confirm it or verify the
text and options.

I've looked through many places but seems no one has an answer for
this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to run android widget example in emulator

2009-04-30 Thread Daniel Dreiberg
Hi,
Can you please tell me how can I deploy the widget example to my emulator?

http://android-developers.blogspot.com/2009/04/introducing-home-screen-widgets-and.html

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: MediaPlayer State

2009-04-30 Thread Tom Gibara
>
> Define 'meaningful'.
>

In this context: process state is "meaningful" to me if its exposed in a
form that I can reason about competently.
I would find it easier to reason about the state of the media player as
exposed by the type of API I described above than that exposed by the API at
present.

This is obviously a 'self-centric' definition - I would struggle to define
meaningfulness more broadly/inclusively.

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



[android-developers] Tap Outside Listener for Dialog

2009-04-30 Thread UBZack

Hi all,

I was wondering if anyone knew of an event listener that receives "tap
outside" events, that is, taps that happen outside the widget's
physical boundaries, and could this listener be assigned to a dialog
box (or for that matter, any visual window).  Here's what the code
MIGHT look like to construct a Dialog with this functionality:

AlertDialog.Builder(this)
.setTitle("My dialog")
.setMessage("This is my dialog")
.setOnOutsideClickListener(new MyOnClickListener()) // <- does
something like this exist?
.create();

Any help or insight anyone can give would be great.  I know that the
menu currently supports taps outside of its boundaries, so I think
this may be possible.

Thank you!

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

2009-04-30 Thread Teo
Hi, thanks for the response - fixed it in the meanwhile. Apparently it was
something of this sort, i just tried adb kill-server and everything worked
like a charm :)

On Thu, Apr 30, 2009 at 9:26 PM, havexz  wrote:

>
> One small question which platform you running on windows/linux? And by
> any chance there are two instances of the emulator running? One is
> visible and other is running in the background. That can also cause
> this issue.
>
> On Apr 30, 12:34 pm, Teo  wrote:
> > Apparently the emulator can't attach itself to the adb tool too...
> >
> > On Apr 30, 4:06 pm, Teo  wrote:
> >
> >
> >
> > > Hi,
> >
> > > is anyone else having trouble with the new app running 'system'? My
> > > emulator just ignores them, can't launch any app. Changed the project
> > > build target to 1.5 and made sure my AVD is 1.5 too.
> >
> > > If i run once, when the emulator isn't started, after it starts it has
> > > no error message (and does nothing). Then, every time i try to run the
> > > app it says "emulator: ERROR: the user data image is used by another
> > > emulator. aborting". I'm sure i must be doing something wrong, but i
> > > can't figure it out :) Any help is appreciated...
> >
> > > Thanks,
> > > Teo- Hide quoted text -
> >
> > - Show quoted text -
> >
>


-- 
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: Trouble migrating apps to 1.5

2009-04-30 Thread havexz

One small question which platform you running on windows/linux? And by
any chance there are two instances of the emulator running? One is
visible and other is running in the background. That can also cause
this issue.

On Apr 30, 12:34 pm, Teo  wrote:
> Apparently the emulator can't attach itself to the adb tool too...
>
> On Apr 30, 4:06 pm, Teo  wrote:
>
>
>
> > Hi,
>
> > is anyone else having trouble with the new app running 'system'? My
> > emulator just ignores them, can't launch any app. Changed the project
> > build target to 1.5 and made sure my AVD is 1.5 too.
>
> > If i run once, when the emulator isn't started, after it starts it has
> > no error message (and does nothing). Then, every time i try to run the
> > app it says "emulator: ERROR: the user data image is used by another
> > emulator. aborting". I'm sure i must be doing something wrong, but i
> > can't figure it out :) Any help is appreciated...
>
> > Thanks,
> > Teo- 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: App widgets and remote views

2009-04-30 Thread Tom Gibara
There's no way of applying an animation to the views within a remote view
because you're constrained to what you can declare in the layout XML and the
actions RemoteViews provides for. Neither of these provide for setting
animations.

> AppWidgetHostView, RemoteViews's apply() , reapply()
>

These are only relevant to process which is displaying the app widget, not
the process that is supplying it.

Tom.

2009/4/30 shleeforandroid 

>
> Hi Tom
>
> I have some questions about the RemoteViews functionality.
> I want to know that it is possible to implement animation effect with
> AppWidget using RemoteViews object.
>
> On the Service routine, I've created RemoteViews object but I can't
> find any method to relate animation.
>
> I doubt some way to use AppWidgetHostView, RemoteViews's apply() ,
> reapply() methods.
> I'll appreciate a few hints to do. Any Idea?
>
> Thanks
> shlee
>
> On 4월22일, 오전4시17분, Tom Gibara  wrote:
> > It's an intentional limitation. Only views that are implemented by the
> > framework can be used, and only those that are annotated as safe for
> > remoting.
> > I don't know if there is a list provided in the SDK docs, but as of 1.5
> the
> > supported Views are:
> >
> > AbsoluteLayout
> > AnalogClock
> > Button
> > Chronometer
> > FrameLayout
> > ImageButton
> > ImageView
> > LinearLayout
> > ProgressBar
> > RelativeLayout
> > TextView
> >
> > Tom
> >
> > 2009/4/21 Joel 
> >
> >
> >
> >
> >
> > > I'm excited about the app widget functionality, and I've been playing
> > > with it for a bit.  I love the idea that downloadable apps can
> > > customize the home screen with arbitrary data.
> >
> > > Is it possible to create my own custom views and use them inside of an
> > > app widget?  For instance, if I wanted to have MyView (which extends
> > > View) and use it in my layout, would that be possible?  I tried to do
> > > this, but ran into an InflateException that was thrown as a result of
> > > a ClassNotFoundException.  I wasn't sure if this was a result of some
> > > coding error on my part or if this was an intentional limitation of
> > > the framework.
> >
> > > Joel- 따온 텍스트 숨기기 -
> >
> > - 따온 텍스트 보기 -
> >
>

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

2009-04-30 Thread Marco Nelissen
On Thu, Apr 30, 2009 at 10:50 AM, Tom Gibara  wrote:

> That's only a cosmetic change though. Instead of calling, say, prepare()
>> and it throwing an exception, you now have it return some token that tells
>> you whether or not it succeeded.
>>
>
> That's only a cosmetic change if you think that throwing an exception is a
> first-class way of returning state; not to mention the performance
> implications.
>
> It doesn't really give you any extra functionality or information.
>>
>
> What it gives you is a meaningful way of managing the knowable state of the
> media player within client code.
>

Define 'meaningful'. Those states that are knowable, you can already know
about with the current API. Those states that the MediaPlayer might
transition to on its own, the API you suggested isn't going to help with
either.

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

2009-04-30 Thread fadden

On Apr 30, 8:23 am, Ward Willats  wrote:
> But lordy, how in the heck does that thing jump from 1 MB to 11 MB
> and back down again?? I surely don't have anything anywhere near that
> size that I am aware of!

It's possible that it didn't actually jump back down.  The event log
shows results from all running processes, not just your app, so you
may be seeing output from other things mixed in.  The 11.4MB may be
the last thing it did before it crashed, and the other entries showed
up after the phone returned to the launcher.

(This is why the python script I posted yesterday shows the pid and 5-
char app id on each line.)

You can insert a "grep" for your pid between the logcat and the gawk,
or modify your awk script to show the pid as well.

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



[android-developers] design Q: persisting activity state

2009-04-30 Thread Eric Hackborn EH

I have a simple app that has three windows, each with a corresponding
activity.  It's very common to switch back and forth between activities,
but of course state gets wiped out of the top-most activity when the
user has finished with it, and I want that state to persist.  So I have
two questions:

1.  Currently, I'm persisting the state by saving it to the MODE_PRIVATE
SharedPreferences in onStop(), then restoring it in onCreate().
Is this acceptable, or is there a better way to handle it?

2.  If it is acceptable, a side effect is that the state now persists
between app invocations.  Personally I like this, but I haven't
seen any guidelines for Android on whether minor settings
should persist past the life of the app.  Is this a good practice
for Android or not?

thanks,
eric

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Eclipse + cupcake + other android projects in build path = VerifyError

2009-04-30 Thread Guillaume Perrot
This sounds like a great workaround, so I'll try that next week.
Thanks for the tip.

2009/4/30 JMoger 

>
> I've got a working solution to this similar to your hint about J2SE
> projects.  Assuming your lib project is an android project, modify
> the .project file to remove all Android builders and Android natures.
> I removed the "resourcemanagerbuilder", "precompilerbuilder",
> "apkbuilder", and "androidnature".  My lib project does not have any
> resources so I don't know what happens in that situation; its just my
> android code common to multiple projects.
>
> The .classpath file remains unchanged:
>
> 
>
>
> path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
>
> 
>
> This allows the project to compile against the Android library
> specified by the new "default.properties" file without manually
> specifying the android.jar and your dependent applications projects
> still compile in Eclipse and generate proper APKs.
>
> This is still less than ideal, but it has allowed me to get back on
> track.  YMMV.
>
> -J
>
> >
>

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



[android-developers] Re: MediaPlayer State

2009-04-30 Thread Tom Gibara
>
> That's only a cosmetic change though. Instead of calling, say, prepare()
> and it throwing an exception, you now have it return some token that tells
> you whether or not it succeeded.
>

That's only a cosmetic change if you think that throwing an exception is a
first-class way of returning state; not to mention the performance
implications.

It doesn't really give you any extra functionality or information.
>

What it gives you is a meaningful way of managing the knowable state of the
media player within client code.

Tom.

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

2009-04-30 Thread westmeadboy

On Apr 30, 10:10 pm, Marco Nelissen  wrote:
> It might make it easier for you to retrieve an unreliable bit of
> information, but you would still have to deal with all the same exceptions
> and other errors that you can run in to now, precisely because the state
> information is unreliable.

Yes, I know - this point about unreliable information was something
you brought up to justify not exposing the state - its not the
original point of this thread which is to do with the difficulty of
having the client-code keeping track of what it thinks the state
probably is.

> In some cases, it's not a
> problem to ensure that MediaPlayer is in a certain state. For example, if
> you call prepare(), and it succeeds, then MediaPlayer is in the 'prepared'
> state, and it won't suddenly 'unprepare' itself. In other cases, in
> particular once you've started playback, it's not so clear cut. For example,
> once you call start(), MediaPlayer will transition to the 'playing' state,
> but it can drop out of that state at any time, for a number of reasons (such
> as an error during playback, or reaching the end of the file).

Yes, I mentioned all this earlier when I said "the only ones I really
need to check for are PlaybackCompleted and Error".

By the way, its extremely bad practice to use exceptions for normal
flow control. The "unreliable" situations you describe can be seen as
exceptional circumstances. The API at the moment is almost encouraging
the client code to use this anti-pattern.

On Apr 30, 10:24 pm, Marco Nelissen  wrote:
> > 1. setState() is like a generic method call used in place of methods
> > like prepare(), pause(), start(), stop() etc.
> > 2. This method returns the new state rather than triggering the error
> > listener.
>
> 3. I suppose setStateAsync() would not return anything, but would
>
> > potentially trigger a state change event.
> > 3. The state change listener is there to inform client code of state
> > changes not caused by calls to setState(). So maybe an
> > OnStateAsyncChangedListener.
>
> That's only a cosmetic change though. Instead of calling, say, prepare() and
> it throwing an exception, you now have it return some token that tells you
> whether or not it succeeded. It doesn't really give you any extra
> functionality or information.

True, there's not any new functionality - its just a much easier API
to deal with. All of this can be achieved by "decorating" the
MediaPlayer - but that in itself is messy.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Trouble migrating apps to 1.5

2009-04-30 Thread Teo

Apparently the emulator can't attach itself to the adb tool too...

On Apr 30, 4:06 pm, Teo  wrote:
> Hi,
>
> is anyone else having trouble with the new app running 'system'? My
> emulator just ignores them, can't launch any app. Changed the project
> build target to 1.5 and made sure my AVD is 1.5 too.
>
> If i run once, when the emulator isn't started, after it starts it has
> no error message (and does nothing). Then, every time i try to run the
> app it says "emulator: ERROR: the user data image is used by another
> emulator. aborting". I'm sure i must be doing something wrong, but i
> can't figure it out :) Any help is appreciated...
>
> 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
-~--~~~~--~~--~--~---



  1   2   >