Re: [android-developers] Re: Cannot compile Desk Alarm Clock (branch eclair ver 2.1)

2010-12-31 Thread Dianne Hackborn
On Mon, Dec 27, 2010 at 3:40 AM, Bob Kerns r...@acm.org wrote:

 Indeed. This is called eating your own dogfood, and it's a highly
 valuable part of creating a high-quality product.


Crappy Android has been improving over the last year as work has been done
to update the various apps to use various final SDK APIs that weren't
available when they were first written.

This is often a fair amount of work, and means desired features or bug fixes
can't be done, so sometimes it is slow going.

If it is something you feel strongly about, many app developers would
probably be happy to review contributions.

Btw you can determine if an app is building against the public SDK by
looking for LOCAL_SDK_VERSION in its Android.mk.  A quick scan of
Gingerbread shows that these app build against the public SDK:

Calculator, Camera, DeskClock, Gallery3D, Mms, Music, Protips,
QuickSearchBox, Tag, and LatinIME.

For the original poster -- DeskClock is the new AlarmClock.  The AlarmClock
code has not been used since at least 2.2.

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

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

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

Re: [android-developers] Re: Cannot compile Desk Alarm Clock (branch eclair ver 2.1)

2010-12-31 Thread Dianne Hackborn
On Fri, Dec 31, 2010 at 12:14 PM, Dianne Hackborn hack...@android.comwrote:

 Calculator, Camera, DeskClock, Gallery3D, Mms, Music, Protips,
 QuickSearchBox, Tag, and LatinIME.


(And it looks like Email may be joining this illustrious list for
Honeycomb.)

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

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

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

[android-developers] Re: Screen Rotation

2010-12-31 Thread Robert
Yes, I agree and even said in my original post that I was working to
understand how to make that work correctly.  Still would be interested
to know why the manifest entry doesn't seem to be working as
documented.

On Dec 31, 12:55 pm, TreKing treking...@gmail.com wrote:
 On Fri, Dec 31, 2010 at 11:48 AM, Robert rcope...@gmail.com wrote:
  The reason I want to do this is that the app is accessing a webserver via
  an AsyncTask and I'd like to stop the restart until I can figure out how to
  link the background task to the new pid that is created. I've read some
  pages on it but not yet clear how to do that.

 Quoting the docs for that property:

 *Note:* Using this attribute should be avoided and used only as a
 last-resort. Please read Handling Runtime
 Changeshttp://developer.android.com/guide/topics/resources/runtime-changes.html
 for
 more information about how to properly handle a restart due to a
 configuration change.

 I highly recommend you spend the time figuring out how to do this correctly
 then wasting time on a hack that will cause other problems.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


Re: [android-developers] getting a click event on an activity

2010-12-31 Thread TreKing
On Fri, Dec 31, 2010 at 1:40 PM, dashman erjdri...@gmail.com wrote:

 i'm displaying a splash screen Activity and want to wait for the user the
 click/press on the screen before proceeding.

 how can i do this.


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

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: the new eclipse UI design - absolute frustration and waste of time

2010-12-31 Thread Bob Kerns
Actually, I find the huge properties menu to be an improvement over
the old properties view (which is still available, BTW).

The Attributes you can't seem to control thing is definitely a
problem.

For example, with a relative layout, depositing an item to be below
another, you can't just get below, you also get one or both sides
aligned. But what I really want is to align the side to the parent
view. I haven't found any way to do that. You can't get below alone,
and once it's attached to the one above, you can't attach it to the
parent without losing the connection to the one above.

I do find it saves time in the very initial setup of a screen, or if
I'm just tweaking a property here or there. But at the moment, if I
try to do more than a limited set of things with it, I end up wasting
my time.

I do think it's going in the right direction -- and I look forward to
its arrival!

On Dec 31, 8:23 am, John Lussmyer johnlussm...@gmail.com wrote:
 I've used the NetBeans and MyEclipse GUI editors extensively.  They are very
 nice.
 The Android thing in Eclipse is pretty much a waste of time.  Bizarre things
 happen when you try to drag controls or layouts in.  Items end up in totally
 unexpected places, with attributes that you can't seem to control.  The huge
 properties menu isn't very helpful either.

 After just a few minutes of attempting to use the GUI editor, I gave up and
 just edited the XML directly.  Much easier, quicker, and with better control
 of what you get.  I don't even bother previewing my layouts with the GUI
 editor, as it frequently leaves out controls entirely.







 On Thu, Dec 30, 2010 at 6:15 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
  Totally agree.  If you use XML, you will actually understand what's
  going on instead of relying on a GUI editor to do the work for you.

  Personally, in over a year and a half of using Eclipse, I've yet to
  drag and drop a single control with the editor.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Small, Normal, Large and xlarge. How to handle application?

2010-12-31 Thread Moto
Thanks! I'll look over that blog.

-Moto

On Dec 18, 10:41 am, pk Lam newbal...@gmail.com wrote:
 have a look at the following blog post, you might get some 
 idea:http://blog.alsutton.com/2010/12/07/android-tablet-phone-uis-in-one-a...

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


Re: [android-developers] Re: the new eclipse UI design - absolute frustration and waste of time

2010-12-31 Thread Julian
I think the adt is going backwards, the GUI designer is a waste of time,
drag and drop  just does not work properly, we just need the up and down
arrows back!

2010/12/31 Bob Kerns r...@acm.org

 Actually, I find the huge properties menu to be an improvement over
 the old properties view (which is still available, BTW).

 The Attributes you can't seem to control thing is definitely a
 problem.

 For example, with a relative layout, depositing an item to be below
 another, you can't just get below, you also get one or both sides
 aligned. But what I really want is to align the side to the parent
 view. I haven't found any way to do that. You can't get below alone,
 and once it's attached to the one above, you can't attach it to the
 parent without losing the connection to the one above.

 I do find it saves time in the very initial setup of a screen, or if
 I'm just tweaking a property here or there. But at the moment, if I
 try to do more than a limited set of things with it, I end up wasting
 my time.

 I do think it's going in the right direction -- and I look forward to
 its arrival!

 On Dec 31, 8:23 am, John Lussmyer johnlussm...@gmail.com wrote:
  I've used the NetBeans and MyEclipse GUI editors extensively.  They are
 very
  nice.
  The Android thing in Eclipse is pretty much a waste of time.  Bizarre
 things
  happen when you try to drag controls or layouts in.  Items end up in
 totally
  unexpected places, with attributes that you can't seem to control.  The
 huge
  properties menu isn't very helpful either.
 
  After just a few minutes of attempting to use the GUI editor, I gave up
 and
  just edited the XML directly.  Much easier, quicker, and with better
 control
  of what you get.  I don't even bother previewing my layouts with the GUI
  editor, as it frequently leaves out controls entirely.
 
 
 
 
 
 
 
  On Thu, Dec 30, 2010 at 6:15 PM, Zsolt Vasvari zvasv...@gmail.com
 wrote:
   Totally agree.  If you use XML, you will actually understand what's
   going on instead of relying on a GUI editor to do the work for you.
 
   Personally, in over a year and a half of using Eclipse, I've yet to
   drag and drop a single control with the editor.

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


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

[android-developers] Re: making Toast like notification?

2010-12-31 Thread Karim B
Yeah I have got that far which is not bad but the ability to change 
animation, duration is what I'm really after... but yeah thanks guys I guess 
I will just have to avoid this and using the notification bar then...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Running adb logcat and dmesg commands from within my app.

2010-12-31 Thread Jay
I started reading that, but it still doesn't complete sense. Are there
any other more descriptive documents on this out there?

On Dec 30, 7:33 pm, jotobjects jotobje...@gmail.com wrote:
 You get an InputStream from the Process returned by the exec call.
 Read and study the javadoc for java.lang.Runtime an java.lang.Process.

 On Dec 30, 3:14 pm, Jay j.gato...@gmail.com wrote:

  I also want to be able to run commands like 'ls' and 'cat'

  On Dec 30, 5:09 pm, Jay j.gato...@gmail.com wrote:

   Hello,

   Here's what I'm trying to accomplish: I want to be able to show dmesg
   logs and logcat output in an app I'm writing. I know that I'm supposed
   to use Runtime.getRuntime().exec(), however other than that, I'm
   pretty lost. I tried to find some examples, but couldn't.

   Can someone here give me some information on how to do this? Maybe
   point me to some example code. Aside from doing the following in my
   code:

   Runtime.getRuntime().exec(dmesg);

   or

   Runtime.getRuntime().exec(logcat);

   I'm not sure what else to do to be able to read dmesg and logcat
   outputs.

   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: Issue with messages in this group?

2010-12-31 Thread Gus
Hi:

Yes, I 'm using the Web Browser, and I noticed some posts showed up,
and dissapeared after a while.

Thanks for confirming this..Now I know I'm not crazy!

Gus

On Dec 31, 9:30 am, TreKing treking...@gmail.com wrote:
 On Wed, Dec 29, 2010 at 7:13 AM, Gus gussab...@yahoo.com wrote:
  Are some messages deleted or they just dissapear?

 Are you using the web interface? Because it sucks and randomly eats
 posts.I've not been able to find some posts even when searching by exact
 title. Use Gmail.

 ---­--
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


[android-developers] using getSurfaceFrame to get display width/height?

2010-12-31 Thread Daniel Quach
So I'm trying out making a live wallpaper and I'm using the sample
code provided in the SDK for the cube live wallpaper

I wanted to use this code to get the height/width of the display


@Override
public void onCreate(SurfaceHolder surfaceHolder) {
  super.onCreate(surfaceHolder);

  Rect frame = getSurfaceHolder().getSurfaceFrame();
  float width = frame.width();
  float height = frame.height();
  // By default, we don't get touch events, so enable them.
  setTouchEventsEnabled(true);
}

Unfortunately, when I run this code, the width and height return as 0,
though if I put this in onVisibilityChanged, the correct values are
returned, why is this and is it suitable to move the code to
onVisibilityChanged?

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

2010-12-31 Thread Mystique
Happy New Year TreKing :)

Right, I did try using table but the column will be stretch if the
text is longer than the image.
Is it suppose to work this way? or it is possible to wrap the longer
text to 2nd line?

I am now thinking whether there are ways to dynamically take the
screen measurement and draw during run time.
@@

On Jan 1, 12:13 am, TreKing treking...@gmail.com wrote:
 On Fri, Dec 31, 2010 at 2:52 AM, Mystique joven.ch...@gmail.com wrote:
  Any code example to do this layout for both portrait and
  landscape orientation?

 The likelihood of finding code examples that perfectly solve the particular
 layout problem you are having at any given time is pretty much zero.

 However, this is a pretty simple layout. Looks a like a two-row, two-column
 table, with each cell containing a centered vertical linear layout with an
 image and text. Then play with the padding and margins until it meets your
 needs.

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


[android-developers] Virtual screen size

2010-12-31 Thread Pedro Duque
When developing a live wallpaper how can I get the virtual screen size? How
can I know in which virtual screen the user is in?

Thanks,
PMD

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

2010-12-31 Thread Bob Kerns
HOW do you know you're not crazy? I'm missing a step in the logic
here... :=)

Seriously, it's really a shame Google uses what I'd argue is their
worst product to support Android this way.

It's too bad this isn't a Wave, perhaps Wave would have gained some
traction. (Though I suspect it wouldn't have scaled to this sort of
usage).

But most any forum software would be superior to this.

On Dec 31, 3:15 pm, Gus gussab...@yahoo.com wrote:
 Hi:

 Yes, I 'm using the Web Browser, and I noticed some posts showed up,
 and dissapeared after a while.

 Thanks for confirming this..Now I know I'm not crazy!

 Gus

 On Dec 31, 9:30 am, TreKing treking...@gmail.com wrote:







  On Wed, Dec 29, 2010 at 7:13 AM, Gus gussab...@yahoo.com wrote:
   Are some messages deleted or they just dissapear?

  Are you using the web interface? Because it sucks and randomly eats
  posts.I've not been able to find some posts even when searching by exact
  title. Use Gmail.

  --- 
  ­--
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

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


[android-developers] Re: the new eclipse UI design - absolute frustration and waste of time

2010-12-31 Thread Bob Kerns
Then check out the ADT 9.0 Preview 2, which has improvements to drag
and drop, and up and down arrows:

http://tools.android.com/recent

On Dec 31, 1:29 pm, Julian cacif...@gmail.com wrote:
 I think the adt is going backwards, the GUI designer is a waste of time,
 drag and drop  just does not work properly, we just need the up and down
 arrows back!

 2010/12/31 Bob Kerns r...@acm.org







  Actually, I find the huge properties menu to be an improvement over
  the old properties view (which is still available, BTW).

  The Attributes you can't seem to control thing is definitely a
  problem.

  For example, with a relative layout, depositing an item to be below
  another, you can't just get below, you also get one or both sides
  aligned. But what I really want is to align the side to the parent
  view. I haven't found any way to do that. You can't get below alone,
  and once it's attached to the one above, you can't attach it to the
  parent without losing the connection to the one above.

  I do find it saves time in the very initial setup of a screen, or if
  I'm just tweaking a property here or there. But at the moment, if I
  try to do more than a limited set of things with it, I end up wasting
  my time.

  I do think it's going in the right direction -- and I look forward to
  its arrival!

  On Dec 31, 8:23 am, John Lussmyer johnlussm...@gmail.com wrote:
   I've used the NetBeans and MyEclipse GUI editors extensively.  They are
  very
   nice.
   The Android thing in Eclipse is pretty much a waste of time.  Bizarre
  things
   happen when you try to drag controls or layouts in.  Items end up in
  totally
   unexpected places, with attributes that you can't seem to control.  The
  huge
   properties menu isn't very helpful either.

   After just a few minutes of attempting to use the GUI editor, I gave up
  and
   just edited the XML directly.  Much easier, quicker, and with better
  control
   of what you get.  I don't even bother previewing my layouts with the GUI
   editor, as it frequently leaves out controls entirely.

   On Thu, Dec 30, 2010 at 6:15 PM, Zsolt Vasvari zvasv...@gmail.com
  wrote:
Totally agree.  If you use XML, you will actually understand what's
going on instead of relying on a GUI editor to do the work for you.

Personally, in over a year and a half of using Eclipse, I've yet to
drag and drop a single control with the editor.

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

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


[android-developers] Re: Cannot compile Desk Alarm Clock (branch eclair ver 2.1)

2010-12-31 Thread Bob Kerns
Excellent! There's no question it's hard work, and there's no doubt it
does compete with this or that feature.

But I'm confident it will pay off in quality -- and quality, in the
end, saves you time.

On Dec 31, 12:16 pm, Dianne Hackborn hack...@android.com wrote:
 On Fri, Dec 31, 2010 at 12:14 PM, Dianne Hackborn hack...@android.comwrote:

  Calculator, Camera, DeskClock, Gallery3D, Mms, Music, Protips,
  QuickSearchBox, Tag, and LatinIME.

 (And it looks like Email may be joining this illustrious list for
 Honeycomb.)

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

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

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


[android-developers] Re: app security

2010-12-31 Thread Bob Kerns
This isn't really an Android issue. Anyone who gives out credentials
for any purpose needs to consider that they may be compromised.

The usual ways of dealing with it are to time-limit them, and to allow
them to be revoked.

But what I think REALLY should be done, is to issue credentials with
two components, one revocable by the issuer, and one revocable by the
recipient.

So, on losing your phone, you go to a website, and invalidate all the
credentials that were associated with the phone.

This wouldn't deny you access, just force you to go through the re-
credentialing process for each affected entity, using a reissued
token.

You could see extending this to three components, so a company with
accounts with Salesforce.com and similar things, could revoke access
for a terminated employee, for example. In this case, the access token
would not be reissued.

On Dec 31, 10:58 am, Dianne Hackborn hack...@android.com wrote:
 On Fri, Dec 31, 2010 at 6:15 AM, jacek jacek.ambroz...@gmail.com wrote:
  So -- how about getting credentials from the Cloud (over SSL)
  and hiding in AccountManager's Account?

 Though again, this hasn't protected you, just made it harder.  Your data is
 still there on the device, for someone with root access to find and
 retrieve.

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


[android-developers] Licensing Verification Library and Demo versions

2010-12-31 Thread John Lussmyer
Is there a relatively easy/good way to have an app that uses LVL, also have
a Demo version?
It appears that I have to change the Package Name to do this - which changes
the Resource file name - so nothing compiles unless I go change the import
statement in all my files.
Note that I am working from within Eclipse.

Should I make my entire app an Android Library?  and just have 2 nearly
empty skeleton projects to build it? (Free and Paid versions)

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

Re: [android-developers] Re: How to do this kind of screen alignment?

2010-12-31 Thread TreKing
On Fri, Dec 31, 2010 at 6:24 PM, Mystique joven.ch...@gmail.com wrote:

 Happy New Year TreKing :)


An a happy one to you :)


 Right, I did try using table but the column will be stretch if the text is
 longer than the image.
 Is it suppose to work this way?


By default, yes. It will just try to expand the columns to fit it's
contents. Try using weights and the shrinkable / expandable properties to
control the column widths.


 I am now thinking whether there are ways to dynamically take the screen
 measurement and draw during run time.


There's rarely good reason to deal directly with screen measurements.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Virtual screen size

2010-12-31 Thread Pedro Duque
Let me develop on this subject:

I've develop a Live Wallpaper that was working perfectly in Android 2.1. It
emulate the standard Android wallpaper by having a bitmap scrolling when a
user changes screen.

To achieve that effect I use the event onOffsetsChanged to detect screen
changes when the user swipes left and right.

I just installed Android 2.2.1 and now the values returned in onOffsetsChanged
for xPixelOffset and yPixelOffset are always 0. The value for xOffset
and yOffset
do return values from 0 to 1 but because
WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() and
WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() now return
the screen physical size instead of the screen virtual size, I have now way
to calculate how much that percentage represent in terms of actual
displacement.

I know it's possible to achieve the desired result because the packed
wallpaper has that behaviour.

Can somebody help? Is this a problem with Samsung Galaxy S implementation or
is this a standard behaviour?

Thanks,
Pedro Duque

On 1 January 2011 02:05, Pedro Duque pmdu...@gmail.com wrote:

 When developing a live wallpaper how can I get the virtual screen size? How
 can I know in which virtual screen the user is in?

 Thanks,
 PMD


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

Re: [android-developers] Licensing Verification Library and Demo versions

2010-12-31 Thread TreKing
On Fri, Dec 31, 2010 at 9:01 PM, John Lussmyer johnlussm...@gmail.comwrote:

 hould I make my entire app an Android Library?  and just have 2 nearly
 empty skeleton projects to build it? (Free and Paid versions)


Pretty much.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Virtual screen size

2010-12-31 Thread TreKing
On Fri, Dec 31, 2010 at 11:42 PM, Pedro Duque pmdu...@gmail.com wrote:

 Is this a problem with Samsung Galaxy S implementation or is this a
 standard behaviour?


Did you test it on the emulator?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Database Database Database

2010-12-31 Thread Abhishek Talwar
Hey guys
I have simple 2 button screen which are Create Item and List'
These two have been linked to other activities with intent.
Now in create.java class i have 2 fields name and description and a
save button.
So that when the user clicks save button the data must get saved but
it is giving me a force close error.

This is my error message

No command output when running: 'am start -n org.finaldatabase/
org.finaldatabase.finaldatabase -a android.intent.action.MAIN -c
android.intent.category.LAUNCHER' on device emulator-5554

Exception Stack Trace

com.android.ddmlib.ShellCommandUnresponsiveException
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:
408)
at com.android.ddmlib.Device.executeShellCommand(Device.java:277)
at
com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchApp(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.simpleLaunch(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.access
$3(Unknown Source)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController
$3.run(Unknown Source)


Please let me know if you want to have a look at the code also.
There must be a silly mistake which i cant catch but i want to clear
this doubt .

Happy New 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] Which Intent flag should I use?

2010-12-31 Thread Zsolt Vasvari
This is part of my ongoing effort to tidy up my AppWidget code:

When a user clicks on my Widget, it goes to an Activity deep in my
app.  When the user finishes this activity, I'd like to exit back to
the Launcher as opposed to whatever the last Activity on the stack is
for my app.

Is there an Intent flag I am not using correctly?  I tried all the
ones I could see to be relevant, but nothing worked.  I know I could
probably pass result codes back up the stack to wind down my app, but
that's some ugly stuff.  Is there an easier way?

Happy New Year everyone!

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


Re: [android-developers] Which Intent flag should I use?

2010-12-31 Thread Dianne Hackborn
Do you really want this to be deep in your app?  If you want finishing to go
back to the launcher, it sounds like this should be done as a separate task
than the main app task.  If that is the case, don't use special Intent
flags, just set android:taskAffinity= for this activity.  (Or give it a
scoped name for the affinity if multiple activities are going to
inter-operate in the same task.)

On Fri, Dec 31, 2010 at 10:26 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 This is part of my ongoing effort to tidy up my AppWidget code:

 When a user clicks on my Widget, it goes to an Activity deep in my
 app.  When the user finishes this activity, I'd like to exit back to
 the Launcher as opposed to whatever the last Activity on the stack is
 for my app.

 Is there an Intent flag I am not using correctly?  I tried all the
 ones I could see to be relevant, but nothing worked.  I know I could
 probably pass result codes back up the stack to wind down my app, but
 that's some ugly stuff.  Is there an easier way?

 Happy New Year everyone!

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




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

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

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

Re: [android-developers] Re: Virtual screen size

2010-12-31 Thread Dianne Hackborn
It is up to the launcher to decide how much parallax scrolling to do.  The
sizes and offsets come from whatever the last launcher app set them to be.

On Fri, Dec 31, 2010 at 9:42 PM, Pedro Duque pmdu...@gmail.com wrote:

 Let me develop on this subject:

 I've develop a Live Wallpaper that was working perfectly in Android 2.1. It
 emulate the standard Android wallpaper by having a bitmap scrolling when a
 user changes screen.

 To achieve that effect I use the event onOffsetsChanged to detect screen
 changes when the user swipes left and right.

 I just installed Android 2.2.1 and now the values returned in onOffsetsChanged
 for xPixelOffset and yPixelOffset are always 0. The value for xOffset and 
 yOffset
 do return values from 0 to 1 but because
 WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() and
 WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() now
 return the screen physical size instead of the screen virtual size, I have
 now way to calculate how much that percentage represent in terms of actual
 displacement.

 I know it's possible to achieve the desired result because the packed
 wallpaper has that behaviour.

 Can somebody help? Is this a problem with Samsung Galaxy S implementation
 or is this a standard behaviour?

 Thanks,
 Pedro Duque

 On 1 January 2011 02:05, Pedro Duque pmdu...@gmail.com wrote:

 When developing a live wallpaper how can I get the virtual screen size?
 How can I know in which virtual screen the user is in?

 Thanks,
 PMD


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




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

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

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

[android-developers] Re: Which Intent flag should I use?

2010-12-31 Thread Zsolt Vasvari
Ok, thanks.

On Jan 1, 2:33 pm, Dianne Hackborn hack...@android.com wrote:
 Do you really want this to be deep in your app?  If you want finishing to go
 back to the launcher, it sounds like this should be done as a separate task
 than the main app task.  If that is the case, don't use special Intent
 flags, just set android:taskAffinity= for this activity.  (Or give it a
 scoped name for the affinity if multiple activities are going to
 inter-operate in the same task.)





 On Fri, Dec 31, 2010 at 10:26 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
  This is part of my ongoing effort to tidy up my AppWidget code:

  When a user clicks on my Widget, it goes to an Activity deep in my
  app.  When the user finishes this activity, I'd like to exit back to
  the Launcher as opposed to whatever the last Activity on the stack is
  for my app.

  Is there an Intent flag I am not using correctly?  I tried all the
  ones I could see to be relevant, but nothing worked.  I know I could
  probably pass result codes back up the stack to wind down my app, but
  that's some ugly stuff.  Is there an easier way?

  Happy New Year everyone!

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

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.- 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] Reusing BitmapDrawable objects

2010-12-31 Thread John Gaby
I have custom skinned buttons.  I set the bitmaps for the button
backgrounds using the addState method of the StateListDrawable class
and pass in a BitmapDrawable which is loaded from a file on the SD
card.  Now I am having out of memory issues, so I thought that I would
try and cache the BitmapDrawable and reuse them for all the buttons on
a page, rather than creating a new one for each button.  However, when
I do this, the buttons don't display correctly.  For example if I have
two buttons of different sizes, the background is drawn at the same
size for both, rather than have each scale.  Also, if one button on
the page is hidden, then the backgrounds for some of the other (still
visible) buttons disappear.  This does not happen if I create separate
BitmapDrawable objects for each of the buttons.

My question is, am I supposed to be able to reuse these objects in
this manner?  If not, how can I keep from duplicating the memory
required to skin each button on a page?

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] is there any htc mototola specific emulator to test apps?

2010-12-31 Thread manas
Hello

We test our apps on usual emulator  samsung galaxy 3.
What we have observed that - our apps work fine on both of these. But
got review from some users that the apps don't work on HTC evo/desire
 in some cases Droid X.

Question -
1. If app works perfectly on one phone, why does it not work on other
having same OS version?
2. Is there any emulator to test apps specifically for HTC  Motorola.
So that we can ensure before launching that the app works well on
those phones.

Regads
Manas
http://dexterltd.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


<    1   2