[android-developers] Re: SAX Parsing meta-data tags in menifest file

2013-07-08 Thread Lance Nanek
Are you running on a device? The meta-data is all available from the 
PackageManager API. You don't need to parse XML at all. Not that it is XML 
after being packaged into the APK and converted to binary anyway.

Docs:
http://developer.android.com/reference/android/content/pm/PackageItemInfo.html#metaData
http://developer.android.com/reference/android/content/pm/PackageManager.html#GET_META_DATA

On Thursday, June 20, 2013 6:21:58 PM UTC-5, giles ian wrote:

 Hello,

 I need to parse meta-data tags for SyncAdapter, Authenticator etc.

 Issue its not necessary that the order of name and resource tag is one 
 after the other.

  1. meta-data android:name=android.content.SyncAdapter 
 android:resource=@xml/syncadapter_abc /

 2. meta-data android:name=android.accounts.AccountAuthenticator 
 android:resource=@xml/account_authenticator_abc /

 order of name and resource tag can be reverse also.

 Can someone please tell me a good logic for the same.

 Thanks,
 Pawan Nimje


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




[android-developers] Re: Applying Textapperance to whole application

2012-11-04 Thread Lance Nanek
I don't know about modifying the default theme, but it's easy to make your 
own and use it in your AndroidManifest.xml so you don't have to set it on 
each TextView.

You can refer to your text appearance from a TextView style in your 
styles.xml:

style name=BodyTextView parent=android:style/Widget.TextView
item name=android:textAppearance@style/TextAppearance/item 
/style 

Then you can refer to the TextView style from a theme in your styles.xml:

style name=Theme.MyTheme parent=@android:style/Theme.NoTitleBar
item name=android:textViewStyle@style/BodyTextView/item 
/style

Then you can use this theme on the application or activity elements in your 
AndroidManifest.xml (or set it programatically):

activity
android:theme=@style/Theme.MyTheme
...

That will apply your text appearance to the TextView's used without having 
to put style attributes on them directly..

On Sunday, November 4, 2012 3:40:29 AM UTC-8, onigunn wrote:

 Hi there,

 I defined an own TextApperance style in my app which inherits from the 
 default style

 style name=TextAppearance parent=@android:style/TextAppearance 

 item name=android:textSize18dp/item

 item name=android:textColor@android:color/black/item

 item name=android:typefacesans/item

 /style

 Now I have to apply this to each TextView which I declare in my app. Is 
 there a way to apply my custom TextAppearance as default for the whole 
 application?

 Best,

 oni 



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

2012-07-13 Thread Lance Nanek
Keep an array of all the positions of snow flakes, update the positions 
each update for things like speed downward, and draw them out each draw. 
I've done this with rain when I wrote the Android version of this app:
http://play.google.com/store/apps/details?id=com.speknid.autotrafego

I implemented it both in a View subclass and in OpenGL ES. In the View 
subclass, the View is placed on top of the menu screens via both being in a 
FrameLayout. Both update and drawing is done in the draw method and drawing 
is done using the Canvas API. The draw method triggers another draw via via 
postInvalidate/postInvalidateDelayed. Frame rate was bad, but passable, 
although this was back before hardware acceleration for the Canvas API.

OpenGL ES version, drawing was done in onDrawFrame of 
GLSurfaceView.Renderer, updates were done in a separate game update thread 
that passed arrays of sprites to draw to the render thread. It was 
triggered every time the render thread sent it a message with a used 
position update array to update. Frame rate was fine, but make sure you 
draw all the particles (be they snow flakes or rain) in a single draw call 
rather than one per particle. Similarly you are better off updating an 
array of positions and dumping it into a buffer than updating the buffer 
part by part.

On Wednesday, July 11, 2012 11:33:57 PM UTC-7, Rupesh nerkar wrote:

 I want to show snow fall effect in my application.I have one image of snow 
 fall,to make effect of snow fall,I want image of snow is move slowly from 
 top to bottom and repeat again so feel like snow fall.
 Please suggest me which is the right way to do this task..


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

[android-developers] Re: How Google Map gets current location in Android ?

2012-06-18 Thread Lance Nanek
Just a user here, but I can confirm the Google Maps app uses multiple 
location providers. I was on a train once and it couldn't get a GPS lock 
and just sat there forever trying to get a location. No clear view of the 
sky, I guess.

Then I turned off GPS location provider in the phone settings and it 
insisted I was in Boston when I was really near Washingington DC. That's 
where Google thinks the train's WiFi is, I guess. Finally I turned off WiFi 
and it started getting the correct location, presumably by the nearest cell 
phone tower.

So it uses both the GPS location provider and the network provider. I've 
also seen it display where I was last time I used locations before, until 
it loaded new data. So it either uses the last known location API as well, 
or caches the last used location itself.

It's pretty much a given that last known location API is the fastest if it 
has anything, then the network provider, then the GPS location provider. 
So, as has been said, for quick startup you usually use locations from 
those sources in that order.

There's plenty of code to get you started here:
http://developer.android.com/guide/topics/location/obtaining-user-location.html

On Monday, June 18, 2012 9:12:00 PM UTC-4, Ahmad wrote:

 Can someone from Google Android (map) group address the question/request ?

 How Google Map gets current location in Android ?  Steps and code.  Is 
 it possible ? 

 The question is Not how I should do it !

 Thank you.



 On Mon, Jun 18, 2012 at 5:34 PM, lbendlin l...@bendlin.us wrote:

 It's all smoke and mirror.  You need to use whatever location provider is 
 available to give the user the illusion that there is a location fix. Only 
 then should you switch to best provider, and provide the real GPS based 
 location.


 On Monday, June 18, 2012 5:32:01 PM UTC-4, Ahmad wrote:

 Can someone from Google Android (map) write the steps and code used by 
 Google Android in this subject ? 

 Here  
 “youtube.com/watch?v=**v6gqipmbcokhttp://youtube.com/watch?v=v6gqipmbcok” 
 says it uses cell towers. But 
 I can see the GPS is used by Google Map too. 

 Here  “http://stackoverflow.com/**questions/3145089/what-is-the-**simplest- 

 and-most-robust-way-to-get-**the-users-current-location-in-**a/ 
 3145655#3145655http://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-a/3145655#3145655”
  
   a few methods have been suggested, but doesn’t seem 
 Google Map Android uses any of them. 

 Google Map Android finds the location in very few seconds, while my 
 app takes about a minute. 
 Based on suggestions from Android, I find the best provider first 
 (which usually is GPS) and get the location thru that. But doesn’t 
 seem this is what Google Android Map does. 




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

[android-developers] Re: System Bar height on tablet devices

2011-05-28 Thread Lance Nanek
I don't know how to get that. That said, I've never needed it. The
dimensions that OpenGL games implemented using GLSurfaceView are
supposed to draw themselves in are passed to the game's renderer in
this method:
http://developer.android.com/reference/android/opengl/GLSurfaceView.Renderer.html#onSurfaceChanged%28javax.microedition.khronos.opengles.GL10,%20int,%20int%29

Those values will have already had anything outside the viewable area
subtracted from them.

--
Lance Nanek - Software Developer
http://neatocode.com | http://twitter.com/LanceNanek |
http://www.youtube.com/user/lnanek

On May 28, 3:20 pm, Jason jason.poli...@gmail.com wrote:
 OK.. I tried replying to this thread:

 http://groups.google.com/group/android-developers/browse_thread/threa...

 But Google Groups seems to have lost that email :/, so trying a new
 post.

 In the afore-mentioned thread, Dianne talks about not using
 getHeight()/getWidth() for UI layout, which I'll assume is good
 advice, but my problem is bootstrapping an OpenGL surface view
 (specifically the viewport) and for that I NEED to know the height of
 the System Bar as it's currently throwing everything off.  That is, in
 order to scale the scene to fit all devices I need to know the
 dimensions of the screen, but because the height is an (from
 DisplayMetrics) is an absolute height including the System Bar, all
 the graphics at the top of the scene are being truncated because the
 VIEWABLE area is not the same as the screen height.

 I have followed the advice of Chris Pruett 
 here:http://youtu.be/cdvaPyq_eBU?t=8m48s,
 and here:  
 http://code.google.com/p/replicaisland/source/browse/trunk/src/com/re...
 (line 128)

 And in so doing now need to be able to deduct the height of the system
 bar to be able to accurately scale the opengl scene to match the
 device.

 Anyone got any clue how I can determine the height (in pixels) of the
 System Bar?  And if the answer is you can't, that's fine but how do
 I then set the viewport in an opengl scene to the correct height?
 (understanding that I have to know the height BEFORE the viewport is
 set because I will have already computed the scale factors as per
 Chris Pruett's approach)

 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: Question about Android 2.2/2.3 and Hardware accelerated graphics

2011-05-06 Thread Lance Nanek
 Does Android 2.2/2.3 use hardware accelerated graphics primitives for
 different view operations (draw, animations etc)?

The official blog post on support for this in 3.0 mentions hardware
acceleration does get used for windows composition in earlier
versions, at least:
http://android-developers.blogspot.com/2011/03/android-30-hardware-acceleration.html

--
Lance Nanek - Software Developer
http://neatocode.com | http://twitter.com/LanceNanek |
http://www.youtube.com/user/lnanek

On May 5, 4:49 pm, Videoguy puri_mall...@yahoo.com wrote:
 Hi
 Does Android 2.2/2.3 use hardware accelerated graphics primitives for
 different view operations (draw, animations etc)?
 Lets say the platform it runs on has GPU with OpenGL driver for it.
 Do graphics operations use it automatically?
 Or
 Does the developer have to use GLSurfaceView and other opengl calls if
 they want any kind of h/w acceleration?

 Please throw some light on this.

 Thanks

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


[android-developers] Re: String to Float Performance Ideas

2011-04-18 Thread Lance Nanek
An open source coding group I participate in similarly wrote our own
faster float parsing:
http://code.google.com/p/skylight1/source/browse/trunk/SkylightOpenGL/src/skylight1/opengl/files/QuickParseUtil.java#23

Took parsing 1000 strings from 465ms to 12ms, although it just handles
what we need it to specifically, not everything. Interesting seeing
the other implementations linked from and in this thread! Although in
our particular case, just parsing the OBJ files into exactly the bytes
they end up as in the graphics buffer and saving that to a file in res/
raw before building the app would be the ultimate solution...

--
Lance Nanek - Software Developer
http://neatocode.com | http://twitter.com/LanceNanek |
http://www.youtube.com/user/lnanek

On Apr 14, 8:05 pm, ip332 iprile...@gmail.com wrote:
 public class String2Float {
         final int max_exp = 38;
         final int max_str_len = 20;
         float [] values;
         char [] buffer;

         public String2Float() {
                 buffer = new char [max_str_len + 1];
                 values = new float [max_exp + 1];
                 values[ 0 ] = 1;
                 for( int i = 1; i  max_exp; i++ ) {
                         values[ i ] = values[ i - 1 ] * 10;
                 }
         }

         public float Value(String str) {
                 int len = str.length();
                 if( len  max_str_len )
                         len = max_str_len; // ToDo: add proper error handling
                 // extract all characters into the local buffer
                 str.getChars(0, len - 1, buffer, 0);
                 // find decimal point
                 int point_idx = len;
                 for( int i = 0; i  len; i++ ) {
                         if( buffer[i] == '.' ) {
                                 point_idx = i;
                                 break;
                         }
                 }
                 // process all digits before the decimal point
                 float res = 0;
                 for( int i = 0; i  point_idx ; i++ ) {
                         int digit = buffer[i] - '0';
                         float value = digit * values[point_idx - i - 1];
                         res += value;
                 }
                 // process all digits after the decimal point
                 for( int i = point_idx + 1; i  len; i++ ) {
                         int digit = buffer[i] - '0';
                         float value = digit / values[i - point_idx];
                         res += value;
                 }
                 return res;
         }

 }

 On Apr 14, 5:02 pm, Mark Murphy mmur...@commonsware.com wrote:







  On Thu, Apr 14, 2011 at 7:47 PM, Paul pmmen...@gmail.com wrote:
   OK, have stripped the FloatingPointParser bare, but can't run it as
   the native method, parseFltImpl() is throwing an
   UnsatisfiedLinkError...

   Maybe a silly question, but any ideas what to do from here?

  Start from scratch, as Gaz Davidson did here:

 http://bitplane.net/2010/08/java-float-fast-parser/

  Or, as the last comment on that blog post indicates, grab the latest
  code from Harmony and try it.

  Or, roll your own String-Float using JNI and the NDK.

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

  Android Training in NYC:http://marakana.com/training/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: Running application on Dell Streak emulator

2011-04-18 Thread Lance Nanek
The Dell Streak is pretty odd re the screen. It is WVGA resolution,
but only mdpi, medium density. Usually that high of a resolution,
combined with a small phone screen, results in hdpi. The Streak is
bigger, however. This then affects what drawable folders are used and
how drawables are scaled.

I have seen a density property when creating Android virtual devices
for the emulator, but haven't tried out if the Streak's behavior can
be reproduced using that. Might be worth a try!

--
Lance Nanek - Software Developer
http://neatocode.com | http://twitter.com/LanceNanek |
http://www.youtube.com/user/lnanek

On Apr 14, 5:58 pm, Manish Garg mannishga...@gmail.com wrote:
 Hi All,

 I need to run my application on Dell streak, I am not able to find out
 any emulator to test it. My application is working good on 2.2
 emulator but on Dell Streak, application is not occupying complete
 screen and some portion of the screen is appearing as black.

 I am not able to reproduce same thing on 2.2 emulator.

 If someone know any emualtor specific to Dell Streak or some other way
 to test application for Dell Streak, then please let me know.

 Thanks  Regards,
 Manish

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

2011-03-22 Thread Lance Nanek
I just draw a character at a time, so I can draw anything. I use
char[] instead of String so I can preallocate and avoid garbage
collection. You asked for code, so here it is. Mine's horrendously
ugly, but I wrote it once and it never needed much revising, so I
never really needed to clean it up. Anyway the methods look like this:

/**
 * Draw a character array.
 *
 * @param chars char[] to draw
 * @param offset int offset into the array specifying where to start
 * @param count int number of characters to draw from the array
 * @param startX int x position to start drawing from
 * @param bottom int y position of bottom of first line of text
 * @param alignedLeft boolean true to draw text toward the right,
false to draw toward the left
 * @return y position to use to draw a line below the drawn text
 */
public int drawChars(final char[] chars, final int offset, final int
count,
final Text font, final int startX, final int bottom,
final boolean alignedLeft, final boolean nextLineDown,
final int scaleFP, final byte alpha) {

final int scaledFontHeightFP = FP.Mul(scaleFP, font.mHeightFP);
final int scaledFontWidthFP = FP.Mul(scaleFP, font.mWidthFP);
final int scaledFontHeightDifference = scaledFontHeightFP -
font.mHeightFP;

final int lineIncrement = scaledFontHeightFP;

final int limit = offset + count;
int drawingX = startX;
int drawingBottom = bottom - scaledFontHeightDifference;

final int charsStart = alignedLeft ? offset : limit - 1;
final int charsEnd = alignedLeft ? limit : offset - 1;
final int charsInc = alignedLeft ? 1 : -1;

for(int i = charsStart; i != charsEnd; i += charsInc) {
final char c = chars[i];
if ( '\n' == c ) {
if ( LOG ) Log.i(TAG, Line return detected, 
bottom =  + bottom);
drawingBottom -= lineIncrement;
if ( LOG ) Log.i(TAG, Line return detected, 
bottom =  + bottom);
drawingX = startX;

continue;
}

final int charTexture = font.texture(c);

if ( !alignedLeft ) {
drawingX -= scaledFontWidthFP;
}

quad(drawingX, drawingBottom, scaledFontWidthFP,
scaledFontHeightFP, font.mAtlas, charTexture, alpha);

if ( alignedLeft ) {
drawingX += scaledFontWidthFP;
}
}

drawingBottom -= lineIncrement;
if ( nextLineDown ) {
return drawingBottom - lineIncrement;
}

return drawingBottom + lineIncrement + scaledFontHeightFP;
}

public int drawChars(final char[] chars, final int offset, final int
count,
final Text font,
final int startX, final int bottom, final boolean alignedLeft, 
final
boolean nextLineDown) {

return drawChars(chars, offset, count, font, startX, bottom,
alignedLeft, nextLineDown, FP.ONE, ColorBytes.COMPONENT_MAX);
}

public void number(final int number, final Text font, final int
startX, final int bottom,
final boolean alignedLeft) {

number(number, font, startX, bottom, alignedLeft, FP.ONE);
}

public void number(final int number, final Text font, final int
startX, final int bottom,
final boolean alignedLeft, final int scaleFP) {

int numberStart = CharUtil.prepend(number, charBuffer.length, 1,
charBuffer);

int count = charBuffer.length - numberStart;
drawChars(charBuffer, numberStart, count, font, startX, bottom,
alignedLeft, true, scaleFP, ColorBytes.COMPONENT_MAX);
}

public void quad(final int left, final int bottom, final Atlas atlas,
final int texture) {
quad(left, bottom, atlas.widthFP[texture], 
atlas.heightFP[texture],
atlas, texture, ColorBytes.COMPONENT_MAX);
}

public void quad(final int left, final int bottom, final Atlas atlas,
final int texture, boolean flipHorizontal) {
final int textureWFP = atlas.widthFP[texture];
final int adjustedLeft = flipHorizontal ? left + textureWFP : 
left;
final int wFP = flipHorizontal ? -textureWFP : textureWFP;
quad(adjustedLeft, bottom, wFP, atlas.heightFP[texture], atlas,
texture, ColorBytes.COMPONENT_MAX);
}

public void quad(final int leftFP, final int bottomFP, final 

[android-developers] Re: write tag with opengl on android

2011-03-22 Thread Lance Nanek
Depends on your use case. In my case I was rendering UI and scores in
full screen OpenGL games. The scores changed frequently, so rendering
them to a bitmap and uploading that as a texture would be terrible for
the frame rate compared to never having to change the textures.
Similarly, overlaying standard Android UI stuff over the GLSurfaceView
hurt the frame rate as well; weird layer locking messages in the logs.

On Mar 22, 5:22 am, a a harvey.a...@gmail.com wrote:
 sorry, it seams better and light to use canvas to draw the text on the
 bitmap. anyway, thanks for your help.

 2011/3/22 Lance Nanek lna...@gmail.com:

  I just draw a character at a time, so I can draw anything. I use
  char[] instead of String so I can preallocate and avoid garbage
  collection. You asked for code, so here it is. Mine's horrendously
  ugly, but I wrote it once and it never needed much revising, so I
  never really needed to clean it up. Anyway the methods look like this:

         /**
          * Draw a character array.
          *
          * @param chars char[] to draw
          * @param offset int offset into the array specifying where to start
          * @param count int number of characters to draw from the array
          * @param startX int x position to start drawing from
          * @param bottom int y position of bottom of first line of text
          * @param alignedLeft boolean true to draw text toward the right,
  false to draw toward the left
          * @return y position to use to draw a line below the drawn text
          */
         public int drawChars(final char[] chars, final int offset, final int
  count,
                 final Text font, final int startX, final int bottom,
                 final boolean alignedLeft, final boolean nextLineDown,
                 final int scaleFP, final byte alpha) {

                 final int scaledFontHeightFP = FP.Mul(scaleFP, 
  font.mHeightFP);
                 final int scaledFontWidthFP = FP.Mul(scaleFP, font.mWidthFP);
                 final int scaledFontHeightDifference = scaledFontHeightFP -
  font.mHeightFP;

                 final int lineIncrement = scaledFontHeightFP;

                 final int limit = offset + count;
                 int drawingX = startX;
                 int drawingBottom = bottom - scaledFontHeightDifference;

                 final int charsStart = alignedLeft ? offset : limit - 1;
                 final int charsEnd = alignedLeft ? limit : offset - 1;
                 final int charsInc = alignedLeft ? 1 : -1;

                 for(int i = charsStart; i != charsEnd; i += charsInc) {
                         final char c = chars[i];
                         if ( '\n' == c ) {
                                 if ( LOG ) Log.i(TAG, Line return detected, 
  bottom =  + bottom);
                                 drawingBottom -= lineIncrement;
                                 if ( LOG ) Log.i(TAG, Line return detected, 
  bottom =  + bottom);
                                 drawingX = startX;

                                 continue;
                         }

                         final int charTexture = font.texture(c);

                         if ( !alignedLeft ) {
                                 drawingX -= scaledFontWidthFP;
                         }

                         quad(drawingX, drawingBottom, scaledFontWidthFP,
  scaledFontHeightFP, font.mAtlas, charTexture, alpha);

                         if ( alignedLeft ) {
                                 drawingX += scaledFontWidthFP;
                         }
                 }

                 drawingBottom -= lineIncrement;
                 if ( nextLineDown ) {
                         return drawingBottom - lineIncrement;
                 }

                 return drawingBottom + lineIncrement + scaledFontHeightFP;
         }

         public int drawChars(final char[] chars, final int offset, final int
  count,
                 final Text font,
                 final int startX, final int bottom, final boolean 
  alignedLeft, final
  boolean nextLineDown) {

                 return drawChars(chars, offset, count, font, startX, bottom,
  alignedLeft, nextLineDown, FP.ONE, ColorBytes.COMPONENT_MAX);
         }

         public void number(final int number, final Text font, final int
  startX, final int bottom,
                 final boolean alignedLeft) {

                 number(number, font, startX, bottom, alignedLeft, FP.ONE);
         }

         public void number(final int number, final Text font, final int
  startX, final int bottom,
                 final boolean alignedLeft, final int scaleFP) {

                 int numberStart = CharUtil.prepend(number, 
  charBuffer.length, 1,
  charBuffer);

                 int count = charBuffer.length - numberStart;
                 drawChars(charBuffer, numberStart, count, font, startX, 
  bottom,
  alignedLeft, true, scaleFP, ColorBytes.COMPONENT_MAX);
         }

         public void quad(final int left

[android-developers] Re: Internet for the App

2011-03-22 Thread Lance Nanek
I think there's a sticky broadcast intent for that:
http://developer.android.com/reference/android/net/ConnectivityManager.html#CONNECTIVITY_ACTION

Although I've only ever used ConnectivityManager#getActiveNetworkInfo
and then isConnectedOrConnecting on that for an immediate check...

On Mar 22, 10:01 am, Christopher Marchfelder
marchfel...@googlemail.com wrote:
 Hello Folks,

 I hope you can help me with a special problem I have. The android app
 I am developing requires the internet for every activity (data will be
 submitted to the server). My question is: how can I get notified
 when the connection breaks down/gets up again? Is there any good
 solution?

 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: HI

2011-03-20 Thread Lance Nanek
Either the pairing dialog, or the pairing notification, pop up
automatically when you try to connect to an unpaired device. It would
be nice if I could force the dialog version, though.

On Mar 11, 5:28 pm, Michael Elmsly mike.elm...@gmail.com wrote:
 Technically it is the platforms fault.  OK - so the spec requires pairing
 and for security reasons you always want the user to be responsible for that
 (no autopairing or hidden pairing of devices).  Since this means you can't
 allow apps to control pairing the logical thing to do is open the bluetooth
 pairing activity via a public intent so that developers can request pairing
 with a device while still having the security and UI managed by the android
 platform to protect the users.

 Seems fairly obvious to me or am I being unreasonable?

 Mike

 On Fri, Mar 11, 2011 at 8:12 PM, Kristopher Micinski krismicin...@gmail.com

  wrote:
  (But of course, having to pair isn't the Android platform's fault, it's
  just 802.15.1 in general :-).

  Kris

  On Fri, Mar 11, 2011 at 2:00 AM, Kristopher Micinski 
  krismicin...@gmail.com wrote:

  P.s.,

  Bluetooth API support seems to be not that amazingly great, and you have
  to pair the phones first, which is annoying. (People always have to pair
  before playing your game!). Can you fake it using TCP/IP?

  Kris

  On Thu, Mar 10, 2011 at 1:47 AM, Marcin Orlowski 
  webnet.andr...@gmail.com wrote:

  On 8 March 2011 19:40, bhaskar bommala bhaskar...@gmail.com wrote:
   Hi I am new to the android development , i need to access 2 android
  devices
   as remote devices each other via bluetooth..
   for example if i press the 1 as input from device 1 that should appear
  on
   device 2 ..

  See SDK samples. There's Bluetooth chat app there IIRC

  --
  Regards,
  Marcin Orlowski

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

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: No package identifier when getting value... for 1.5 on install since update

2011-03-19 Thread Lance Nanek
At some point the dev tools started automatically appending a version
specifier to your resource names if your resource names used
specifiers that Android 1.5 didn't understand. Android 1.5 doesn't
understand the density specifiers, they were introduced after it was
released.

Therefore drawable-hdpi, drawable-mdpi, and drawable-ldpi are actually
now considered drawable-hdpi-v4, drawable-mdpi-v4, and drawable-ldpi-
v4. Android 1.5 does understand the version specifier, so it won't
read something with -v4 on the end, only being API level 3.

You can just change your drawable-mdpi to drawable anyway. The
documentation says that drawable is considered medium density class by
default. Once the mdpi specifier is removed, the new build tools will
stop appending -v4 to it, which will let Android 1.5 read it again.

On Mar 17, 7:36 pm, acr acr...@gmail.com wrote:
 I just changed the min SDK version from 3 to 4, if someone has a
 solution I'd love to still support android 1.5 like it did before.

 On Mar 17, 6:39 pm, acr acr...@gmail.com wrote:

  before my app update, i upgraded my eclipse sdk to android 2.2 (see
  article below) I was using drawable-hdpi drawable-mdpi drawable-ldpi
  folders and NOT a drawable folder and it used to work fine in android
  1.5. now it won't work with 1.5 with just these folders. does anyone
  know of a work around without having to reintroduce the drawable
  folder? thanks

 http://androidforums.com/developer-101/146259-1-5-compatibility-issue...

  On Mar 17, 4:48 pm, acr acr...@gmail.com wrote:

   Hi all, i am running into a problem where I am getting force closes on
   devices running android 1.5, it used to run fine in 1.5 and I issued
   an update which had nothing to do with the graphics (changed a few
   menu setting within the app) now my application icon is the default
   android icon(not my icon) and i get

   I get the first set of errors when I install the app
   and I get the second set of errors when I try to open the app which
   references the splash screen logo:

   this app works perfectly on 1.6 and higher and used to run on 1.5 I
   compared the manifests and slpashscreen xml files and they are still
   identical.

   please help, im pulling my hair out here Thank you

   I get this when I install the app
   03-17 20:28:04.679: WARN/ResourceType(575): No package identifier when
   getting value for resource number 0x7f06
   03-17 20:28:04.721: WARN/ResourceType(575): No package identifier when
   getting value for resource number 0x7f060001
   03-17 20:28:04.818: WARN/ResourceType(674): Failure getting entry for
   0x7f02001f (t=1 e=31) in package 0: 0xffb5
   03-17 20:28:04.858: WARN/PackageManager(674): Failure retrieving icon
   0x7f02001f in package com.myco.myappfree
   03-17 20:28:04.858: WARN/PackageManager(674):
   android.content.res.Resources$NotFoundException: Resource ID
   #0x7f02001f
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.content.res.Resources.getValue(Resources.java:846)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.content.res.Resources.getDrawable(Resources.java:534)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.app.ApplicationContext
   $ApplicationPackageManager.getDrawable(ApplicationContext.java:1923)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.content.pm.ComponentInfo.loadIcon(ComponentInfo.java:88)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   com.android.launcher.LauncherModel.updateApplicationInfoTitleAndIcon(LauncherModel.java:
   452)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   com.android.launcher.LauncherModel.makeAndCacheApplicationInfo(LauncherModel.java:
   433)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   com.android.launcher.LauncherModel.addPackage(LauncherModel.java:177)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   com.android.launcher.Launcher
   $ApplicationsIntentReceiver.onReceive(Launcher.java:1860)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.app.ActivityThread$PackageInfo$ReceiverDispatcher
   $Args.run(ActivityThread.java:664)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.os.Handler.handleCallback(Handler.java:587)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.os.Handler.dispatchMessage(Handler.java:92)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.os.Looper.loop(Looper.java:123)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   android.app.ActivityThread.main(ActivityThread.java:3948)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   java.lang.reflect.Method.invokeNative(Native Method)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   java.lang.reflect.Method.invoke(Method.java:521)
   03-17 20:28:04.858: WARN/PackageManager(674):     at
   com.android.internal.os.ZygoteInit
   $MethodAndArgsCaller.run(ZygoteInit.java:782)
   03-17 20:28:04.858: 

[android-developers] Re: diffrence b/w sdk vesiron 8 10

2011-03-19 Thread Lance Nanek
Are you saying you can't press the back button on some emulator
configurations? I see back buttons on the default emulator skin for
API 8 and 10. Maybe you are using a different skins? Regardless, you
should just be able to press ESC key to send the back button as per:
http://developer.android.com/guide/developing/tools/emulator.html

On Mar 19, 6:20 am, rishabh agrawal android.rish...@gmail.com wrote:
 in the sdk version 8 ,back button also given by emulator but version
 10 the emulator not give back button,actully i have not  use any
 android mobile.so when i developed apps for version 10 then how to
 call back buttonit is nessery that back button should be
 create in apps when i want run apps in version 10.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 many of you are creating promotional videos for your app?

2011-03-19 Thread Lance Nanek
Whatever you do, don't record with an HTC Evo 4G in the dark. That was
my first attempt at a video and it came out pretty ugly:
http://www.youtube.com/watch?v=r0NMcEfeLLU

I'm getting slightly better. Here's a webcam and lots of light:
http://www.youtube.com/watch?v=9GfJfFZejU8

On Mar 17, 5:34 pm, rich friedel rich.frie...@gmail.com wrote:
 I've thought about simply having someone record it with their phone (Droid 2) 
 while I use the app on mine lol

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 make webview answers onmousedown immediataly when touched?

2011-03-18 Thread Lance Nanek
http://code.google.com/mobile/articles/fast_buttons.html

On Mar 17, 10:05 pm, lol zsefv...@gmail.com wrote:
 webview always answers onmousedown (js) after your finger leave up
 from the screen, so onmousedown is just like onclick. So how can
 webview listen to onTouch event so that it can answer the onmousedown
 event immediataly when you've touched the screen?
 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: Problem with SoundBoard App

2011-03-18 Thread Lance Nanek
Have you checked the logcat view in Eclipse to see if there is any
error message there when it happens?

Just at a guess, it is all those MediaPlayer instances you have. You
may want to try only having one MediaPlayer, or a small pool of them.
Use new, setDataSource, and prepare instead of create. Use reset
before those when you want to reuse one for a different sound.

There's SoundPool too, but that has pretty tight limitations on the
size of the sound files.

On Mar 17, 4:52 pm, Gabriel gab...@gmail.com wrote:
 I'm having a really strange problem:

 I'm making a simple app with a lot of ImageButtons that make sounds
 when you click it.

 I've done that before, so I'm just copying a previous code for that
 and replacing the names and ids.
 But, after the 7th Button in the java code, the next ones stop
 unexpectedly in the emulator when I click them.
 From the first to the 7th it works perfectly, and after that they
 start to have problems.

 Apparently is not a code's problem, because when I just change the
 position between them, the ones that were not working start working
 and the ones that were normal, now stop working.

 I'm really trying to solve this, but I don't have any clue. I'm just
 copying the codes that are working right! And they become
 functionless.

 Here's the code: (note that the code is the same for all of them and
 only the last one, eurotrip is not working. The others are fine. If
 I just change the position eurotrip will work, but the other not.)

 package rosalan.cinema.sounds;

 import android.app.Activity;
 import android.media.MediaPlayer;
 import android.os.Bundle;
 import android.view.View;
 import android.view.Window;
 import android.view.WindowManager;
 import android.widget.ImageButton;

 public class Menuprovisorio extends Activity {

         MediaPlayer ancora;
         MediaPlayer aneis;
         MediaPlayer jamesbond;
         MediaPlayer borat;
         MediaPlayer coringa;
         MediaPlayer devolta;
         MediaPlayer et;
         MediaPlayer eurotrip;
         MediaPlayer forrest;
         MediaPlayer godf;
         MediaPlayer hangover;
         MediaPlayer hg;
         MediaPlayer iluminado;
         MediaPlayer kill;
         MediaPlayer laranja;
         MediaPlayer old;
         MediaPlayer poderoso;
         MediaPlayer psico;
         MediaPlayer pulp;
         MediaPlayer scarface;
         MediaPlayer sparta;
         MediaPlayer spider;
         MediaPlayer starw;
         MediaPlayer terminator;
         MediaPlayer toy;
         MediaPlayer v;
         MediaPlayer vaderoutro;

         ImageButton a1;
         ImageButton a2;
         ImageButton a3;
         ImageButton a4;
         ImageButton a5;
         ImageButton a6;

         ImageButton a8;
         ImageButton a9;
         ImageButton b1;
         ImageButton b2;
         ImageButton b3;
         ImageButton b4;
         ImageButton b5;
         ImageButton b6;
         ImageButton b7;
         ImageButton b8;
         ImageButton b9;
         ImageButton c1;
         ImageButton c2;
         ImageButton c3;
         ImageButton c4;
         ImageButton c5;
         ImageButton c6;
         ImageButton c7;
         ImageButton c8;
         ImageButton c9;
         ImageButton a7;

         @Override
         protected void onCreate(Bundle savedInstanceState) {
                 // TODO Auto-generated method stub
                 super.onCreate(savedInstanceState);
                 requestWindowFeature(Window.FEATURE_NO_TITLE);
                 
 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
 WindowManager.LayoutParams.FLAG_FULLSCREEN);
                 setContentView(R.layout.main);

                 vaderoutro = MediaPlayer.create(this, R.raw.breath);

                  a8 = (ImageButton) findViewById(R.id.a8);
                  a8.setOnClickListener(new View.OnClickListener() {

                                 @Override
                                 public void onClick(View v) {
                                         // TODO Auto-generated method stub

                                         vaderoutro.start();
                                 }
                         });
                  pulp = MediaPlayer.create(this, R.raw.pulp);

                  a9 = (ImageButton) findViewById(R.id.a9);
                  a9.setOnClickListener(new View.OnClickListener() {

                                 @Override
                                 public void onClick(View v) {
                                         // TODO Auto-generated method stub

                                         pulp.start();
                                 }
                         });

                         jamesbond = MediaPlayer.create(this, R.raw.bond);

                         a1 = (ImageButton) findViewById(R.id.a1);
                         a1.setOnClickListener(new View.OnClickListener() {

                                 @Override
                                 public 

[android-developers] Re: Android Library Update

2011-03-17 Thread Lance Nanek
I don't know, but one thing I do that might help, is keeping most of
my projects in Eclipse closed.

On Mar 17, 12:25 pm, thibault thiba...@gmvhdl.com wrote:
 Every time I launch Eclipse there is an Android Library Update
 message in the status bar and it rebuilds all my apps.  I this
 supposed to happen?  It takes a long 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] Re: Best practice for changing min SDK

2011-03-17 Thread Lance Nanek
Isn't the chart a measurement of the phones with Market installed
whereas the console statistics we are talking about are for all apps?
So if Market is installed on one Android 1.5 phone and one Android 2.0
phone, that's 50/50 for the chart. Now if the first phone had 1 app
and the second phone had 3 apps, that would be 25/75 for the console
stats, all apps readout? Just saying the definitions could be
different, thus it would make sense for the numbers to be different.

On Mar 15, 10:17 pm, TreKing treking...@gmail.com wrote:
 On Tue, Mar 15, 2011 at 8:34 PM, Robert Massaioli robertmassai...@gmail.com

  wrote:
  Actually...can you please post the statistics that the developer console
  gives you for device distribution?

 First value is from the console, second from the chart linked, blanks are
 not available. 2.1 is the only one that's even remotely close.

 Android 3.0 0.2%
 Android 2.2    57.1% 61.3%
 Android 2.1    29.3% 29.0%
 Android 1.6    7.0% 4.8%
 Android 1.5    5.1% 3.0%
 Android 2.3.3  0.6% 1.0%
 Android 2.3    0.2% 0.7%
 Android 2.0.1  0.1%
 Android 1.1    0.1%
 Android 1.0    0.1%
 Android 2.0    0.0%

 -
 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: XOOM

2011-03-13 Thread Lance Nanek
Adb to Xoom worked on my Windows 7 laptop. I used this:
Download Motorola 4.9.0 Driver with MotoHelper*

From their USB and PC Charging Drivers page:
http://www.motorola.com/consumers/v/index.jsp?vgnextoid=bda09ec8009a0210VgnVCM108806b00aRCRD

And the INI modifications to the Android SDK driver Juan mentioned.
Took a couple restarts, and I probably uninstalled a bunch of stuff
via USBDeview, a program for working with USB drivers.

Since it is working, I won't try Xavier's link for now. If that's an
adb other than the Android SDK one, I've run into problems with those
in the past. At one point adb would say it was out of date and restart
itself every time I ran the command and not work. As far as I can tell
from process explorer, there was some sort of service running in the
background, I suspect from one of these OEM adb drivers, that was
starting a different adb constantly.

It could be the better way to go in this case, no clue, just pointing
out one way that worked for me so far.

On Mar 11, 9:15 pm, Xavier Ducrohet x...@android.com wrote:
 As Mark said, Motorola distribute the Xoom drivers.

 The android drivers are only for developer and nexus devices.

 Each manufacturers provides drivers for their own devices. Find the
 manufacturer links athttp://developer.android.com/sdk/oem-usb.html

 Xav



 On Fri, Mar 11, 2011 at 5:08 PM, J Handal jhand...@gmail.com wrote:
  Mark,

   Only modified android_winusb.inf will enable you to install the Android
  Composite ADB Interface.

  ;NVIDIA Tegra

  %SingleAdbInterface% = USB_Install, USB\VID_0955PID_7000

  %CompositeAdbInterface% = USB_Install, USB\VID_0955PID_7100MI_01

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

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.http://developer.android.com|http://tools.android.com

 Please do not send me questions directly. 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: abortBroadcast

2011-03-13 Thread Lance Nanek
Judging from the name of the class, maybe it is an attempt to stop an
SMS by working with android.provider.Telephony.SMS_RECEIVED?

Unrelated, but does Toast#setDuration even work with raw numbers like
that? I thought it takes one of two constants for long or short. I
guess the name and documentation could be clearer there, though.

On Mar 11, 9:15 pm, Indicator Veritatis mej1...@yahoo.com wrote:
 You really need to include more information in your posts before you
 can expect a good answer. Not only was Dianne fully justified in
 asking, what did you expect it to do, but you also failed to tell us
 what it did instead. Nor have you given us enough info to duplicate
 whatever the problem was.

 This is not a quiz group. Based on the meager information you have
 supplied we can only guess, which is usually a waste or your time and
 ours.

 That said, my guess is that you forgot: abortBroadcast() only works
 with an ORDERED broadcast. You probably sent it a non ordered
 broadcast, e.g., via Context.sendBroadcast().

 Or you might have forgotten something else: you might have forgotten
 that 'abortBroadcast' only sets a flag. You then have to wait for the
 actual abort to happen.

 Or are you not even seeing the Toast at all? In that case, there is
 nothing wrong with abortBroadcast: you just don't even GET the
 onReceive event. But that you will have to debug on your own.

 On Mar 10, 10:34 pm, Thiri Yee thirithewut...@gmail.com wrote:

  abortBroadcast didn't work. Why?
  Code is as follow

  public class SMSReceiver1 extends BroadcastReceiver
  {
          @Override
          public void onReceive(Context context, Intent intent)
          {
                  this.abortBroadcast();
                  Toast tag = Toast.makeText(context, Abort Broadcast!!!,
  Toast.LENGTH_LONG);
                  tag.setDuration(30);
                  tag.show();

  -- Please reply me as soon as possible.

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


[android-developers] Re: Android soundpool stop sequence of sounds

2011-02-24 Thread Lance Nanek
When you call SoundPool's play method you are returned a stream ID.
You can call the stop method with that stream ID to stop the sound.

SoundPool playing won't lock up your UI like that, however. That's
probably your own code. Maybe you are using Thread.sleep on the main
UI thread, for example. That thread needs to always be running to
handle calling all your app's various methods, like activity life
cycle events and on touch events. See this blog post:
http://android-developers.blogspot.com/2009/05/painless-threading.html

On Feb 24, 11:21 am, Traveler jadkins...@gmail.com wrote:
 I have developed an application that plays a sequence of 20 sounds
 using soundpool. If I try to use a button or touch the screen during
 the playback, I get a dialog Sorry! Application is not responding. I
 also get a Force close button and a wait button. Is there a way to use
 the user interface to stop soundpool from playing? Any advice is
 appreciated.

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


[android-developers] Re: Any twitter updates??

2011-02-06 Thread Lance Nanek
I use: http://twitter4j.org/

There are various examples out there:
http://code.google.com/p/agirardello/source/browse/trunk/OAuthExample/src/ch/ethz/oauth/OAuth.java#115

On Feb 6, 3:49 am, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote:
 Ya i got you. May be i got you wrong plus there are not much android
 experienced developers who like to encourage beginners
 out there. Anyways treking i have done some google search and i have reached
 a safe stage where i am directing my app to OAUTH login page and when the
 user logs in he is directed back to my application but now i dont know how
 to update its twitter status?
 Should i do that in onResume?
 The following are the steps i followed :-

    - I added signpost core and signpost commonshttp4 jar files in assets
    folder
    - then i added them in build path
    - Then in my main java file i declare following constants before
    oncreate

 private static final String CONSUMER_KEY = EuMduRyU4fJcaVgPuN9vA;
     private static final String CONSUMER_SECRET =
 JsiDIvPTPhxcV7NgYkw5HVDO0HC41eI2A8ELVLwqqRU;

     private static String ACCESS_KEY = null;
     private static String ACCESS_SECRET = null;

     private static final String REQUEST_URL = 
 http://twitter.com/oauth/request_token;;
     private static final String ACCESS_TOKEN_URL = 
 http://twitter.com/oauth/access_token;;
     private static final String AUTH_URL = 
 http://twitter.com/oauth/authorize;;
     private static final String CALLBACK_URL = myTweet://twitt;
     private static final String PREFERENCE_FILE = twitter_oauth.prefs;

     private static CommonsHttpOAuthConsumer consumer = new
 CommonsHttpOAuthConsumer(
     CONSUMER_KEY, CONSUMER_SECRET);
     private static CommonsHttpOAuthProvider provider = new
 CommonsHttpOAuthProvider(
     REQUEST_URL, ACCESS_TOKEN_URL, AUTH_URL);

    - In oncreate i created an onclick listener with the following code :-

     try {
                      String authURL = provider.retrieveRequestToken(
             consumer, CALLBACK_URL);

             Log.d(OAuthTwitter, authURL);
             startActivity(new Intent(Intent.ACTION_VIEW, Uri
             .parse(authURL)));
                 } catch (OAuthMessageSignerException e) {
             e.printStackTrace();
                 } catch (OAuthNotAuthorizedException e) {
             e.printStackTrace();
                 } catch (OAuthExpectationFailedException e) {
             e.printStackTrace();
                 } catch (OAuthCommunicationException e) {
             e.printStackTrace();
                 }
             }

    - Till now the code is going all well and now i create onResume with the
    following code

         super.onResume();
         Uri uri = this.getIntent().getData();

         if (uri != null  uri.toString().startsWith(CALLBACK_URL)) {
         Log.d(OAuthTwitter, uri.toString());
         String verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER);
         Log.d(OAuthTwitter, verifier);
         try {

         provider.retrieveAccessToken(consumer, verifier);
         ACCESS_KEY = consumer.getToken();
         ACCESS_SECRET = consumer.getTokenSecret();

         Log.d(OAuthTwitter, ACCESS_KEY);
         Log.d(OAuthTwitter, ACCESS_SECRET);

         } catch (OAuthMessageSignerException e) {
         e.printStackTrace();
         } catch (OAuthNotAuthorizedException e) {
         e.printStackTrace();
         } catch (OAuthExpectationFailedException e) {
         e.printStackTrace();
         } catch (OAuthCommunicationException e) {
         e.printStackTrace();
         }
         }

 Please tell me where and what should i write now to update the status. I am
 updating the status through code and not asking it from user . I think there
 is some token involved so may be i would have to store it also. Anyways
 please revert back if you have any solution for me i hope i made everything
 clear this time :)

 On Sat, Feb 5, 2011 at 10:27 PM, TreKing treking...@gmail.com wrote:
  On Sat, Feb 5, 2011 at 1:34 AM, Robin Talwar r.o.b.i.n.abhis...@gmail.com
   wrote:

  Sorry i have read your other posts also
  you keep replying in the same tone anyways

  It is very difficult to convey tone in emails / posts. Tone is usually
  inferred by the reader. This perceived tone is often wrong.

  my bad i dint mention my post like :-

  For Treking  :  *Do you have any reference twitter sharing android
  tutorial??*

  There you go, that's more like it. See how clear and to that point that is?
  But there is no reason to reserve that kind of detail specifically for me -
  everyone would benefit.

  For rest of the world  :

  The rest of the world would still have no idea that you're looking for
  tutorials because, for the fourth time now, *you did not specify that in
  your original post*.

  I am simply trying to express to you the fact that when posting in this
  forum or any forum you need to be clear if you expect to get a good answer.
  I want to share via twitter, I have 

[android-developers] Re: Any twitter updates??

2011-02-06 Thread Lance Nanek
Those classes are in the Twitter4J core JAR. So that isn't getting
properly included in your Java build path as a library if you can't
import them. So double check that.

One problematic thing I see you doing earlier is keeping your library
JARs in the assets folder. The assets folder is a special folder used
for things like HTML files that you want included with your
application and accessible at runtime just as they are. You shouldn't
keep library JARs in there. Those have to be converted from Java byte
code to Dalvik code anyway. You should use a different directory, like
a lib directory under your project directory. The fact that they are
referenced as libraries will make sure they are converted and the
converted output included in your APK. See this link:
http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary

And the sidebar here:
http://developer.android.com/guide/topics/resources/accessing-resources.html

On Feb 6, 1:51 pm, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote:
 hey
 thanks for sharing the link i have added all the three jars and made one
 class file copied the code.
 Everything is fine i have removed many errors by importing specific classes
 and setting up the context.
 But still there are two class files which eclipse is not able to import and
 these are :-

    -

    import twitter4j.http.AccessToken;

    -

    import twitter4j.TwitterFactory;

 and hence there are errors in my file so please guide me where did i go
 wrong.

 On Sun, Feb 6, 2011 at 7:42 PM, Lance Nanek lna...@gmail.com wrote:
  I use:http://twitter4j.org/

  There are various examples out there:

 http://code.google.com/p/agirardello/source/browse/trunk/OAuthExample...

  On Feb 6, 3:49 am, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote:
   Ya i got you. May be i got you wrong plus there are not much android
   experienced developers who like to encourage beginners
   out there. Anyways treking i have done some google search and i have
  reached
   a safe stage where i am directing my app to OAUTH login page and when the
   user logs in he is directed back to my application but now i dont know
  how
   to update its twitter status?
   Should i do that in onResume?
   The following are the steps i followed :-

      - I added signpost core and signpost commonshttp4 jar files in assets
      folder
      - then i added them in build path
      - Then in my main java file i declare following constants before
      oncreate

   private static final String CONSUMER_KEY = EuMduRyU4fJcaVgPuN9vA;
       private static final String CONSUMER_SECRET =
   JsiDIvPTPhxcV7NgYkw5HVDO0HC41eI2A8ELVLwqqRU;

       private static String ACCESS_KEY = null;
       private static String ACCESS_SECRET = null;

       private static final String REQUEST_URL = 
 http://twitter.com/oauth/request_token;;
       private static final String ACCESS_TOKEN_URL = 
 http://twitter.com/oauth/access_token;;
       private static final String AUTH_URL = 
 http://twitter.com/oauth/authorize;;
       private static final String CALLBACK_URL = myTweet://twitt;
       private static final String PREFERENCE_FILE = twitter_oauth.prefs;

       private static CommonsHttpOAuthConsumer consumer = new
   CommonsHttpOAuthConsumer(
       CONSUMER_KEY, CONSUMER_SECRET);
       private static CommonsHttpOAuthProvider provider = new
   CommonsHttpOAuthProvider(
       REQUEST_URL, ACCESS_TOKEN_URL, AUTH_URL);

      - In oncreate i created an onclick listener with the following code :-

       try {
                        String authURL = provider.retrieveRequestToken(
               consumer, CALLBACK_URL);

               Log.d(OAuthTwitter, authURL);
               startActivity(new Intent(Intent.ACTION_VIEW, Uri
               .parse(authURL)));
                   } catch (OAuthMessageSignerException e) {
               e.printStackTrace();
                   } catch (OAuthNotAuthorizedException e) {
               e.printStackTrace();
                   } catch (OAuthExpectationFailedException e) {
               e.printStackTrace();
                   } catch (OAuthCommunicationException e) {
               e.printStackTrace();
                   }
               }

      - Till now the code is going all well and now i create onResume with
  the
      following code

           super.onResume();
           Uri uri = this.getIntent().getData();

           if (uri != null  uri.toString().startsWith(CALLBACK_URL)) {
           Log.d(OAuthTwitter, uri.toString());
           String verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER);
           Log.d(OAuthTwitter, verifier);
           try {

           provider.retrieveAccessToken(consumer, verifier);
           ACCESS_KEY = consumer.getToken();
           ACCESS_SECRET = consumer.getTokenSecret();

           Log.d(OAuthTwitter, ACCESS_KEY);
           Log.d(OAuthTwitter, ACCESS_SECRET);

           } catch (OAuthMessageSignerException e) {
           e.printStackTrace

[android-developers] Re: RECEIVE_BOOT_COMPLETED not sent after power off? (works on restart)

2011-02-06 Thread Lance Nanek
I actually did meet a developer at an Android meetup the other day who
swore he didn't need to reset his alarms on boot up on a certain
phone...now I can ask if this option is involved next time I see him.

On Feb 6, 1:55 pm, Dianne Hackborn hack...@android.com wrote:
 Wait, let's back up a second.

 If their fast boot facility works how I assumed it does, it would actually
 be correct for it to not send boot_completed.

 That is, if what this does is save the current device state and RAM to
 storage, and reload that when turning on, then it absolutely should not send
 boot_completed because it is actually coming back up into the same running
 state it had before.

 So before going further with this, please check to verify there is actually
 a problem here: when you turn off and then back on, is the device state
 actually being reset?  Are your recent tasks lost?  Are registered alarms
 lost?  Are services that were started no longer started?

 There would be a *lot* that is very broken if boot_completed wasn't actually
 sent as part of a fresh boot.



 On Fri, Feb 4, 2011 at 6:04 AM, Yorgos X yor...@gmail.com wrote:
  it is in menu - settings - applications

  there are the five below options there:
  - unknown sources
  - manage applications
  - running services
  - development
  - fast boot

  On Fri, Feb 4, 2011 at 3:30 PM, Mark Murphy mmur...@commonsware.comwrote:

  Egad.

  Can you tell me where in the Settings app (or elsewhere) this checkbox
  resides?

  Thanks!

  On Fri, Feb 4, 2011 at 7:06 AM, Yorgos X yor...@gmail.com wrote:
   HTC Desire HD

   On Fri, Feb 4, 2011 at 1:54 PM, Marcin Orlowski 
  webnet.andr...@gmail.com
   wrote:

   On 4 February 2011 12:31, Yorgos X yor...@gmail.com wrote:
Mysteriously enough (new phone, haven't explored it much), a setting
  was
preset to fast boot the device (is called Fast boot - turn off to
  use
some
Market apps) and this apparently causes the device to start after a
power
off without sending the BOOT_COMPLETED action. Can any of you test
  this
on
their devices to confirm it is happenning for a fact? I unchecked
  this
setting and my receiver works on both power off/startup and restart.

   That would be really silly feature. What device is it?

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

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

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

  Android Training in Atlanta:http://bignerdranch.com/classes/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

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

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

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

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


[android-developers] Re: Running code right after installation

2011-01-30 Thread Lance Nanek
intent-filter
action android:name=com.android.vending.INSTALL_REFERRER /
/intent-filter

On Jan 30, 10:25 am, Omer Gilad omer.gi...@gmail.com wrote:
 Hi, I am looking for a way to run code right after being installed -
 without waiting for activity launch\boot\etc.
 I have used the following manifest declaration:

 receiver android:name =xxx.yyy.zzz.PackageInstallReceiver
             intent-filter
              action
 android:name=android.intent.action.PACKAGE_ADDED/
               action
 android:name=android.intent.action.PACKAGE_REMOVED/

               data android:scheme=package /
             /intent-filter
         /receiver

 And created a BroadcastReceiver - my onReceive gets called only after
 another package is being installed, not my own.

 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: Getting a test version of an .apk to a end user

2011-01-04 Thread Lance Nanek
 Then upon opening (aka
 clicking on) the .apk file attached to the email you sent, Android
 will install the App.

Wow, I had tested that previously, and it didn't work. The APK just
got downloaded and there was no way to actually install it, without
third party help like file managers, which are annoying to have to
explain to users. I tried emailing an APK just now, though, and there
was an Install button next to it in Gmail which worked (Nexus One,
Android 2.2.1). So I guess it got fixed. I wonder if earlier versions
of Android still can't install directly from email, however, or
something like that.

On Jan 3, 8:50 pm, metal mikey coref...@gmail.com wrote:
 Your tester will need to uninstall the current from-market instance of
 your App then go to MENU  SETTINGS  APPLICATIONS  and check 'Unkown
 sources' to allow the not-from-market install. Then upon opening (aka
 clicking on) the .apk file attached to the email you sent, Android
 will install the App.

 On Jan 4, 12:23 pm, John Lussmyer johnlussm...@gmail.com wrote:

  Okay, email is fine - but how does an average end-user get the file onto
  their Android Device?
  That's what I was asking.

  On Mon, Jan 3, 2011 at 4:55 PM, metal mikey coref...@gmail.com wrote:
   Is Email easy enough?

   Note: because you will have the tester install out-of-band from the
   Market, the tester will need to uninstall the App first.

   On Jan 4, 9:58 am, John Lussmyer johnlussm...@gmail.com wrote:
You mean you put it out on the Android Marketplace?

On Mon, Jan 3, 2011 at 2:56 PM, Wayne Wenthin wa...@fuligin.com wrote:
 I've taken to putting the latest version on the website and letting
   them
 download and install from there.

 On Mon, Jan 3, 2011 at 2:54 PM, John Lussmyer johnlussm...@gmail.com
   wrote:

 Is there any relatively easy way for me to send a test version of my
 app.apk file to a user?
 I may have fixed a problem he's seeing (that doesn't happen on my
   phone of
 course), and I'd like to have him test it BEFORE I deploy it to the
   store.

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   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: Nexus S as developer phone

2010-12-21 Thread Lance Nanek
Why not just buy it from BestBuy/etc. like anyone else?

On Dec 21, 7:13 am, Rafael Martins rafaelwmart...@gmail.com wrote:
 Hi,

 Anyone knows if Nexus S will be available for developers on Android Market?

 Regards!

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

2010-12-21 Thread Lance Nanek
Oh, I just read the other thread on this, maybe you are international.
I'd be willing to buy and ship you one at cost, although I'd want to
open it up and test an app or two on it first as my fee.
Unfortunately, I'm seeing several errors reported on the Nexus S that
aren't reproducible on the Android 2.3 emulator. So they are
apparently quite different. I don't really want one, personally, since
it can't use the 3G off my iPhone SIM.

On Dec 21, 9:58 am, Lance Nanek lna...@gmail.com wrote:
 Why not just buy it from BestBuy/etc. like anyone else?

 On Dec 21, 7:13 am, Rafael Martins rafaelwmart...@gmail.com wrote:

  Hi,

  Anyone knows if Nexus S will be available for developers on Android Market?

  Regards!

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


[android-developers] Re: Media player problems with android 2.3 (gingerbread), I can't open a service connection....

2010-12-21 Thread Lance Nanek
I've seen people firing broadcasts that look the same as the media
buttons on some headsets. That might be a workable alternative to
using the service if you don't need anything special.

On Dec 20, 3:51 pm, Mark Murphy mmur...@commonsware.com wrote:
 Please understand that this is not part of the Android SDK. According
 to the source code, it is not exported, and therefore is not available
 outside of its process.



 On Mon, Dec 20, 2010 at 3:43 PM, neuromit stuart.lay...@gmail.com wrote:
  I'm trying to setup a service connection to control the stock android
  media player. This works great under 2.1 and 2.2. However, when I
  tried to run my application on the 2.3 emulator my application crashes
  and I get the following error:

  ERROR/AndroidRuntime(466): Caused by: java.lang.SecurityException: Not
  allowed to bind to service Intent
  {cmp=com.android.music/.MediaPlaybackService }

  Have the permissions to bind to the IMediaServiceConnetion been
  revoked for gingerbread?

  Here is the code I'm running from my class that is a child of
  ServiceConnection

  Intent i = new Intent();
  i.setClassName(com.android.music,
  com.android.music.MediaPlaybackService);
  a.bindService(i, (ServiceConnection) this, 0);

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

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

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


[android-developers] Re: Capture Video of App

2010-11-21 Thread Lance Nanek
 For previous videos, I've used a tripod and a camcorder aimed downward
 at a table. This can still work reasonably well, but won't meet the
 alternate stores requirement of unaltered, unedited capture from the
 app.

You could always try asking the account manager if camera video
capture of the app is OK. My welcome packet for that app store got
sent to my spam folder in gmail and I never saw it, but after some
emailing, we figured it out. So they do respond to emails.

They flat out tell you to crop out the OS taskbar in some cases in the
same document anyway, which is editing, so I think you have to read
the first bullet point in the context of not misrepresenting your app,
which the rest of the bullet implies is its purpose.

 If you don't mind my asking, what did you use to suspend the camera?
 That Logitech one seems interesting, but it looks like it's designed
 as a Webcam, for clipping to a monitor or notebook.

In that case it was just clipped to the arm of the document camera. It
seems grippy enough that it can support itself facing straight down
with the clip end horizontal. Unfortunately, I didn't trust the zoom
not to cut my resolution and interpolate up, so I put a cardboard box
under the phone to get it close enough to the camera not to have to
zoom much, which is why you can see the phone moving a little when I
push hard enough for the crummy touchscreen to register.

I built a new lower gantry now anyway, made out of cardboard again,
but it's fine since the webcam is light and won't be touched and the
phone sits on a solid surface. I have some videos that way of a dice/
puzzle game I do the programming for, but haven't posted them yet.
Getting bright lighting without glare or reflections is tough. If I
could manage it I could crank the frame rate of the camera up. I
haven't even started learning how to edit footage into glitzy promo
videos, unfortunately. Maybe I should just hire a PR person and focus
on coding.

Emulator is no good for OpenGL games, but I ordered a video out cable
for the Incredible I have access to, so I'll try that soon too. Too
bad the HDMI video out on some phones is for a couple built-in apps
only. Pure digital would look better than capturing analog composite,
even if the capture equipment costs an arm and a leg.

On Nov 20, 11:22 pm, Nathan critter...@crittermap.com wrote:
 Thanks everyone.

 I tried tonight usinghttp://code.google.com/p/androidscreencast/and
 ScreenCastomatic.

 The 4 or so frames a second is somewhat limiting and causes lots of
 ghosting.

 I have a Nexus One. I don't suppose that has TV out.

 For previous videos, I've used a tripod and a camcorder aimed downward
 at a table. This can still work reasonably well, but won't meet the
 alternate stores requirement of unaltered, unedited capture from the
 app.

 I guess I could capture the video slowly, speed it up and just add a
 music soundtrack if voice over is a pain.

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

2010-11-21 Thread Lance Nanek
I would have been much more impressive to hear something like, we
tested it in usability studies and found users like the icons moving
around while they are trying to press them and are able to select apps
more efficiently and with greater satisfaction. Or whatever
justification you think it has for the user. Instead it sounds like an
implementation justification, which is indeed, meaningless to users.

On Nov 20, 11:09 pm, Dianne Hackborn hack...@android.com wrote:
 On Sat, Nov 20, 2010 at 4:53 PM, Lance Nanek lna...@gmail.com wrote:
  One annoying thing about copying iPhone is that the copiers often get
  it wrong. The launcher on the Nexus One has an attempt at elastic
  scrolling, but it does the bounce thing even when you haven't gotten
  to the end of the app list. So the darn thing is constantly bouncing
  even when I'm trying to press an app after a scroll in the middle of
  the list.

 That isn't trying to copy the iPhone, it is just a different type of
 physics.

  Feedback when you are at the end and a less abrupt stop when you get
  there is good. Stupid, meaningless, annoying effects that get in the
  way of using the interface are bad. If whoever had implemented it on
  the Nexus One had started from some need, like needing more user
  feedback, I don't think they would have mixed the two up.

 The physics behind that particular UI is that the list isn't free-moving,
 but has slots at each place where full icons are on-screen. As a fling
 slows down, you will see the slots impacting the physics until it finally
 falls down into the final slot.

 So okay, fine, you don't like it, and you are welcome to your opinion, but
 it isn't a copy, and it isn't meaningless.

 --
 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: Appengine channel api and android

2010-11-20 Thread Lance Nanek
Wouldn't you just use Android Cloud to Device Messaging (C2DM) if you
wanted to push data from a server to an Android client? Or are you
trying to work around the high version requirement for that?

On Nov 20, 4:09 am, Federico Paolinelli fedep...@gmail.com wrote:
 Hello there, I don't know if it would be better to post on GAE group,
 but I'll try here.

 Given that channel api is about to be officially released, does
 anybody knows if exists a java client library (or some code snippets)
 for android?

 All the examples I saw were related to javascript, but I'd love to
 experiment that feature on android too.

 Federico

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


[android-developers] Re: Capture Video of App

2010-11-20 Thread Lance Nanek
I need this for my own stuff as well. I thought about demoing slowly
and speeding up the video a while back, but then getting the audio
right would be difficult. Maybe some people don't have important
audio, though.

In the meantime, with the point-a-camera-at-it solutions, I've found
the camera you use makes a big difference. This one I did with a
Logitech HD Pro Webcam C910 looks decent:
http://www.youtube.com/watch?v=9GfJfFZejU8

This earlier one with a WolfVision VZ-8plus document camera fed into S-
video capture is too blurry:
http://www.youtube.com/watch?v=yOXSvlTI1sw

This even earlier one done with an HTC Evo 4G is both blurry and has
bizarre artifacts:
http://www.youtube.com/watch?v=r0NMcEfeLLU

So when considering that route, make sure not to give up after trying
with a poor camera, I guess.

On Nov 20, 8:10 am, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Nov 20, 2010 at 7:26 AM, Olivier Guilyardi l...@samalyse.com wrote:
  Who knows how to do that? I think I found some posts that indicate
  Mark Murphy may have solved this with a tool that goes through DDMS.
  If so, I'll get that tool and donate.

 I think there's an Android screencast utility on code.google.com
 somewhere. I have some source for my own implementation lying around
 somewhere -- I contributed it to Jens Riboe for dr...@screen, but
 AFAIK he didn't integrate it.

  Apparently through DDMS you get a very low frame rate

 Correct, though for a screencast, if you demo slowly, you can speed up
 the resulting video to get a bit crisper results, I imagine.

 If you have access to an HTC Droid Incredible or some editions of the
 Samsung Galaxy S, you can get a cable that outputs the main Android
 screen to composite video, which you could record.

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

 _The Busy Coder's Guide to Android Development_ Version 3.2 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: Android system font size

2010-11-20 Thread Lance Nanek
I've tried the version of that someone put on the Market before. They
mentioned in the description they pulled it out of the Android source
tree. So it is probably the same one as the emulator. The setting only
affected the app itself. Maybe it manages to work on rooted phones and
emulators, however. Not many people have rooted phones anyway, though,
so I never test on them. I suppose different devices might have it set
to something by default, though, or some future phone might offer it
since what the manufacturers put on the phone could have the needed
access without the entire phone being rooted.

On Nov 20, 8:25 am, kernelpanic j.m.roya...@gmail.com wrote:
 It's in Spare Parts on the Emulator

 On Nov 19, 9:59 am, Lance Nanek lna...@gmail.com wrote:

  I've never actually seen a system wide font size preference, however,
  and I must have seen the settings screens on over a dozen Android
  phones. I wish there was one, and I've had people ask me about it
  before too, but it's incredibly rare if it exists, or is just hidden
  somewhere I have no clue to check.

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

2010-11-20 Thread Lance Nanek
I see you are using new DefaultOAuthProvider. I had to change that
to new CommonsHttpOAuthProvider in an example very similar to yours
when I switched over to using HTTPS, which I note you are as well.
Details here:
http://code.google.com/p/agirardello/issues/detail?id=1

On Nov 11, 2:23 am, Babita kumari babita.permeat...@gmail.com wrote:
 Ya  Bibek ,

  I am getting following error :

 11-10 10:48:46.348: ERROR/OAUTH(409): Communication with the service
 provider failed: Received authentication challenge is null

 I have added Twitter4J and signpost as library and I have registered as
 client type on Twitter . And my code is following:

     public class TwApp extends Activity
 {
     private static final String APP =OAUTH;

      private Twitter twitter;
      TextView tweettx;
      Button login;

      private OAuthProvider provider;

      private CommonsHttpOAuthConsumer consumer;
      private static final String CONSUMER_KEY =  consumer key... ;
      private static final String CONSUMER_SECRET = consumerSecret key..;

      String verifier ;

     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState)
     {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         tweettx = (TextView)findViewById(R.id.tweet);

         login = (Button) findViewById(R.id.main_loin_button);

         login.setOnClickListener(new OnClickListener()
         {
             public void onClick(View v)
             {
                 askOAuth();
             }
         });
     }

     private void askOAuth()
     {
         try
         {
             consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY,
 CONSUMER_SECRET );
             provider = new 
 DefaultOAuthProvider(https://api.twitter.com/oauth/request_token;,
                                                 
 https://api.twitter.com/oauth/access_token;,
                                                 
 https://api.twitter.com/oauth/authorize;);

             String authUrl = provider.retrieveRequestToken(consumer,
 OAuth.OUT_OF_BAND);
             System.out.println( +
 authUrl);

             Toast.makeText(this, Please authorize this app!,
 Toast.LENGTH_LONG).show();

             this.startActivity(new Intent(Intent.ACTION_VIEW,
 Uri.parse(authUrl)));

         } catch (Exception e)
         {
             System.out.println(ERROR_ + e);
             Log.e(APP, e.getMessage());
             Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
         }
     }

     @Override
     protected void onNewIntent(Intent intent)
     {
         super.onNewIntent(intent);

         Uri uri = intent.getData();
         if (uri != null  uri.toString().startsWith( OAuth.OUT_OF_BAND))
         {
             verifier =
 uri.getQueryParameter(oauth.signpost.OAuth.OAUTH_VERIFIER);
         }

             try {
                 // this will populate token and token_secret in consumer
                 provider.retrieveAccessToken(consumer, verifier);

                 // TODO: you might want to store token and token_secret in
 you app settings
                 AccessToken a = new AccessToken(consumer.getToken(),
 consumer.getTokenSecret());

                 // initialize Twitter4J
                 twitter = new TwitterFactory().getInstance();
                 twitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET);
                 twitter.setOAuthAccessToken(a);

                 // create a tweet
                 Date d = new Date(System.currentTimeMillis());
                 String tweet = #OAuth working!  + d.toLocaleString();

                 // send the tweet
                 twitter.updateStatus(tweet);

                 // feedback for the user...
                 tweettx.setText(tweet);
                 Toast.makeText(this, tweet, Toast.LENGTH_LONG).show();
                 login.setVisibility(Button.GONE);

             } catch (Exception e) {
                 Log.e(APP, e.getMessage());
                 Toast.makeText(this, e.getMessage(),
 Toast.LENGTH_LONG).show();
             }

         }

 }

 Can you reply fast as its very urgent.

 Thanks
 Babita

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

2010-11-20 Thread Lance Nanek
One annoying thing about copying iPhone is that the copiers often get
it wrong. The launcher on the Nexus One has an attempt at elastic
scrolling, but it does the bounce thing even when you haven't gotten
to the end of the app list. So the darn thing is constantly bouncing
even when I'm trying to press an app after a scroll in the middle of
the list.

Feedback when you are at the end and a less abrupt stop when you get
there is good. Stupid, meaningless, annoying effects that get in the
way of using the interface are bad. If whoever had implemented it on
the Nexus One had started from some need, like needing more user
feedback, I don't think they would have mixed the two up.

On Nov 4, 4:03 am, Richard Leggett richard.legg...@gmail.com wrote:
 Twitter for Android is an excellent app, but the lastest update shows
 how a lot of iOS UI patterns are bleeding over to Android apps,
 potentially confusing things.

 To note a couple:

 1. Pull down ListView (beyond top) to refresh.
 2. Swipe finger across a ListView row to bring up actions/edit.

 First of all, iOS has some extremely well thought at and sensible UI/
 UX patterns, many of them designed to get around the limitation of
 having one physical button (always needing a back button on screen, no
 menu key and so on).

 The danger here is that as Android developers we don't have this stuff
 built into the SDK, if you've tried to implement iOS's overshoot/
 elastic ScrollViews which are purported to be coming to Gingerbread,
 you'll know how much extra work this can be, and potentially how
 brittle that might make code, especially if this particular feature is
 going to be built in.

 In response to the numbered points above, what about Android's click
 list view header to scroll to top, and what about the long-press for
 bringing up actions/options for an item. TweetDeck is one of the best
 examples of Android done right IMHO, fully embracing a lot of the
 design and interaction guidelines that are beginning to emerge.

 Are we going to confuse users by having an Android way to do things
 mixed in with an iOS way to do things?

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

2010-11-19 Thread Lance Nanek
You need to include some sort of library on older version of Android,
if I recall correctly. Newer versions you don't need to include
anything. The Bluetooth chat sample shows how to prompt the user to
enable it when needed and whatnot:
http://developer.android.com/resources/samples/BluetoothChat/index.html

On Nov 19, 4:03 am, Ray da Costa raydaco...@gmail.com wrote:
 Friends anyone have any tips on how to use Bluetooth in Andoid?
 You have to install anything?
 Or there is no single developer available for us?

 --
 Ray da Costa
 The best way to predict the future is to invent it.
 Alan Kay

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

2010-11-19 Thread Lance Nanek
Alarms are a bit of a pain. You have to set them again on boot and
handle time changes and stuff like that.

If you only need to reset the value when it is accessed, just always
store the date it was last reset. When accessing it, if 2AM on the
latest Saturday is later than the last time it was reset, reset it.

On Nov 16, 10:55 pm, drewin drew.nguye...@gmail.com wrote:
 I want to reset a counter every week in an app that I'm writing at 2
 am every Saturday. I've read that a Handler, not a Timer, should be
 used for updating a UI on a time, but is this also true for weekly
 events? I hope my question is clear...

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

2010-11-19 Thread Lance Nanek
I haven't even seen USB host work on Android without hacking the
platform. If you are willing to do that, however, well it is just
Linux then, and Linux does support some Bluetooth dongles, so it is
possible.

On Nov 16, 2:11 am, Daddym85 davidemulf...@gmail.com wrote:
 Hi,
 my device is an Archos 7 home tablet based on Android 1.5. I have a
 microusb host adapter. If I connect a bluetooth dongle, it turns on
 but Android does not detect any bluetooth device. I have not bluetooth
 options. I think that Android has not bluetooth support.
 Can I install bluetooth driver on my tablet?
 Best regards,
 Daddym85

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

2010-11-19 Thread Lance Nanek
The documentation does mention that if you set your textSize in sp
units, it is scaled by the user's font size preference:
http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

So wouldn't you just have to use a different unit, like dp or px?

I've never actually seen a system wide font size preference, however,
and I must have seen the settings screens on over a dozen Android
phones. I wish there was one, and I've had people ask me about it
before too, but it's incredibly rare if it exists, or is just hidden
somewhere I have no clue to check.

You might want to check that you aren't seeing text size differences
due to running on different density class devices. That's far more
likely.

On Nov 16, 4:09 am, enricozhang zgl...@gmail.com wrote:
 Hello, Everybody.
 I have a problem in my application, do not want to respond to the
 system set in Setting the font size, I used the controls are Button,
 TextView, and so, to how to do, be grateful!

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

2010-11-19 Thread Lance Nanek
Custom subclasses are not supported:
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
 Descendants of these classes are not supported.

It runs in another process. It has no way to load them.

On Nov 19, 3:40 pm, Hendrik Greving fourhend...@gmail.com wrote:
 Can I use a custom view like com.examples.me.customview in the xml file of a 
 app widget and can then draw in the onDraw of the custom view? Or do I have 
 to draw into the drawing cache of an ImageView instead?

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


[android-developers] Re: Can I get a web link to my newly published app

2010-11-19 Thread Lance Nanek
 For entertainment, try an Adwords ad that links to your listing and
 watch it not get approved because the url doesn't work.

I also had trouble with AdWords. The official blog said it supported
ads for Android Market apps, but when I went in the form didn't
support the market protocol URL and the link checker declined the http
protocol URL saying bad status code. Blog here:
http://adwords.blogspot.com/2010/01/new-targeting-options-for-mobile-ads.html

URLs as specified here:
http://developer.android.com/guide/publishing/publishing.html

I went in just now, however, and tried to edit the ad and resubmit to
see if it was fixed. That didn't work, it stayed declined. I stuck an
extra parameter on the end, however, and it tried again. The status
went from eligible to approved this time. So I currently have an
approved ad with display URL market.android.com/net.fizzl.ski (the
official blog claimed you should do market.android.com/ and the app
name, but the form rejects spaces, so the package name was the closest
I could do) and destination URL http://market.android.com/details?
id=net.fizzl.skireferrer=test_ad.

Amusingly, playing with some more ads, I can even get it to approve
one for destination URL http://market.android.com/net.fizzl.ski; (the
blog claimed the form should auto-fill itself out when you enter a
proper display URL, and this is what you get from doing the package
name thing above). That's broken both on Android phones with market
and all other devices, though. So apparently they've gone from
rejecting valid URLs to accepting invalid URLs. At least with the
current buggy behavior you can at least get an Android ad approved,
however, whereas with the previous buggy behavior you could only get
declined.

Who knows if it will even work, though, ha. The blog claims it should
show a download link instead of a URL, but I don't get that when I
visit the desktop version of AdWords on my Android phone where it
shows how the ad looks. Clicking the link there does work, though, and
opens the market details page. You may also want to set the Android
only targeting manually since the official blog seems so wrong on
everything else it is probably wrong on the auto-targeting too.

On Nov 16, 4:45 pm, Nathan critter...@crittermap.com wrote:
 The link to your listing will return 404 on anything besides an
 Android. Yes really. To get a link that will work, you might have to
 use Android Zoom or another Market scraper.

 For entertainment, try an Adwords ad that links to your listing and
 watch it not get approved because the url doesn't work.

 And just wait for Google to penalize your website for having a broken
 link. :(

 Nathan

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

2010-11-17 Thread Lance Nanek
They are for different screen densities on Android 1.6 and up. See
here:
http://developer.android.com/guide/practices/screens_support.html

You don't always have to have resources in each one. If something is
only available in -hdpi, for example, a medium density class device
will scale it down while a high density class one will use it as is.

On Nov 15, 10:28 pm, stymie jamesty...@gmail.com wrote:
 I see three folders drawable-hdpi,mdpi,ldpi.

 Do I need to duplicate my images in all of these folders?Or can I just
 place my images in one or the other and it does not matter?

 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: Bitmap GetPixel() GetPixels()

2010-11-17 Thread Lance Nanek
It's probably getting scaled. Try putting it in drawable-nodpi, if you
are targeting Android 1.6 up. There are programmatic ways to turn off
the scaling as well. We've had threads on that which you can find via
searching.

On Nov 15, 2:34 pm, Thomas Woodhead maddius.back...@googlemail.com
wrote:
 Hi all,

 I am absolutely brand new to android programming, but I have a fair
 amount of experience with 3D programming and games programming in
 general and im trying to build a simple game in android.

 The problem I am having is rather odd, but i'm hoping is a problem
 with me rather than android. I have been using GetPixel and GetPixels
 on a bitmap I have loaded through the bitmap factory. However when
 cycling through the pixel data I seem to get incorrect results.

 For example I made a simple 2x1 pixel image with one white pixel and
 one red pixel just to ensure that colours where being read correctly,
 but it seems that this is not the case. For starters the image was
 read as a 1x1 pixel image with the colour values, presumably
 interpolated between red and white...

 This is a real problem for me as I need the exact value at each pixel.
 Is there a way to get around this or is it just not viable?

 Here is how the image is loaded:

 Bitmap wImage = BitmapFactory.decodeResource(Globals.gResources,
 pLevelRValue);

 Thanks in advance guys.

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

2010-11-17 Thread Lance Nanek
Check the Logcat view in Eclipse right after the error and post the
exception and stack trace (what went wrong and where it went wrong).
You can also use the adb command line tool with the logcat argument,
adb logcat.

On Nov 17, 3:40 pm, goctala talaga...@gmail.com wrote:
 Hi all

 I am a newbie to android development and wanted to run some
 examples...I have a problem running the BluetoothChat example from the
 android sdk directly on my samsung GT I5700 (android 2.1 update 1).

 After I've been prompt to turn on the bluetooth adapter I get an error
 saying:

 The application Bluetooth chat (process
 com.example.android.BluetoothChat) has stopped unexpectedly.Please try
 again.

 I am running from eclipse directly to my phone, all other examples
 work fine except this one.

 Please answer if you have any idea...

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


[android-developers] Re: Local Service vs Remote Service

2010-11-16 Thread Lance Nanek
Yeah, in my personal apps I call the previously registered default
uncaught exception handler from my own. That's why users still get the
force close option. Doing a network call beforehand in the same
process doesn't work well. If you wait you can get situations where
there's an ANR as well as the pending force close and all sorts of
bizarre stuff. If you do it in a different thread and don't wait, then
the force close kills your thread before you send the majority of the
time. I've tried both.

There are a couple rare cases where I don't pass the exception on to
the default handling. I hash the stack trace, compare it to a white
list of known harmless exceptions, and don't pass the exception on if
it matches one of them. This is only good with a very small subset of
exceptions, however. I think I have like an exception or two from
Quattro and Millennial Media ad Networks in there, for example. I hate
using buggy ad networks, but they pay way more per click than AdMob.
Most exceptions you can easily wrap in your own code anyway. These
were getting thrown from threads I don't even start, I think.

At a company where I work they exit the process and restart, but that
adds all sorts of other complications, like restoring state on your
own and making sure you don't get stuck in an endless loop if the app
dies immediately again. If you are restarting over and over, then
obviously it is time to use the original handler, but that's annoying
to detect.

 use Thread.setDefaultUncaughtExceptionHandler() to
 eliminate the force-close dialog and deal with the unexpected
 exception myself, such as logging it to a server. This does not
 require a remote process.

I definitely don't recommend trying to keep using the process for
anything user facing after an unhandled exception in general. I've
tried that and it just doesn't work reliably. Think about it, how is
an activity or UI going to run if the exception killed the loop in the
main UI thread that processes messages or something like that? Only
ever eat the exception if it is something you've reproduced on your
own machines and checked that the process isn't hosed. Most of the
exceptions I get reported aren't something I can reproduce,
unfortunately. I test on all the devices I can get my hands on and
lots of emulator images. We're not talking about common exceptions
here.

 If the user hits the report button, the crash information will
 be available through market feedback.

The official Android reporting sucks. It is only on the latest
versions and requires Market. It requires a double opt-in button press
each time, so users hardly every do it, and yes I have numbers to
prove that. It would have been much better to have an opt-out of
sending stack traces when a user activates or upgrades to a new
Android version that supports it, or when they install an app, and
then an opt-in every time for sending additional, potentially more
private information. Stack traces would still get sent if the user is
lazy and hits force close and doesn't care either way. Something like
that. What good is having all that information when hardly any users
actually send it? It's fine if they don't send for privacy reasons,
but they are not sending because the process is badly implemented and
a pain in the ass for the user.

 Er...  fix the force close in your app...? :p

There are unfixable ones in the Android platform, unfortunately. One
particular one thrown by ViewGroup.offsetRectBetweenParentAndChild
can't even be wrapped by my code. See this thread:
http://groups.google.com/group/android-developers/msg/d378a3dc1b467b44

There are also ones in libraries I use or used, like Millennial Media
and Quattro advertising as mentioned above. I suppose I could
decompile their libraries, fix their bugs, and recompile. Reporting
the bugs to them was about as useful as reporting Android bugs on
b.android.com, which we aren't even allowed to do for anything but the
latest Android versions nowadays anyway, which shows how completely
out of touch that process is with the bugs developers have to work
around every day.

There are also lots of issues that might not be worth fixing as well.
All phones, but Droids especially, can get corrupt databases on
upgrade even though my DB code matches the official tutorials, for
example. Spending time to account for that might help so few users,
however, that it would be better for me to write a feature that would
help much more users instead. Too bad the platform is so unreliable
that even stuff based on the official samples sucks when put out in
production and gives your users force closes.

On Nov 11, 4:14 am, Kostya Vasilyev kmans...@gmail.com wrote:
 The default Android force close dialog is displayed by the default
 uncaught exception handler.

 If you replace the uncaught exception handler, make sure to call the
 previous uncaught exception handler from yours, presumably after writing
 / sending the exception information.

 So you can have the best of 

[android-developers] Re: Collecting my Market installation statistics

2010-11-15 Thread Lance Nanek
Here's what I can open source of the scraper I use:
http://code.google.com/p/skylight1/source/browse/trunk/MarketConsoleScraper/

The juiciest file being here:
http://code.google.com/p/skylight1/source/browse/trunk/MarketConsoleScraper/src/com/wsl/marketconsolescraper/logic/Scraper.java

It currently pulls number of ratings, active installs, total installs,
application name, version, and rating for all apps published by a
Google account specified in a properties file (pathetic security, I
know). It normally runs from a WAR deployed on Tomcat and inserts into
a DB, but can be run from inside Eclipse via the unit tests where it
will output the numbers. HtmlUnit had to be used rather than some
easier scraping options because the numbers are actually retrieved via
AJAX calls, so aren't part of the page unless you have a good
JavaScript implementation.

On Oct 28, 4:40 am, deg d...@degel.com wrote:
 On theMarketweb page, I can see how many copies of my apps have been
 installed.

 But, this only shows the current total. If I want to see historical
 trends, I need to check the page daily and record thenumbersmyself
 -- an annoyance at best.

 Is this info available anywhere on theMarketsite?
 If not, has anyone written a screen-scraping utility (or equivalent)
 that can harvest the data into a spreadsheet?

 Thanks,
 David

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

2010-11-12 Thread Lance Nanek
Ah, darn. This is a big problem for me as well. I have some fancy
software that makes my mouse cursor look like a huge finger that makes
it more obvious where I am clicking in demos and the like. It doesn't
work with the emulator, however, because it forces the mouse cursor to
be its own thing, not the Windows one.

On Nov 11, 1:36 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Nov 10, 2010 at 8:16 PM, app ntj...@gmail.com wrote:
  When i use the AVD to test my apps the cursor in the avd window
  changes from the windows default cursor to a custom black cursor.  I
  would like to use the widows default.  Does anyone know how to
  accomplish this?

 AFAIK, it is not possible except perhaps by some custom firmware.
 Support for that can be found athttp://source.android.com.

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

 Android App Developer Books:http://commonsware.com/books

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

2010-11-09 Thread Lance Nanek
 I can think of no scenarios in which you need a service to
 run in a separate process.

I've run into a scenario. Force close kills your process. So if you
want to do an internet call on unhandled exceptions, doing it in
another thread isn't enough. Users often hit the button before your
internet call can complete. A remote service doesn't get killed,
though.

On Nov 9, 4:01 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Nov 9, 2010 at 1:17 PM, prgmratlarge yossiele...@gmail.com wrote:
  I'm confused about whether I need to run my service in a separate
  process.

 You don't. I can think of no scenarios in which you need a service to
 run in a separate process.

  For reference I'm trying to create an App that uses a service to play
  [streaming] audio in the background.

 Do not use a remote process for this scenario.

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

 Android App Developer Books:http://commonsware.com/books

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

2010-11-03 Thread Lance Nanek
Weird that it isn't search indexed. If you have an awesome new feature
that you think is the sort of thing people search for, you are better
off putting it in your main description because of that. Maybe even
moving something from your main description that doesn't need to be
searched on into this new field so you have the room. Kind of sucks
that the best way to use the new field is to ignore its stated
purpose...

On Nov 3, 6:21 am, String sterling.ud...@googlemail.com wrote:
 Got up this morning and went ahead with some planned releases to a
 couple of my apps. When I got into the app detail page on my Market
 Developer Console, I found a new section: Recent Changes! I pasted my
 changelog in, published my upgrade, and it's already appearing in the
 Market. Text in this box appears to just be appended to your
 description, under a heading of Recent changes:.

 More info from Google can be found 
 here:http://market.android.com/support/bin/answer.py?answer=189724

 All I can say is, WOO HOO! It's about frackin' time!

 String

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Get to My Application in Market as a Developer

2010-11-03 Thread Lance Nanek
Yeah, definitely try opening a link in incognito mode directly to what
you want. I've been unable to open secured Google Docs spreadsheets
any other way for over a week now using my Google Apps account. Any
other way of opening them gives me the normal no permission to access
page, even though I have permission to access them with the exact same
account it complains doesn't have it. Clearing all my browser data
doesn't work. I use separate browsers for my gmail account and apps
account anyway (Firefox vs. Chrome). Something about permissions/
access with google apps accounts is horribly broken right now and
maybe that applies to the market console as well.

On Oct 31, 11:35 pm, claytan...@sightlyinc.com
claytan...@sightlyinc.com wrote:
 Hey all,

 Something really strange happened today and I could really use some
 help figuring it out. I believe its related to Google's SSO
 infrastructure, and I don't really know how to contact Google to get
 my application rescued.

 I have a google apps account I used to create the application, its
 claytantor at sightlyinc dot com not a f...@gmail.com account but its a
 Google Apps account, so I used it to upload and distribute my
 application. Today when I was using blogger my account said do you
 want to use claytantor at sightlyinc dot com or claytantor at
 sightlyinc dot com for this account? what kind of choice is that they
 are both the same? Well my guess is that somehow I chose the one that
 locks me out of my Android Market account because when I went to try
 to upload a new version of my app it thinks I don't have an Android
 Market account.

 Paying the extra 20 bucks wouldn't bug me but there is a version of my
 software out there that I cant access or manage now, and that *really*
 bothers me. If I create a new account I will have two versions of mys
 software floating around the new one and the old one that has been
 stranded! Arrg I cant live with that.

 It also doesn't feel good that I cant figure out how to contact google
 directly.

 Scared,

 Clay

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


[android-developers] Re: Linkify

2010-11-03 Thread Lance Nanek
The value of your href attribute is incorrect. It should start with
mailto:;. Adding an intent-filter to your manifest makes no sense.
You would only do that if you wanted an activity in your app to get
called instead of the email app. The scheme is mailto, not http
anyway.

On Oct 31, 10:50 pm, Priyank Maiya priyankvma...@gmail.com wrote:
 Hi,
 Thanks for the reply.. I am trying to do what you said.
 I defined a string:

 string name= support_requestSupport Request: a href=
 supp...@unl.com?subject=commentssupp...@unl.com/a/string

 In my .java code, I created a textview and called the setMovementmethod like
 this:

         TextView emailLink;
         emailLink = (TextView) this.findViewById(R.id.support_request);

         emailLink.setMovementMethod(LinkMovementMethod.getInstance());

 I am getting the error below when I run the app and click on the email text:
 11-01 02:44:42.431: ERROR/AndroidRuntime(1870):
 android.content.ActivityNotFoundException: No Activity found to handle
 Intent { act=android.intent.action.VIEW
 dat=supp...@unl.com?subject=comments(has extras) }

 I think I am missing something in the manifest file. I am not sure what I
 need to fill there. Whar do I enter in the data field in the intent filter?

 Here is my intent filter I have defined in the corresponding activity:
                    intent-filter
                 action android:name=android.intent.action.VIEW/
                 category android:name=android.intent.category.DEFAULT/
                 category android:name=android.intent.category.BROWSABLE/

                 data android:scheme=http android:host=supp...@unl.com/
             /intent-filter

 I think I am doing something wrong here.
 Please Help.

 Thanks,
 Priyank

 On Sat, Oct 30, 2010 at 7:31 PM, Lance Nanek lna...@gmail.com wrote:
  I haven't gotten autoLink/Linkify to work with subjects, but I have
  used explicit mailto href values that included the subject parameter
  in TextView views successfully. The way I did it the string in the
  strings XML has a literal anchor tag in it with the mailto href
  including a subject parameter. I set the string via the text attribute
  on the TextView in XML and the HTML link gets converted properly. Then
  I also call:
  setMovementMethod(LinkMovementMethod.getInstance());

  On the TextView from code. The amount of HTML a TextView will parse is
  limited, but apparently it is enough for mailto links with subject
  parameters, at least.

  On Oct 30, 5:55 pm, Priyank priyankvma...@gmail.com wrote:
   Hi,

   I am stuck at a place when I was using Linkify to create Link an email
   id to the Android email app.

   I have a large sentence in a textview which has an email id. On
   clicking on it, it opens my android email app. But The problem is
   that, I cannot add any subject or message in the mail. Is there any
   way of doing this using linkify ? Or do I have to use any other way
   for doing this.
   I initially used a textview which had just the email id, from which I
   could add the subject and message, but i will have to keep the email
   id in a separate line. I want the entire line in the textview where
   the email id comes in the middle of the sentence.

   I am currently doing like this:

           TextView emailLink;
           emailLink = (TextView)
   this.findViewById(R.id.support_request);
           Linkify.addLinks(emailLink,Linkify.EMAIL_ADDRESSES);

   Thanks,
   Priyank

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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: ADT painstakingly remove my exclusion setting for android library

2010-11-03 Thread Lance Nanek
It's possible he doesn't have a Subversion plugin installed in Eclipse
and you do. I think there are cases where you have to manually ignore/
mark as derived/whatever the .svn folders without a plugin to do it
automatically for you.

On Nov 3, 10:45 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 3 November 2010 14:11, mianwo mia...@gmail.com wrote:

  I have a common library android project being used by several other
  projects. And I use svn to manage my source code.
  So I have to exclude svn files from compiling process otherwise
  eclipse will generate errors saying something already exists bla
  bla...

 I never had to exclude any SVN folders here nor seen Eclipse
 complaining about these folders. That would be silly as Eclipse
 got nothing to say here. I also got lot of other folders in
 project tree and it's not a problem at all.

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

2010-11-03 Thread Lance Nanek
I have an updated version of a puzzle game I do the programming for in
private beta right now. It adds support for multiplayer challenges. I
can't imagine putting a change like that in this new field. People
might search for multiplayer wanting a multiplayer game and my app
wouldn't show up. I suppose I can put bug fixes in the new field.
Making it non-searchable is not encouraging me to use it correctly.

On Nov 3, 10:03 am, TreKing treking...@gmail.com wrote:
 On Wed, Nov 3, 2010 at 7:46 AM, String sterling.ud...@googlemail.comwrote:

   Weird that it isn't search indexed.

  Good observation. Let's hope that, with the Market improvements that
  are trickling in, this might happen at some point.

  Care to open an issue onhttp://b.android.comabout it?

 If it were searchable, people would just use it as an extension to their app
 description to add more stuff people might search for to find their app. I'm
 pretty sure this is deliberate so people use it as intended - add a
 description of what changed for the people that care: your current users
 that don't need to find your app.

 On Wed, Nov 3, 2010 at 5:42 AM, Pent tas...@dinglisch.net wrote:
  But what is it with 325 ? I'm sure that's not a power of 2 is it ?

 My guess: they hardcoded 325 in several thousand different place and now, if
 they use ANYTHING else, the world will implode.

 -
 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: render an activity to an image file.

2010-10-31 Thread Lance Nanek
Never tried it, but first thing I would try is to just make a Bitmap
the size of the screen, construct a Canvas using the constructor that
takes a Bitmap, then get the Window from the Activity, then get the
decor View from that, and pass the Canvas to its onDraw.

On Oct 30, 8:58 pm, sdphil phil.pellouch...@gmail.com wrote:
 i know you can't take a screenshot without having root access, but is
 there a way to render an activity and all the contents to an image
 file?

 anyone have code to do this?

 it would be nice to have any dialogs, menus, etc... as well, but not
 required.

 tia.

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


[android-developers] Re: How to prevent saving browser pages in activity stack history

2010-10-29 Thread Lance Nanek
I just use a WebView to do the Twitter authorization in the games I
programmed. So I can finish the activity running it without any
problem anyway.

I suppose with your Browser method, once you get to Activity#2, you
could finish and start another Acitivty using FLAG_ACTIVITY_CLEAR_TOP
or something. Although you might then have to start a couple
activities to get your stack built up again if there are things the
user would want to go back to.

On Oct 29, 12:13 pm, Chi Cheng cloudr...@gmail.com wrote:
    1. User click one button on Activity#1 to start Activity#2.
    2. One button on Activity#2 start system default
 browser(Intent.ACTION_VIEW) to get Twitter authorized.
    3. After user allow, Twitter redirect user to Activity#2(Custom
 intent-filter+data) and it save the tokens.

 Now, if I press back key, the app back to browser, how to prevent this
 and return to Activity#1? Try several Intent.Flag before start browser
 with no luck.

 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: Angry DROID2 Owner

2010-10-29 Thread Lance Nanek
Isn't the Droid 2 that buggy phone where all of them have the same
ANDROID_ID? It wouldn't surprise me if that breaks a lot things,
especially login functionality.

On Oct 29, 12:38 am, Stephen Lebed srle...@gmail.com wrote:
 How is you not being able to log into a third party app developers
 games motorola or google's fault?

 What is the specific issue your dealing with?

 What did you do to your phone that you have to exchange it for a base
 model?

 What shame should those companies being feeling?

 On Oct 26, 6:25 pm, Mighty Mo inkaholic...@gmail.com wrote:

  Yup yup. As one of the earlier contribute or is noted, I am that angry
  customer. I was given this link by one of the support members at storm
  8.com. I've also encountered the same issue with crazy pirate
  software.com I am no longer able to login to any of the games that I
  played. 8 games in total on various platforms. My question is this-
  why hasn't someone from motorola or google address this issue with the
  operating system? I just want it's looking like I'm going to have to
  return my droid2  and exchange it for the base model droid if I wanna
  have any freedom to play games and access websites again. I don't mind
  telling you i think it's a massive lapse in judgement for motorola to
  leave their customers hanging like this. Shame shame shame on you
  motorola. Shame on verizon for continuing to sell the phone 2
  unsuspecting customers like me.

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


[android-developers] Re: color banding. can't get over it :(

2010-10-29 Thread Lance Nanek
I saw an interesting article on avoiding this the other day:
http://android.nakatome.net/2010/04/bitmap-basics.html

On Oct 29, 7:01 pm, Hatch tomislav.hecimo...@gmail.com wrote:
 Seems my original post (ugly pngs...) somehow disappeared :(
 nvm.

 I have a problem with a png resource that has gradient fade-out alpha.

 The png looks great in the emulator, but displays an artefact known as
 color banding (http://en.wikipedia.org/wiki/Colour_banding)

 Has anyone surpassed this issue ?

 My designer wants to trop a shadow behind his icons, and that's where
 the bands appear.

 What are my options ?

 Thanks

 Hatch

 BTW is there any way to see all my posts here on google groups ?

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

2010-10-29 Thread Lance Nanek
http://developer.android.com/guide/practices/screens_support.html#attrs

On Oct 29, 10:17 pm, John Gaby jg...@gabysoft.com wrote:
 I have a ListView where the rows are not scaled properly under certain
 circumstances.  If I build my project using the following manifest,
 then the ListView looks like:http://gabysoft.com/images/androidgood.png.
 However, if I change the minSdkVersion to 4 (and that is the ONLY
 change), then the ListView looks 
 like:http://gabysoft.com/images/androidbad.png.
 Note that if I run on a 320x480 device, then everything works fine.

 Can anyone explain what is going on here?

 Thanks

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
       package=com.gabysoft.myapp
       android:versionCode=1
       android:versionName=1.0
     uses-permission android:name=android.permission.INTERNET /
         uses-permission android:name=com.android.vending.CHECK_LICENSE /
     uses-sdk android:minSdkVersion=3 /
     application android:label=@string/app_name
 android:debuggable=true android:icon=@drawable/icon
         activity android:name=.MyApp
                   android:label=@string/app_name
                   android:theme=@android:style/Theme.NoTitleBar
                   android:configChanges=orientation|keyboardHidden
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
 android:name=android.intent.category.LAUNCHER /
             /intent-filter
         /activity
     /application
 /manifest

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

2010-10-27 Thread Lance Nanek
One thing to watch out for is that recent Android SDK versions will
append -v4 to resource folders that use a specifier that Android 1.5
doesn't understand. Before this Android 1.5 would sometimes read the
folder anyway. So, for example, if you had a drawable-mdpi directory
and switched to the latest build tools, it is actually now drawable-
mdpi-v4, which Android 1.5 won't read. For that particular case you
can just make the folder named drawable instead anyway, since it is
considered medium density class by default.

On Oct 27, 6:11 am, Surfer kalik...@yahoo.com wrote:
 Hi

   Hi, i have an app that runs on some 1.5 devices and is preloaded. I
 have now created an update for my app. I have just tested upgrade and
 it has an issue. I'd like to mention that my upgraded version has more
 string/drawable resources than the old one. What happens is when i get
 to the package installer and get the message This will replace
 another application logcat warns me:

 10-26 09:58:23.986: WARN/PackageManager(860): Failure retrieving icon
 0x7f02004b in package com.example
 10-26 09:58:23.986: WARN/PackageManager(860):
 android.content.res.Resources$NotFoundException: Resource ID
 #0x7f02004b
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.content.res.Resources.getValue(Resources.java:846)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.content.res.Resources.getDrawable(Resources.java:534)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.app.ApplicationContext
 $ApplicationPackageManager.getDrawable(ApplicationContext.java:1923)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:112)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 com.android.packageinstaller.PackageUtil.getApplicationIcon(PackageUtil.java:
 92)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 com.android.packageinstaller.PackageUtil.initAppSnippet(PackageUtil.java:
 101)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 com.android.packageinstaller.PackageInstallerActivity.onCreate(PackageInstallerActivity.java:
 349)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1123)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 2231)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 2284)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.app.ActivityThread.access$1800(ActivityThread.java:112)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.os.Handler.dispatchMessage(Handler.java:99)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.os.Looper.loop(Looper.java:123)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 android.app.ActivityThread.main(ActivityThread.java:3948)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 java.lang.reflect.Method.invokeNative(Native Method)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 java.lang.reflect.Method.invoke(Method.java:521)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:782)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
 10-26 09:58:23.986: WARN/PackageManager(860):     at
 dalvik.system.NativeStart.main(Native Method)
 10-26 09:58:24.006: WARN/ResourceType(860): getEntry failing because
 entryIndex 180 is beyond type entryCount 152
 10-26 09:58:24.006: WARN/ResourceType(860): Failure getting entry for
 0x7f0800b4 (t=7 e=180) in package 0: 0x8001
 10-26 09:58:24.026: WARN/PackageManager(860): Failure retrieving text
 0x7f0800b4 in package com.example
 10-26 09:58:24.026: WARN/PackageManager(860):
 android.content.res.Resources$NotFoundException: String resource ID
 #0x7f0800b4
 10-26 09:58:24.026: WARN/PackageManager(860):     at
 android.content.res.Resources.getText(Resources.java:155)
 10-26 09:58:24.026: WARN/PackageManager(860):     at
 android.app.ApplicationContext
 $ApplicationPackageManager.getText(ApplicationContext.java:2240)
 10-26 09:58:24.026: WARN/PackageManager(860):     at
 android.content.pm.PackageItemInfo.loadLabel(PackageItemInfo.java:88)
 10-26 09:58:24.026: WARN/PackageManager(860):     at
 com.android.packageinstaller.PackageUtil.getApplicationLabel(PackageUtil.java:
 81)
 10-26 09:58:24.026: WARN/PackageManager(860):     at
 com.android.packageinstaller.PackageUtil.initAppSnippet(PackageUtil.java:
 103)
 10-26 09:58:24.026: WARN/PackageManager(860):     at
 com.android.packageinstaller.PackageInstallerActivity.onCreate(PackageInstallerActivity.java:
 349)
 10-26 09:58:24.026: WARN/PackageManager(860):   

[android-developers] Re: New ADT available.

2010-10-26 Thread Lance Nanek
Isn't it in tools/lib, not tools? I used it recently...

On Oct 26, 2:49 am, Zarah Dominguez zarahj...@gmail.com wrote:
 Is it just me, or did I also lose the hierarchyviewer when I upgraded
 the ADT? It is not in the /tools folder anymore.

 *grumpy*

 On Oct 14, 1:44 am, authorwjf author...@gmail.com wrote:

  My conclusion is that 0.9.9 is not ready for prime time; I recommend
  everyone to avoid it.

  Well said, String.  I second that.  Short of re-installing I found no
  way to get the environment operational after the update.  Though at
  least I am up and running again.

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

2010-10-24 Thread Lance Nanek
Some production phones let you bypass the activation: the Droid lets
you touch the four corners of the welcome area in clockwise order, the
Vibrant lets you dial a special number in emergency dial that enables
the Home button, the G1 could be flashed back to an easily rootable
version and rooted, etc.. I never looked into the phones that were
sold as dev phones before the Nexus One. Hopefully it is even easier
with them, but I don't know offhand.

On Oct 22, 3:22 pm, chcat vlyamt...@gmail.com wrote:
 Hello,
 I need to showcase WiFi application on smartphone, so i am interested
 in using of smartphone as PDA (no cell access)..
 I wonder if i can do it with Android Dev Phone...
 Can i just start using it without SIM card? Or, if that is not an
 option, can i buy it with blank card.
 Any other ideas?

 Thanks,
 -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: Why doesn't the screen ever time out with the Android Emulator

2010-10-23 Thread Lance Nanek
Maybe the Stay awake - Screen will never sleep while charging option
is enabled in your emulator? It's at Home - Menu - Settings -
Applications - Development .

On Oct 16, 5:40 pm, pprochamp sean.nee...@gmail.com wrote:
 I'm new to the Emulator and trying to test some code.  In the system
 settings of the phone device, I set the screen timeout to 15 seconds.
 However, I never see the screen go dim and lock.  How do I accomplish
 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] Re: Samsung Galaxy Tab: AVD add on package

2010-10-23 Thread Lance Nanek
I was able to test a Google APIs (MapActivity, etc.) using app by
copying the system.img from android-sdk\windows\add-ons
\addon_google_apis_google_inc_8\images to android-sdk\windows\add-ons
\addon_galaxy_tab_samsung_electronics_8\images , overwriting the one
that was there, and then creating a new AVD. Obviously this is a
Frankenstein and not the exact add-on as provided, but at least it
still had the resolution and skin of the Galaxy Tab add-on.

I'm seeing about 150 Galaxy Tab sessions for this app in my metrics,
so I assume the real thing can run Google APIs apps. Although I
suppose there could be development or hacked Galaxy Tab devices out
there that are more capable than production models, or devices lying
and saying they are Galaxy Tab devices, heh.

On Oct 21, 2:47 pm, Paul idi...@gmail.com wrote:
 @Mark Murphy- Right, the problem is with the AVD. I just mentioned
 the Build target at the end as a way of clarification (also not sure
 if emulators/devices automatically include all libraries in
 classpath of running application or if they check manifest, etc.,
 but that is another topic of discussion).

 Main point is- the Galaxy Tab Emulator/AVD  DOES NOT RUN APPLICATIONS
 THAT USE GOOGLE MAPS API.

 Sorry for shouting. Just want people to catch on to the fact that
 Samsung has this thing out there that's not working. Hopefully the
 actual Galaxy Tab itself can support Google Maps API. And hopefully
 they will fix the emulator/AVD soon.

  That is your build target. It says nothing about the AVD. Your problem
  is in the AVD.

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

2010-10-23 Thread Lance Nanek
Weird, the Google I/O session explicitly mentioned Live Wallpapers
when showing the Twitter for Android application's dashboard screen:

Let's get started looking at Twitter for Android shall we?

So, we start with the dashboard firmly in place, and as you can see,
the one twist that we've done with the dashboard immediately, is to
use the goodness of Live Wallpapers, that we shipped in Android 2.1
and animate the home screen.

Those are Twitter clouds and that's the Twitter bird...


I guess maybe the Googler just meant they used the same design
concept, not reused any of the implementation, although that's not how
I understood it at the time.

On Oct 19, 7:44 pm, Romain Guy romain...@android.com wrote:
 No, Twitter is not using a LiveWallpaper. It's just a custom subclass
 of Drawable. There's nothing crazy or advanced about it :)

 On Tue, Oct 19, 2010 at 3:08 PM, Streets Of Boston



 flyingdutc...@gmail.com wrote:
  If i remember correctly, Twitter used to draw its animated backgrounds
  using the LiveWallpaper feature (which you can show in your own
  Activities' backgrounds as well).

  On Oct 6, 8:15 am, oriharel ori.ha...@gmail.com wrote:
  Just like Twitter for android used to have (they removed it) - I need
  to display an animated background drawable.

  How to I show an image that is actually bigger then the given layout
  dimensions (without the image being shrink).

  What kind of animation do I need to use for the moving effect?

  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

 --
 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: stopping the GC from kicking in

2010-10-20 Thread Lance Nanek
Unfortunately, you do have to avoid garbage collection during play
when writing real-time games on Android right now. The garbage
collector usually stops the world for hundreds of milliseconds. For a
smooth experience you need to get a frame out every 33 milliseconds,
preferably every 16ms. Maybe someday Android will have an incremental
and/or concurrent GC and someday the majority of the phones on the
market will be upgraded to that Android version.

But the reality is, if you are writing a real-time game right now, you
will see big jerks in the movement of your game until you avoid GC.
Imagine Angry Birds where the birds just judder randomly in flight
several times before they land instead of smooth arc. When you study
what is ruining the smooth movement in your game, you'll learn you
have to avoid GC - it doesn't matter if you are a C++ programmer or
not.

Re background GCs, they aren't as bad because they aren't in your
process, and there is less you can do about them anyway. I find
turning on airplane mode helps avoid them, however. Sometimes it is
nice to avoid them when testing because that way you don't have to go
check logcat to see which process ID the GC fired in when you see a
judder.

On Oct 20, 2:43 am, Peter Webb r.peter.w...@gmail.com wrote:
   The first thing I recommend watching is this google 
  presentation:http://www.google.com/events/io/2009/sessions/WritingRealTimeGamesAnd...

 I think the advice given in this video is basically wrong.

 It is a presentation done by a C++ programmer who has just written his
 first Java program. His idea of managing GC lag is to not instantiate
 any classes at all in real-time sections of the code. He spends a
 great deal of time explaining how difficult that is.

 This flies in the face of modern software design, which says build it
 right then build it fast. He basically says throw away most of the
 benefits of using auto-GC languages such as Java by writing your code
 in a very artifical way which avoids allocating memory.

 It is a pity because he could have told us some things we (or at least
 I) don't know, such as how the GC is triggered, whether it is device
 dependent, whather there are calls to suspend repacking the heap,
 practical stuff about how to best use a GC language for real-time
 apps. Trying to avoid anything at all which might cause GC to happen
 is throwing the baby out with the bathwater.

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


[android-developers] Re: application requires permissions that i've not set

2010-10-17 Thread Lance Nanek
http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#DONUT

On Oct 15, 2:05 pm, Franco fdmu...@gmail.com wrote:
 hi there

 i have a question about a simple application, the only permission that i
 have set is Internet, because it's a simple application that reads something
 on the net.
 Anyway, the app requires to me (when i install it) three permissions,
 Internet, SD Storage and Phone usage.

 Anyone knows why happens this?

 greetings!

 fd

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

2010-10-16 Thread Lance Nanek
Both are showing up on my USA ATT Nexus One. I noticed it installed
to /data/app-private/ , which means you have copy protection turned
on. Copy protection means your app will only show to a select white
list of phones models/software. The white list tends to be very poorly
updated and can miss updated phones for a long time too.

On Oct 16, 6:29 am, sblantipodi perini.dav...@dpsoftware.org wrote:
 Hi,
 all...

 I have two versions of my software.

 One version is named
 Mortgage Refinancing PRO and is a fully paied version
 and
 one is named
 Mortgage Refinancing PRO Trial and is a free trial version.

 Can you tell me why the trial version isn't present on the market also
 if it is published on my dashboard?

 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: Alternative to GLWallpaperService, OpenGL Live Wallpaper

2010-10-15 Thread Lance Nanek
Did you lookup the usual refresh rate, which is indeed 60FPS, or did
you check the specific number for your phone? I know from my own
testing that the HTC Evo 4G cannot go above 30FPS in OpenGL, for
example. Chris Pruett mentioned one of the XPeria devices doing
similar, running at 30FPS, even when he draws a scene with nothing in
it ( 
http://code.google.com/events/io/2010/sessions/writing-real-time-games-android.html
). I'm just pointing out that you may actually have one of these rarer
crippled phone models rather than a software issue.

On Oct 13, 1:56 am, mr.winky mr0wi...@gmail.com wrote:
 I've been using the GLWallpaperService as posted by Robert Green
 (http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live-
 wallpapers), which has worked so far for the live wallpapers but I'm
 hitting a wall when it comes to performance. The GL code is executing
 at the expected speed when swapping (about 14ms after the swap
 occurs), but there seems to be an extreme overhead with the wallpaper
 code of 33ms.

 For example, if I was to implement a basic live wallpaper that only
 called gl.glClearColor and nothing else, the maximum framerate I can
 achieve is 30fps (33ms), which is far lower than it should be. Now the
 phone refresh rate is 16ms, from what I have read, so I could
 understand hitting a wall at 60 fps.

 The question is if there is an alternative way out there? I tried
 naively using the GLSurfaceView with no luck and am looking for
 suggestions from those who may have encountered this issue or know of
 a solution. I have been googling but all posts send me back to the
 above site from Robert Green as the only way to do this, and I have
 had no luck finding a live wallpaper sample from the SDK that uses
 OpenGL while they state that you have access to OpenGL from here:

 http://developer.android.com/resources/articles/live-wallpapers.html

 I tried searching for the code for the bundled live wallpapers with no
 luck, if anyone could throw me a link to one of the wallpapers that
 uses OpenGL that would more than enough for me to figure it out (if a
 different method is used ;)).

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

2010-10-15 Thread Lance Nanek
Hmm, well live wallpapers do have icons and other UI stuff draw on top
of them. That could slow things down, or the way they are used could
have been written to intentionally limit their speed to preserve extra
capacity for the foreground, etc.. I wonder how easy it is to debug/
traceview them to find out what's going on. It's easy to do for your
own app's process, which you can set to debuggable and not have to be
on an emulator or rooted phone. Live wallpapers probably run in the
home process or something, though.

On Oct 15, 2:27 pm, Robert Green rbgrn@gmail.com wrote:
 The code I posted is mostly just a refactored GLSurfaceView from 2.1
 Master.  It shouldn't perform differently unless something deeper down
 is limiting.

 On Oct 15, 10:15 am, mr.winky mr0wi...@gmail.com wrote:

  Yes, I have verified with an opengl app under GLSurfaceView that I can
  get 60 fps. I havent been able to successfully adapt, beyond what
  Robert Green has posted, the GLSurfaceView to work forlivewallpaper
  without the 30fps barrier.

  Is there someone out there that has solved this?

  On Oct 15, 6:54 am, Lance Nanek lna...@gmail.com wrote:

   Did you lookup the usual refresh rate, which is indeed 60FPS, or did
   you check the specific number for your phone? I know from my own
   testing that the HTC Evo 4G cannot go above 30FPS in OpenGL, for
   example. Chris Pruett mentioned one of the XPeria devices doing
   similar, running at 30FPS, even when he draws a scene with nothing in
   it 
   (http://code.google.com/events/io/2010/sessions/writing-real-time-game...
   ). I'm just pointing out that you may actually have one of these rarer
   crippled phone models rather than a software issue.

   On Oct 13, 1:56 am, mr.winky mr0wi...@gmail.com wrote:

I've been using theGLWallpaperServiceas posted by Robert Green
(http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live-
wallpapers), which has worked so far for thelivewallpapers but I'm
hitting a wall when it comes to performance. The GL code is executing
at the expected speed when swapping (about 14ms after the swap
occurs), but there seems to be an extreme overhead with thewallpaper
code of 33ms.

For example, if I was to implement a basiclivewallpaperthat only
called gl.glClearColor and nothing else, the maximum framerate I can
achieve is 30fps (33ms), which is far lower than it should be. Now the
phone refresh rate is 16ms, from what I have read, so I could
understand hitting a wall at 60 fps.

The question is if there is an alternative way out there? I tried
naively using the GLSurfaceView with no luck and am looking for
suggestions from those who may have encountered this issue or know of
a solution. I have been googling but all posts send me back to the
above site from Robert Green as the only way to do this, and I have
had no luck finding alivewallpapersample from the SDK that uses
OpenGL while they state that you have access to OpenGL from here:

   http://developer.android.com/resources/articles/live-wallpapers.html

I tried searching for the code for the bundledlivewallpapers with no
luck, if anyone could throw me a link to one of the wallpapers that
uses OpenGL that would more than enough for me to figure it out (if a
different method is used ;)).- 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: Life after G1

2010-10-15 Thread Lance Nanek
I have an ATT 3G compatible Nexus One. They sold them in two variants
for this reason. Not sure if they still do. Google doesn't sell it as
a consumer phone anymore.

You might want to check the numbers of various devices out there
before deciding what to get. I know my metrics show hardly any Dell
Streak devices, for example. If I had to pick two devices to use as
test hardware, the Streak wouldn't be one of them, simply because so
few people have it. I'd probably grab a phone with a PowerVR GPU like
a Droid and one with a Snapdragon and skip any tablet unless they take
off.

On Oct 14, 12:46 am, String sterling.ud...@googlemail.com wrote:
 On Oct 13, 11:53 pm, mikek mik...@gmail.com wrote:

  The nexus looks great but at ~$550 it's a bit steep considering I'll
  probably need an android tablet for development as well soon.

 Be aware that the N1 isn't compatible with ATT's 3G network. You
 would still be able to connect, but not at full speed.

  BTW, any thoughts on what would be a good developers tablet and when
  they might be available.

 At this point, any answers to this question would be a complete WAG.

 String

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

2010-10-12 Thread Lance Nanek
I use the Android Market to offer paid upgrade apps from free apps
myself. It doesn't work well. For one thing, you are never sure if
launching a Market intent for a paid app will even work. The user
might be in a country or on a carrier that doesn't support it.
Checking against a country list before showing a market intent button
to a user leaves you with list of countries you have to maintain and
isn't even bullet proof when maintained properly because sometimes
there are carriers that don't support paid apps in countries that
otherwise do.

There are other problems as well. I get emails from users who can't
get downloads to start, for example. A common problem with the Market
app that hasn't been fixed in a long time. I generally give them a
link to that Google support page where Google does nothing and
there's pages and pages of users trying bizarre workarounds like
resetting their Google Talk connections. Hopefully Amazon will make
more money off their market and be more inclined to fix ridiculous
situations and bugs like this.

I don't even want to sell paid one shot upgrades delivered separately
anyway. I'd much rather have a free, expansive game that just offers
repeatable shortcuts to people willing to pay to help support it. E.g.
the game would be free, let's call it MyMineCraft. After each day-
night cycle a store would pop up where a user could choose to buy an
item that would otherwise take them a lot of trouble to obtain, like a
titanium pick axe. It would break after a while and they could either
buy another one, or they could buy a subscription and get one free
item from the store per day. The whole purchase mechanism could be
made much more painless for users if you didn't have to leave the app
and download something through the Market.

You can't do this sort of thing with PayPal either. They've explicitly
said that the Android Market policy prevents you from selling digital
content using it:
https://www.x.com/message/176744

There are many game developers who would prefer to have enhanced
subscriber experiences or purchasable digital goods options built-in
to their free apps instead of as paid apps. These ways of making money
are huge hits in the industry. I'm amazed Android has such poor
support for them. No wonder a recent presentation I saw someone from
Flurry give showed so many more developers writing for iOS than
Android.

On Oct 3, 5:40 pm, Doug beafd...@gmail.com wrote:
 On Oct 2, 5:51 pm, Lance Nanek lna...@gmail.com wrote:

  The lack of users on alternative app stores is a big disadvantage.
  Still, if they had a method for in app purchases, including of
  expendable virtual goods and of extra subscription services, that is
  super easy for users to use, I'd probably use their store. Selling
  unlock apps like we have to on Google Market is a pain for the user
  and developer both, and limited in what it can do.

 Many developers, including myself, maintain both free and paid
 versions of an app on the market.  It's not great, but it's not that
 much trouble, and mostly boils down to following a procedure on your
 end to build each version.

 If you need to sell something in your app other than the app itself,
 you can use PayPal X, which has an Android SDK.

 https://www.x.com/community/ppx/xspaces/mobile

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

2010-10-10 Thread Lance Nanek
The Activity should be getting an onWindowFocusChanged(false) call.

On Oct 7, 12:42 pm, Tim Wright tim...@gmail.com wrote:
 Dear All,

 I am working on an application and I want to be able to detect when a
 pop-up (e.g Charger notification, task switcher or the dialog that
 pops up when you hold the power button) is obscuring the game so that
 I can bring up the pause menu. These notifications do not produce an
 onPause event. Does anyone know the correct way to do this? I know
 it can be done by detecting the focus loss from the surfaceview,
 however views can be added and removed I was wondering if there is a
 better way of doing this than adding a focus handler to each one and
 trying to keep track.
 Thanks in advance,

 Tim

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


[android-developers] Re: No Texting While driving .....

2010-10-09 Thread Lance Nanek
The Location object returned by the GPS location service often has a
speed property set on it as well.

On Oct 9, 2:41 pm, Bret Foreman bret.fore...@gmail.com wrote:
 Simply put, you want to find velocity, v. From the accelerometer you
 can get dv/dt, which you can integrate to get v. From the GPS you can
 get the location, x, and dx/dt is also v. So you have two versions of
 v, one that is fast but tends to drift (from the accelerometer) and
 one that is slow but steady. This is a perfect use-case for the
 Kalman filter.

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


[android-developers] Re: Market misery !!

2010-10-09 Thread Lance Nanek
Some of the companies I've seen move away from writing full native
apps still get listed in the app stores by writing a launcher app. The
launcher app just shows the web site in a WebView and lets them get
listed in the app stores.

On Oct 9, 4:00 pm, JP joachim.pfeif...@gmail.com wrote:
 On Oct 9, 11:46 am, Yahel kaye...@gmail.com wrote: I am so upset !!

 You must be new here.

  but the best exposition tool should normally be the
  market !!

 As Fabrizio indicates, not any longer. Same applies to iTunes store,
 we hear. That's why you see publishers/devs move away from native to
 mobile web app development, where ever it makes the slightest sense.



  [Actual question]
  So how long between two updates to be sure to show up in the just in
  category ?

 I think it was twelve days; I've never gone below a couple of weeks to
 a month and the release popped to the top of the list. Not that it
 matters much anymore.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Unit testing a class that uses android.os.Handler

2010-10-08 Thread Lance Nanek
Handler has multiple constructors. The ones that take a Looper
argument can take the Looper for a Thread other than the current one.
That way you don't need to create the Handler on that Thread and it is
easier to ensure it is not null on the Thread using it. There's also
an android.os.HandlerThread utility class that is pretty much just a
Thread with a Looper. It has a getLooper method that's easy to feed
into the Handler constructor and that avoids the issue with prepare()
taking a while sometimes and leaving you with a null longer than you'd
expect.

On Oct 7, 8:04 pm, DanH danhi...@ieee.org wrote:
 Come to think of it, how would one create a Handler for another
 thread?  You'd have to dispatch the thread and have it create the
 Handler and pass the pointer back to you (we won't worry about how),
 but then that thread needs to go into a message receive loop.

  Apparently this is done via Looper.  I'm guessing the code would be
 like this:

   class LooperThread extends Thread {
       public Handler mHandler;

       public void run() {
           Looper.prepare();

           mHandler = new Handler();

           Looper.loop();
       }
   }

 You'd start this thread and then use your pointer to it to access
 mHandler (though you'd have to guard somehow against getting a null
 before the reference was set).  Then dispatch Runnables or Messages
 via that handler.

 (Gotta wonder where Looper stashes the instance it creates of itself
 to attach to the Thread.  I suppose it uses ThreadLocal.)

 On Oct 7, 4:38 pm, DanH danhi...@ieee.org wrote:

  But I don't see anywhere in the Handler spec where it says the thread
  will be dispatched.  It appears to me that when the thread is posted,
  Handler will just run its run method, without starting the thread.
  If you wanted to run on a separate thread it appears to me that you'd
  have to start the thread, have that thread create a Handler and pass
  it back to you somehow, and then post via THAT Handler.

  At least that's how I'd interpret this:  Each Handler instance is
  associated with a single thread and that thread's message queue. When
  you create a new Handler, it is bound to the thread / message queue of
  the thread that is creating it -- from that point on, it will deliver
  messages and runnables to that message queue and execute them as they
  come out of the message queue.

  On Oct 7, 4:25 pm, Jeremy Wadsack jeremy.wads...@gmail.com wrote:

   Fair point. The // Do some tasks is doing long-running (Internet-
   connected) stuff, so I want it to run in a separate thread. As I
   understand, posting the Runnable without a thread would run it on the
   main thread.

   I assume the gc will clean up the Threads as they expire, but I could
   also redesign this to have a single active thread that posts Runnables
   (or even just messages) to it's own MessageQueue at specified
   intervals. Then I'd be managing the looper myself (that is, calling
   Looper.loop), which would probably resolve this issue.

   That doesn't answer the original question but it may be the right
   approach if it's more android-y.

   --
   Jeremy Wadsack

   On Oct 7, 1:20 pm, DanH danhi...@ieee.org wrote:

Kind of off-topic, but why are you creating a new Thread with each
post, vs simply posting the Runnable?

On Oct 5, 5:47 pm, Jeremy Wadsack jeremy.wads...@gmail.com wrote:

 I have a class that uses a Handler for a timed, asynchronous activity.
 Something like this:

 public class SampleClass {
   private static final long DELAY = 3;
   private boolean isRunning = false;
   private Handler handler = new Handler();

   public start() {
     if (!isRunning) {
       isRunning = true;
       handler.post(new Thread(task));
     }
   }

   public stop() {
     isRunning = false;
   }

   private Runnable task = new Runnable() {
     public void run() {
       if (!isRunning) {
         return;
       }

       // Do some tasks
       handler.postDelayed(new Thread(this), DELAY);
     }
   }

 }

 I am trying to write a unit test (without having to implement an
 activity that instantiates the class) but I can't seem to get the
 items that are posted to the MessageQueue to ever be fired. Inheriting
 from junit.framework.TestCase doesn't work, but then there wouldn't be
 a MessageQueue for the handler, I'd expect (although, there's no
 error, but the Runnable never gets called). I tried inheriting the
 test class from AndroidTestCase and ApplicationTestCaseApplication
 but neither of those works, even though the former is supposed to
 provide a Context and the latter all the life cycle of an
 application.

 Anyone have any pointers?

 --
 Jeremy Wadsack

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

[android-developers] Re: GLSurface doesn't draw anything when i came back again.

2010-10-08 Thread Lance Nanek
Well, one thing I can think of, make sure you are reloading your
textures in Renderer#onSurfaceChanged. They get cleared more often
than onSurfaceCreated is called. Also make sure your Activity is
calling GLSurfaceView#onPause and onResume at the right times.

On Oct 5, 9:36 pm, choi devmc...@gmail.com wrote:
 Hello,

 I'm tryting to switch between normal view and glsurface view. For
 doing these operation, i assume it as

 Intent myIntent = new Intent(this, GLActivity.class);
 startActivityForResult(myIntent, 0);
 finish();

 but when i come back again to GLActivty, i see nothing on the screen.
 It has to draw all images.
 black screen is only i can see there. Anyone knows what am i doing
 wrong?

 Regards.

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


[android-developers] Re: how to intercept javascript onclick=window.close()

2010-10-08 Thread Lance Nanek
The WebView's WebChromeClient's onCloseWindow method gets called,
provided JavaScript is enabled in the WebView's WebSettings.

On Oct 3, 11:31 pm, jgaribay juan.garibay.cervan...@gmail.com wrote:
 Hi,

 I am displaying web content in a WebView but I am having issues to
 identify when the user presses a cancel button which should close the
 current window.

 The cancel button is defined as follows in the page source code:
 input value=Cancel name=cancel type=button
 onclick=window.close(); /

 There are other buttons which I am able to handle using
 shouldOverrideUrlLoading() but since this cancel buttons does not
 attempt to open a new page, this is not working.

 Does anyone know if there is a way to intercept this cancel???

 By the way, when cancel button is pressed nothing happens.

 Thanks in advanced,
 Juan

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

2010-10-08 Thread Lance Nanek
 I have been contacted by AppsLib and Archos. Compared to Amazon, no
 one has ever heard of AppsLib. But they are on the device, and
 Google's Market won't be. So I'll probably comply, even though some
 things won't work without GPS and compass.

The Archos 5 Internet Tablet has GPS. I don't know about their other
Android devices.

On Oct 5, 12:55 am, Nathan critter...@crittermap.com wrote:
 On Oct 4, 7:14 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com
 wrote:

  I got the e-mail and read the terms. I decided to stick with the
  Android market and forget this one. I think it's going to be a dud.
  Then again, what do I know?

 I didn't get any offer from them. Guess I should feel slighted.

 They have to be planning an Android device. It doesn't make sense
 without that. And even then ...

 I don't know if those jumping through hoops to get the Android Market
 on a non-approved device are the same order of magnitude as those who
 would root their devices. I think the combination of Google's
 disapproval and Amazon's control will keep that away from the
 mainstream.

 I have been contacted by AppsLib and Archos. Compared to Amazon, no
 one has ever heard of AppsLib. But they are on the device, and
 Google's Market won't be. So I'll probably comply, even though some
 things won't work without GPS and compass.

 Nathan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Obfuscating parts of an application. Wise or not?

2010-10-05 Thread Lance Nanek
Why would you think a JAR provides any obfuscation at all? I open them
as ZIP files all the time. Not to mention that Android doesn't even
run Java bytecode. Any JAR you put in your project's classpath is just
a source for Java bytecode that gets converted to Dalvik bytecode and
put into a file in the APK when you build your project.

On Oct 5, 11:26 am, Moto medicalsou...@gmail.com wrote:
 I'm a bit scared about obfuscating my application completely.  I'm
 afraid to run into issues where I can't figure out a bug because lines
 and function names wont match.  Please correct me if I'm wrong...

 I thought maybe the simplest way to protect important parts of my code
 is to create a jar of the important files. I know and understand that
 jars are good only for classes and no xmls or other Android dependent
 parts. I believe it would be simple this way since I would not have to
 worry about obfuscating too much and breaking my project.  Also, could
 be helpful for distributing to clients a library which they can't
 decompile.

 In terms of obfuscating jars maybe I could do the same to the Market
 Licensing code to protect my paid application from pirating?

 What are your thoughts on my approach?  Maybe bad idea? What
 experiences have you had with obfuscating your application?  Is it not
 as bad as I think?

 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: android design considerations: AsynchTask vs Service (IntentService?)

2010-10-03 Thread Lance Nanek
 AsyncTask runs as a separate thread and does interact with the Activity's
 lifecycle. It is associated with the instance that executed the AsyncTask,

AsyncTask is not associated with the Activity instance that executes
it. Some people define their subclasses of AsyncTask as non-static
inner classes, which have a reference to the instance of the class
they are defined in. It is easy to make static inner class subclasses
instead, however, or even stand alone subclasses in their own file.
Neither of these types of AsyncTask subclasses have an implicit
reference to the instance that creates them.

On Oct 3, 2:45 pm, Prakash Iyer thei...@gmail.com wrote:
 Dianne,

 With all due respect, HandlerThread or Thread do NOT convey the message that
 they can be used with the UI in the same way that an AsyncTask does. In fact
 even a small para saying something like

 AsyncTask runs as a separate thread and does interact with the Activity's
 lifecycle. It is associated with the instance that executed the AsyncTask,
 however the onProgress and onResult are called in the main UI thread that
 deals with the currently active instance which could be different than the
 one that executed the AsyncTask. Thus the developer must ensure that any
 reference to the Activity or UI components are not stale.

 would help, IMHO.

 I think we are beating a dead horse here and way off topic for the OP, so I
 will stop...

 On Sun, Oct 3, 2010 at 1:13 AM, Dianne Hackborn hack...@android.com wrote:
  On Sat, Oct 2, 2010 at 3:39 PM, Prakash Iyer thei...@gmail.com wrote:

  Each his own. Try writing a AsyncTask that say lives for more than 10s and
  in the final result say updates a text field. Now before the AsyncTask
  completes, just change the orientation. I'd bet most developers would 
  assume
  the text field will get updated. Most developers would be wrong as the
  AsyncTask's onResult will be calling the original object's (the one that 
  did
  the execute) text field and not the one that is currently displayed. Can 
  you
  make sure this works? Yes! Should this be documented? I would think it is
  absolutely essential.

  This has *nothing* to do with AsyncTask, this is all about the
  peculiarities of Activity.  You will run into the same issue if you use
  HandlerThread, a raw Thread()...  heck, you'd even have the issue if you
  didn't use another thread at all but just Handler.postDelayedMessage().

  This behavior is documented in the material Activity; it doesn't make any
  sense to try to document this in every other generic facility for
  asynchronicity just because if you use that with an Activity you will need
  to understand how Activity instances can be fairly transient.

  And what you need to do with AsyncTask is *different* depending on where
  you are using it -- in an Activity, or a Service, or a View, or whatever.
   They each have their own sometimes subtle details about lifecycle that you
  need to understand when introducing asynchronicity.  AsyncTask can't try to
  document exactly how to use it when combined with every other possible
  facility.

  --
  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.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: Running OpenGL ES 2.0 application on emulator

2010-10-02 Thread Lance Nanek
The GLES20Activity in the API Demos uses an alternate OpenGL ES 1.x
render implementation when it detects that OpenGL ES 2.0 is not
supported, like on the emulator. Look at the source code. That's
pretty much the whole point of that sample activity.

On Oct 1, 6:50 am, Andy milind...@gmail.com wrote:
 Hi there,

 I need to work on OpenGL ES 2.0 for android. As a first step I tried
 compiling APIDemo application available in sample directory that comes
 with SDK. And my observations are as follows:

 1) Android-8 SDK has extended OpenGL ES 2.0 class/APIs that are not
 available on earlier releases.
 2) APIDemo application has been updated to demonstrate the
 opengl.android.gles20 class/API usage.

 But over reading many postings on opengl.android.gles20, I see that
 many people say that OpenGL ES 2.0 applications cannot be run on
 emulator and such application need real hardware.

 But I was able to run the API demo application on emulator as well.

 So I am really confused why it is said that we cannot run the 2.0
 applicaiton on emulator? Can anyone explain me?

 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: Is anyone's active install % dropping like a rock lately?

2010-10-02 Thread Lance Nanek
  you have some automatic tools to do that or something I never saw in
  my console ? Seems like a daunting task ...

I ended up writing a web scraper for the publishing console using
HtmlUnit. The numbers in the console are populated using JavaScript
(generated via Google Web Toolkit), so you have to use a library
capable of running JavaScript rather than simpler tools if you want to
go the scraping route.

 http://code.google.com/p/android-market-api/

AFAIK, that doesn't have all the numbers that the developer's
publishing console does, like the active install count. Makes sense if
it is just reverse engineered from what the Market app calls, since
that app never shows active installs anywhere.

On Oct 1, 10:00 am, { Devdroid } webnet.andr...@gmail.com wrote:
 On 1 October 2010 15:43, Yahel kaye...@gmail.com wrote:

  Hi all,

  Sorry but I see you giving percentage and all about your date, just so
  I know, do you guys actually go everyday on the developper console and
  record in some kind of excel sheet the numbers you find there ? Or do
  you have some automatic tools to do that or something I never saw in
  my console ? Seems like a daunting task ...

 http://code.google.com/p/android-market-api/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Mapping 6 faces of cube with 6 different images

2010-10-02 Thread Lance Nanek
Technically, you can draw the faces separately, binding a different
texture in between each draw. That'll be really slow, though. It's
usually better to put all six images into a single texture, then for
each face use texture coordinates into that single texture to only
show the part with one of the six images. This technique is called
using an atlas texture.

There's lots of tools and scripts out there for taking separate images
and putting them together into atlas textures for you and generating
the texture coordinates. For only six images, though, you are just as
well off pasting them into one image in a graphics editor and hard
coding the texture coordinates to match, though. Or learning Blender,
a free 3D modeling tool, doing the texture mapping there, and
exporting to OBJ or some other easily readable format.

On Oct 1, 3:27 am, Girish H T htgir...@gmail.com wrote:
 Hi all,

 I am newbie to OpenGL programming. I was going through the code of API
 demos.I understood how to map a single image resource on to all the 6 faces
 of the cube,but i want to know how can i map 6  faces of the cube with 6
 different images.

 I searched in the web without any luck.Can any one give me some ideas links
 , pointers on the same. Any sample application that i can refer to will be
 much appreciated.

 Thanks in advance.

 Regards
 Girish

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

2010-10-02 Thread Lance Nanek
The lack of users on alternative app stores is a big disadvantage.
Still, if they had a method for in app purchases, including of
expendable virtual goods and of extra subscription services, that is
super easy for users to use, I'd probably use their store. Selling
unlock apps like we have to on Google Market is a pain for the user
and developer both, and limited in what it can do.

On Sep 29, 7:16 pm, Shane Isbell shane.isb...@gmail.com wrote:
 Right. Whoever is making the strategic decisions for Android at Amazon, is
 not terribly on the bright-side. Copying Apple's policies for Android won't
 work. Much lost potential on this one.

 On Wed, Sep 29, 2010 at 2:29 PM, Michael A. michael.aki...@gmail.comwrote:

  Narrow distribution, high entry fee, and terms that appear much more
  restrictive and even more developer unfriendly than the Android
  market,

  Sigh. For a short while, I hoped we might finally see a viable
  alternative to the Android market. No such luck, it seems.

  On Sep 29, 9:56 pm, Shane Isbell shane.isb...@gmail.com wrote:
   As more details emerge: 1) only US customers; 2) $99 registration; 3)
  only
   Amazon approved devices - it's a no-go in my book. What advantage could
  this
   provide, with such a narrow distribution and high-entry fee?

   On Sun, Sep 26, 2010 at 1:34 AM, Doug beafd...@gmail.com wrote:
On Sep 25, 8:03 pm, Shane Isbell shane.isb...@gmail.com wrote:
 Personally, I'd use Amazon over AndroidMarket, if the rating and
  comment
 system was any where near the quality Amazon has on their primary
  site.

Personally (as a person who wants to get paid for work), I'd prefer
any mechanism that's built into phones that ship today.  That
mechanism is Android Market.

I have an app that's on both Android Market and SlideME.  SlideME
provides less than 1/100 of the sales that the market provides me
today, despite SlideME's superior market coverage.

Unless Amazon can position itself as a market leader for Android
mobile apps worldwide, I'd leave it alone.  (The barrier for Amazon to
do this is somewhat similar to the barrier any that desktop web
browser has over IE in terms of raw ubiquity.  Just wait for the
injunction that requires Android phone manufacturers to require app
market alternatives to require something other than Android Market.)

Doug

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.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: OutOfMemory exception in OnCreate

2010-10-02 Thread Lance Nanek
You might want to try just tossing a System.gc() in early on in your
onCreate. That almost always solves out of memory problems for me on
Android. It's a shame the memory management is so badly written that
it needs this. You aren't supposed to be able to get an out of memory
error when garbage collection would help. That's how it works out,
unfortunately, however. Has something to do with memory taken up by
bitmaps not getting collected until finalizers run, or being tracked
separately or something like that. There's countless threads on this
if you search. I see it happen even when I'm not using bitmaps
manually and when I am, but I'm calling recycle on them properly, so
they probably get used by built-in stuff as well.

On Oct 2, 7:53 pm, Yahel kaye...@gmail.com wrote:
 Thank you for your answer.

  You haven't shown us enough of your code (code snippets) for us to...

 Yes sorry about that, it's just that I don't seem to understand where
 everything goes wrong. The line giving me an error is a simple
 setContentView with a simple background image in a FrameView. So I am
 trying to narrow down the causes before I overflow the group with my
 10 000 or so lines of code :D

  But since many instances of your activity can exists,

 Do you mean that there can be multiple instances of my app running at
 the same time, all using the same oncreate method ? I didn't know it
 was possible...Could you explain to me how to reproduce this case ?

 Tahnks again for your time.

 Yahel

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


[android-developers] Re: Can I post text to facebook profile from my android application?

2010-09-30 Thread Lance Nanek
Make sure to do some testing and tweaking if you use the official one.
It isn't integrate and forget quality. I had to add a cancel listener
in FbDialog so my app knew when users left by the back button, for
example. Make sure the web view stops loading when they leave as well,
otherwise you get an error later. Also had weird problems with the
sizing when testing various screens/rotations, buttons were offscreen,
etc... Ended up making the thing full screen and scrollable. There's a
bunch of issues on github page you can check out.

On Sep 27, 4:58 am, Zarah Dominguez zarah.doming...@gmail.com wrote:
 Sure you can!

 You can get the official Facebook SDK for Android 
 fromhttp://github.com/facebook/facebook-android-sdk

 There are also examples there to help you get started.

 Good luck!

 -Zarah.

 On Sep 27, 3:52 pm, rokson kiranrepa...@gmail.com wrote:

  Hi Friends,

  This is Rockson,
  I am new to android. Here i am struggling with facebook posts from
  android application.

  I am developing a application in android from which i want to post
  some text to my facebook profile.

  Can i do that? Please help me.

  Thanks and Regards,

  Kiran.

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

2010-09-27 Thread Lance Nanek
I kind of managed this the other day in a hackish sort of way. I
wanted to use an open source RSS library that used java.beans.** Java
classes, which aren't in Android. So I downloaded the source for those
classes from the Apache Harmony project, ripped out all the references
to AWT stuff, and got the library source code imported and compiling
against it. Then I refactored the packages to notjava.beans.**. So
anyway, sometimes you can work out a substitute for the missing Java
classes and alter all references to point to that substitute.

On Sep 26, 9:32 pm, altaf sayyed altafhsay...@gmail.com wrote:
 How can I install java classes not included with android ?

 Is it possible to add java.awt.image package into android?

 Where can I find above package jar file?

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

2010-09-27 Thread Lance Nanek
Call setOnTouchListener on the ImageView. The OnTouchListener instance
you pass in as the argument will have the onTouch method called on it
with a MotionEvent instance with coordinates. You can also override
the onTouchEvent method in your Activity subclass to get called for
any touch events not handled by views.

On Sep 26, 9:42 pm, b adlak...@gmail.com wrote:
 Hi, I'm trying to get coordinates of the mouse, but there seems to be
 no easy ways.
 Can't make the MotionEvent object because the constructor is private.
 Can anyone please tell me how to get the coordinates of the touch/
 pointer/mouse?
 Thanks
 PS: I only want the touch coordinates of ImageView, but wouldn't mind
 the touch coordinates anywhere on the screen. 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: Proguard, Android, and the Licensing Server, or...

2010-09-26 Thread Lance Nanek
ProGuard has great documentation. Click on the Manual link on the left
at their site:
http://proguard.sourceforge.net/

They even have an example configuration file for Android projects in
the Examples section. It was there a long time before this recent
change by Google to add ProGuard support to the official Android build
files as well. I did all my testing with ProGuard back then and had
very little problems. I really can't agree that this is lacking
documentation.

On Sep 26, 2:55 am, Indicator Veritatis mej1...@yahoo.com wrote:
 Google people should stop telling people to go read the source or
 go read the config file, when others ask for what Google should have
 documented.

 On Sep 25, 7:15 am, Xavier Ducrohet x...@android.com wrote:

  People should read the blog post Dan posted and read the files that
  comes with it.

  one of those files is the Ant additional rules, the other one is a
  proguard config file.

  In this file, there are rules to not obfuscate the activity, service,
  broadcastreceiver, etc... classes.
  For the native method, it's not if the name contain native, it's if
  the method *is* native.
  (there are more rules in there, go look at it)

  This file is placed in your project folder and the Ant rules calls
  proguard with it.
  You are free to add any rules you might see fit.

  It's a lot better than the tools doing some sort of static analysis on
  your code and hoping we catch all the cases where your code shouldn't
  be obfuscated.

  Using an annotation would work, but we'd have to look at all your code
  (making the build slower), and wouldn't work if you reusing someone
  else's code who didn't think about it. Managing a simple text file is
  how proguard already does it, and it's more lightweight to simply edit
  that file than going to look for annotation in your code.

  Xav

  On Sat, Sep 25, 2010 at 2:40 AM, Indicator Veritatis mej1...@yahoo.com 
  wrote:
   That is excellent information. Thank you for posting it.

   But there is one thing that surprises me as it is written, so I must
   ask for clarification: when you say, there is no way we can figure it
   out programmatically[sic], do you mean that such is the case even when
   Proguard is integrated with ADT? Surely you can at least do most of
   them by identifying classes needed by AndroidManifest.xml by simply
   reading AndroidManifest.xml. Or are there many other classes that also
   need to be protected? From reading Dan's post, it seems the former
   were the main examples of classes that need to be protected.

   BTW: using the native method name as the name of the class sounds like
   it should be discouraged: obfuscation difficulties just might be
   discouragement enough;)

   I am not sure what you mean by anything which has a constructor
   similar to a View, but it SOUNDS like you could introduce a decorator
   to simplify handling all of these special cases. @no_obsfucation is
   the name that occurs to me, but I am sure you can do better.

   On Sep 24, 6:00 am, Xavier Ducrohet x...@android.com wrote:
   We are working on direct support in ADT/Ant. We just decided to
   release a quick blog post on how to manually add this to Ant since
   it's somewhat easy to do (unlike ADT).

   However, proguard does need to know about which class to not obfuscate
   and there is no way we can figure it out programmatically. Proguard
   itself does try to detect reflection usage, but if it's too dynamic
   (for instance the class/method/field to use by reflection is dynamic
   and too complex to see where the value is coming from) it will fail.

   The proguard config file shown in the Dan's blog post (a different Dan
   btw) provides exclusion for the common cases:
   - anything that extends Activity, Service, Application,
   BroadcastReceiver, ContentProvider as those are referenced in the
   manifest.
   - anything that has native method as the name of the class is used to
   find the native function name
   - anything that has a constructor similar to a View, to no rename
   custom views as their name are referenced in layouts

   This should cover all the default cases. Now, if you do some fancy
   reflection you will have some problem, and will have to tell proguard
   what to not obfuscate, but there's nothing we can do about and any
   obfuscators will have similar problems.

   We are looking at implementing Proguard in ADT/Ant in a way that makes
   it easy to plug a different obfuscator, so if you prefer a different
   solution you will hopefully be able to use it, but I'm pretty sure
   you'll have the same issues.

   Unfortunately I can't give a release date for the next version, but we
   usually try to release new tools every 2-3 months.

   Xav

   On Thu, Sep 23, 2010 at 6:50 PM, Indicator Veritatis mej1...@yahoo.com 
   wrote:
It is not just you. I was pretty disappointed when I read that post,
too. I did get a kick out of seeing what a menacing appearance Dan has
with his 

[android-developers] Re: Proguard, Android, and the Licensing Server, or...

2010-09-25 Thread Lance Nanek
Neat idea. An annotation wouldn't work for things in JAR libraries,
however. Back when I tested ProGuard to see if it helped my frame
rates, I had to turn obfuscation off for some classes in JARs I use.

Not sure why, maybe the library used reflection or something. It
wasn't even a weird library, just one of the metrics or ads ones that
lots of people use.

The most powerful solution would be to just have a file field in the
project properties for a ProGuard config file to use. I guess since
people are complaining they can't use Ant, maybe they would complain
they can't edit config files on their own too, however.

On Sep 25, 5:40 am, Indicator Veritatis mej1...@yahoo.com wrote:
 That is excellent information. Thank you for posting it.

 But there is one thing that surprises me as it is written, so I must
 ask for clarification: when you say, there is no way we can figure it
 out programmatically[sic], do you mean that such is the case even when
 Proguard is integrated with ADT? Surely you can at least do most of
 them by identifying classes needed by AndroidManifest.xml by simply
 reading AndroidManifest.xml. Or are there many other classes that also
 need to be protected? From reading Dan's post, it seems the former
 were the main examples of classes that need to be protected.

 BTW: using the native method name as the name of the class sounds like
 it should be discouraged: obfuscation difficulties just might be
 discouragement enough;)

 I am not sure what you mean by anything which has a constructor
 similar to a View, but it SOUNDS like you could introduce a decorator
 to simplify handling all of these special cases. @no_obsfucation is
 the name that occurs to me, but I am sure you can do better.

 On Sep 24, 6:00 am, Xavier Ducrohet x...@android.com wrote:

  We are working on direct support in ADT/Ant. We just decided to
  release a quick blog post on how to manually add this to Ant since
  it's somewhat easy to do (unlike ADT).

  However, proguard does need to know about which class to not obfuscate
  and there is no way we can figure it out programmatically. Proguard
  itself does try to detect reflection usage, but if it's too dynamic
  (for instance the class/method/field to use by reflection is dynamic
  and too complex to see where the value is coming from) it will fail.

  The proguard config file shown in the Dan's blog post (a different Dan
  btw) provides exclusion for the common cases:
  - anything that extends Activity, Service, Application,
  BroadcastReceiver, ContentProvider as those are referenced in the
  manifest.
  - anything that has native method as the name of the class is used to
  find the native function name
  - anything that has a constructor similar to a View, to no rename
  custom views as their name are referenced in layouts

  This should cover all the default cases. Now, if you do some fancy
  reflection you will have some problem, and will have to tell proguard
  what to not obfuscate, but there's nothing we can do about and any
  obfuscators will have similar problems.

  We are looking at implementing Proguard in ADT/Ant in a way that makes
  it easy to plug a different obfuscator, so if you prefer a different
  solution you will hopefully be able to use it, but I'm pretty sure
  you'll have the same issues.

  Unfortunately I can't give a release date for the next version, but we
  usually try to release new tools every 2-3 months.

  Xav

  On Thu, Sep 23, 2010 at 6:50 PM, Indicator Veritatis mej1...@yahoo.com 
  wrote:
   It is not just you. I was pretty disappointed when I read that post,
   too. I did get a kick out of seeing what a menacing appearance Dan has
   with his new beard and moustache, though;)

   I am amazed that Google seems to think it is acceptable to force the
   user to maintain two different build systems -- one for Eclipse and
   one for the recommended independent installation of Ant -- and also
   maintain a text file with a list of classes not to obfuscate. It is
   too obvious that this is a task ADT should be doing.

   But rather than run for the hills, we should pepper Google with
   uncomplimentary speculations concerning their motives for this turd
   layering until they 'fess up and give us a release date for a version
   of ADT that will allow us to include Proguard in an Eclipse build
   WITHOUT these problems.

   On Sep 22, 9:59 pm, JP joachim.pfeif...@gmail.com wrote:
   Just read the latest Android Developer blog 
   post.http://android-developers.blogspot.com/2010/09/proguard-android-and-l...
   Quite the beast. And Proguard cannot even be used with confidence
   (it’s still possible that in edge cases you’ll end up seeing
   something like a ClassNotFoundException).

   Is it just me getting irritated where this seems to be going?
   In my more active days developing, pretty graphic slang was applies to
   efforts like this: Turd layering. Meaning: More dependencies, more
   procedure, more sources of error, and it 

[android-developers] Re: HTC Wildfire didn't find my app on the market

2010-09-24 Thread Lance Nanek
The Wildfire is a small screen device. The change you did changes the
default for if your app supports small screen devices. Documented
here:
http://developer.android.com/guide/topics/manifest/supports-screens-element.html

On Sep 24, 7:53 am, Marco Alexander Schmitz
marco.alexander.schm...@googlemail.com wrote:
 Hi,

 I'd like to speak about a very strange problem.

 The HTC Wildfire (OS 2.1) didn't find my app at the android market,
 altough HTC Magic (OS 1.6), HTC Desire (OS 2.2) and Nexus One OS 2.2)
 do so.

 This was my problematic scenario:

 default.properties:
 target=android-3

 AndroidManifest.xml:
 uses-sdk android:minSdkVersion=3 /

 The solution was quite simple:

 default.properties:
 target=android-4

 AndroidManifest.xml:
 uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4 /

 Best regards,
 Marco

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

2010-09-24 Thread Lance Nanek
http://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading%28android.webkit.WebView,%20java.lang.String%29

On Sep 23, 12:23 pm, Neilz neilhorn...@gmail.com wrote:
 Hi all. I have a WebView, which will contain links to documents, in
 this case PDF files. The default action (at least on my device) seems
 to be to open the URL with the browser, which in turn causes them to
 be saved in the default download location.

 I want to intercept this in my code, so that I can get hold of the
 file and save it to whatever location I choose.

 Is this possible?

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


[android-developers] Re: Where has maps.jar gone to? Can't find in basic SDK install

2010-09-22 Thread Lance Nanek
If you are using Eclipse you shouldn't be accessing the maps.jar
manually anyway. Right-click on your project in Eclipse, choose
Properties, choose Android, and check a build target that has Google
APIs as the Target Name. That adds it to your build path for you. If
you don't have a Google APIs build target listed, you need to go to
Window, then Android SDK and AVD Manager, then Available Packages, and
download one.

On Sep 21, 4:11 pm, pawpaw17 georgefraz...@yahoo.com wrote:
 I'm configuring a new machine for Android development - following the
 basic steps. When I brought my app over I get compile
 failures the google maps stuff. On my older machine, the maps.jar file
 is in the add-ons sudirectory fo the sdk, but I can't
 find it in the most recent versions of the sdks.

 Anyone know what I'm doing wrong or where to grab it from?

 Best

 pawpaw17

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 block buttons with a layout above all?

2010-09-22 Thread Lance Nanek
Setting clickable to false lets clicks through to what is underneath
it. You should set clickable to true, so that it takes the clicks and
nothing else gets them. Setting a listener will set this to true
anyway, though.

On Sep 21, 4:40 am, Marco Alexander Schmitz
marco.alexander.schm...@googlemail.com wrote:
 hi,

 I'd like to add a transparent panel (relativelayout) with fill_parent
 in width and height.

 I want to use this glasspane in order to block all buttons
 underneath.

 Unfortunately I cannot find the right setter / xml  attribute for
 this.

 These wont work:

 .setEnabled(false);
 .setPressed(false);
 .setClickable(false);
 .setFocusable(false);
 .setSaveEnabled(false);
 .setSelected(false);

 Maybe its better to understand if I tell you that I want to create my
 own dialog without extending the class Dialog.

 A dialog also puts a transparent glasspane above all and absorbs all
 clicks underneath...

 Thanks for helping,
 Marco

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: I have pbm with Accesiing SharedPreference from other application

2010-09-22 Thread Lance Nanek
I have a paid app that reads the SharedPreferences from a free app of
mine. Works fine. You don't have to use a ContentProvider.

You do have to set the mode properly when you set the preferences.
That's when the preferences file is created.

This may not be your problem, but you are also settings the flags
parameter in the createPackageContext call incorrectly. Check the
documentation for that method, that is not one of the flags it
accepts.

On Sep 20, 9:17 am, swapnil.kolhapur swapnil.wadag...@gmail.com
wrote:
 Hi ,

 I have a need to share preferences between two apps, where one app
 writes the preferences and the other application needs read only
 access.

 I notice that there is this API available in Context :

 So i am trying to use it by following code,

 myContext =
 createPackageContext(com.xyz,Context.MODE_WORLD_READABLE);
 SharedPreferences testPrefs =
 myContext.getSharedPreferences(preferences,
 Context.MODE_WORLD_READABLE);
 boolean valueFromPrefs = testPrefs.getBoolean(synchcheckboxPref,
 false);

 but i am not able to get the correct values ?

 Do i need to handle mode while i create the preferences. I have
 created preferences in com.xyz used xml to define some field

 Regards,
 Swapnil

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

2010-09-18 Thread Lance Nanek
 Even the big players are just catching onto this (as
witnessed by the fact that there's no facility for this built into the
phone).

It is built into later Android versions. The normal force close dialog
has an extra button called Report. That leads to a screen where
extra information can be added which has buttons Preview and Send,
although the user can just hit back from there as well. There's also a
long scrolling dialog full of legalese with Accept and Decline
buttons that showed up the first time I went through this, but that
might have been because the app that crashed was the Market app
itself. That dialog didn't show up in subsequent crashes I observed,
although those were for non-Google apps, although still distributed by
the Market.

So either it remembers your choice for the legalese step, or that only
shows up for Google apps. Anyway, for normal developers, the
information ends up on the Market developer console. There's a link
called Errors you can click on next to each published app to see
reported errors. Flurry, the free app metrics service, also has an
uncaught exception handler that it sets, unless you specifically call
the FlurryAgent.setCaptureUncaughtExceptions function to disable it.
These errors are reported in the Flurry analytics for the app. So
error reporting of this sort isn't rare at all.

The official reporting does have flaws, however. It isn't available on
older versions of Android. I assume it isn't active for non-Google,
non-Market distributed apps. Also, hardly any users actually use it. I
suspect it's just too much work for a user to go through this multiple
opt-in every time. I think an opt-out for sending stack traces on
upgrading or activating a phone with a version of Android that
supports it would have been much more helpful to users and devs alike.
Having hardly any errors reported just leads to lower quality apps for
everyone, and stack traces are far more useful than 1 star, short
cryptic comments on the Market details page.

A compromise could have been opt-in/opt-out on app install, or on
first install of an app by each developer, or explicit opt-out of
stack trace sending on crash at least, processed separately from the
form. The form has a manual input section that probably makes lots of
users blow reporting off, because it looks like work. They could have
still kept the per-crash opt-in for sending additional information
with any of those solutions to protect private information, and still
gotten devs more stack traces to work with. I guess the biggest danger
I've heard people mention is apps sending private data in the message
property of exceptions, which is included in stack traces. This might
be possible even for an app without the internet permission, which
users might trust more because they think it can't send data.

On Sep 18, 2:00 pm, DanH danhi...@ieee.org wrote:
 First off, you are to be commended for putting this much effort into
 diagnostics.  Even the big players are just catching onto this (as
 witnessed by the fact that there's no facility for this built into the
 phone).  Real time diagnostics are much friendlier for the user than
 saying Please reproduce with logging turned on or whatever, and
 generally the information you obtain is more comprehensive and helpful
 (since you're more apt to see several instances of essentially the
 same bug, but with slightly different symptoms).

 There is a slight danger that the paranoid among users will believe
 that you're secretly collecting data on them.  It's probably better to
 somehow obtain their permission to send the failure report to you, vs
 doing it silently and unconditionally.  Asking them at the same time
 if they want to provide an email address is good, though.

 In terms of options, I'd say KISS -- keep it simple.  Unless the
 facility is going to be picked up by a trusted authority (say,
 Google), just have email address be reported back to the developer.
 Promise, of course, that the email address will be kept private (and
 make any users of your facilities aware that they're making this
 promise) but don't bother with the complex forwarding service -- users
 are no more apt to trust it than they are to trust the individual
 developers, and in fact they're probably more likely to be confused by
 the options and not agree at all.

 On Sep 18, 12:19 pm, Brad Gies rbg...@gmail.com wrote:

    This is a bit long winded (sorry, but I need to explain what I'm doing
  before I can ask the question).

  Just wondering if I could get a few (hopefully few hundred) opinions on
  this :

  I developed an Exception Handler for my first Android app (released the
  first month the market opened), which logs all uncaught exceptions to my
  server, and since then I have gradually refined it and improved. I'm now
  using it in my 4th public Android app and a few private apps, and I find
  it extremely helpful to find bugs that don't happen to me when I'm testing.

  One thing I added that is proving 

[android-developers] Re: Problems with rotated screens compared to accelerometer on Dell Streak

2010-09-17 Thread Lance Nanek
Isn't that method API level 8? The US Streak is Android 1.6, the UK
one is Android 2.1 AFAIK, so neither would even have that method. That
said, I think it just returns getOrientation() anyway.

On the US Streak I have laying around, creating a new Android project
and just dropping in some log calls, holding in landscape to match the
home screen with the front face buttons on the right, results in this:
I/TestLogRotation( 2169):
getWindowManager().getDefaultDisplay().getOrientation() =
Surface.ROTATION_270: (3)
I/TestLogRotation( 2169): getRequestedOrientation() =
ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED (-1)
I/TestLogRotation( 2169):
getResources().getConfiguration().orientation = ORIENTATION_LANDSCAPE
(2)

Holding in portrait with the front face buttons on the bottom results
in this:
I/TestLogRotation( 2169):
getWindowManager().getDefaultDisplay().getOrientation() =
Surface.ROTATION_180 (2)
I/TestLogRotation( 2169): getRequestedOrientation() =
ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED (-1)
I/TestLogRotation( 2169):
getResources().getConfiguration().orientation = ORIENTATION_PORTRAIT
(1)


On Sep 16, 8:43 am, Marcus sucram.mar...@gmail.com wrote:
 Hello,

 I have update our game to be able to handle devices with rotated
 screens (http://android-developers.blogspot.com/2010/09/one-screen-
 turn-deserves-another.html#links). I used a Motorola Flipout as a
 reference device and that one works great. The problem is that when
 the update with that fix came out I started to get reports that our
 game had stopped working for Dell Streak.

 Do anyone know if there are special problems with  screen rotation
 related to accelerometer output on Dell Streak?

 And do anyone know what Dell Streak returns on the
 android.view.Display.getRotation() function call?

 Would appreciate if someone would help me with this. I don't have the
 possibility to get hold of a Dell Streak.

 /Marcus

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

2010-09-17 Thread Lance Nanek
Installed your app to take a look. The log on my device says it was
installed to the app-private directory instead of the app directory:
 D/PackageManager(   90): New package installed in 
 /data/app-private/com.frankandchase.sudoku-1.apk

That only happens for apps that are copy protected. Copy protected
apps cannot be moved to the SD card:

http://android-developers.blogspot.com/2010/07/apps-on-sd-card-details.html
 Copy-protected apps and updates to system apps can’t be moved to the SD card, 
 nor can those which are don’t specify that they work on the SD card.

On Sep 5, 2:33 am, Laszlo Fogas laszlo.fo...@invitel.hu wrote:
 Well, I tried to clean up before installing from Market.

 Let me paste here my manifest chunk, maybe you can spot something wrong.

 manifest xmlns:android=http://schemas.android.com/apk/res/android;
 package=com.frankandchase.sudoku android:versionCode=13
 android:versionName=1.3.3 android:installLocation=preferExternal

 uses-permission android:name=android.permission.WAKE_LOCK /

 uses-sdk android:minSdkVersion=3/uses-sdk

 Thanks.

 Laszlo

 On Sat, Sep 4, 2010 at 5:13 PM, Maps.Huge.Info (Maps API Guru) 

 cor...@gmail.com wrote:
  You must be doing something odd. It works fine for me.

  Try uninstalling and reinstalling your app. It might be that having it
  already on your device and from a non-market source is confusing
  things.

  -John Coryat

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


  1   2   3   4   5   >