Re: [android-developers] Is there anyway to turn USB debuggin on/off

2010-08-27 Thread Chris Stewart
Are you trying to do this from code, or through the UI?  There's the option
for it under Settings - Applications - Development, but it sounds like
you're asking about doing it through code and that I have no idea about.

--
Chris Stewart
http://chriswstewart.com

Fantasy 
Footballhttp://chriswstewart.com/android-applications/fantasy-football/-
Android app for MFL fantasy football owners
Fantasy Football
Insiderhttp://chriswstewart.com/android-applications/fantasy-football-insider/-
Android app for all fantasy football fanatics
Social Updaterhttp://chriswstewart.com/android-applications/social-updater/-
An easy way to send your status blast to multiple social networks



On Fri, Aug 27, 2010 at 1:35 PM, Arjun arjunf...@gmail.com wrote:

 Greetings,

 Is there any class or managaer which allows me to turn USB debugging
 on/off  in android froyo 2.2.
 Please, let me know on how to acheive this.

 Thanks,
 Arjun.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: Game math/logic calulating movement

2010-08-27 Thread Robert Green
Direction will be in the range -180 to 180 so don't use abs!  Always
use sin/cos for y/x respectively when in y+ down 2D coordinate
systems, otherwise x/y respectively.

Here is kind of what you want

// tickDelta should be something like .016f to .033f - definitely
should total 1.0f per second :)
float tickDelta = (currentMs - lastMs) / 1000f;
// now mMoveSpeed can be expressed in units-per-second and it'll work
at any framerate if you multiply by tickdelta

float touchDelta = (float)(TouchY - V.CurY) / (TouchX - V.CurX);
float dirRads = (float)Math.atan(touchDelta);
float amountX = (float)Math.cos(dirRads) * mMoveSpeed * tickDelta;
float amountY = (float)Math.sin(dirRads) * mMoveSpeed * tickDelta;
x += amountX;
y += amountY;

// no additional checks needed.  This is how you do 2D directional
movement.
// this assumes that either TouchX/TouchY or V is set only when the
touch is touched down initially so that a vector is made when the
touch moves and that value is not updated.

On Aug 26, 8:40 pm, Jeffrey jeffisagen...@gmail.com wrote:
 I know this is more of a general programming question, but my Android
 friends here have always been helpful. I am trying to make an image
 move from one part of the screen to a position the user touches, as a
 constant speed. I don't know the best way to go about doing this and
 the way I have been trying to get to work is taxing my brain too much.

 I have been using geometry to calculate slope, then using Sin *
 movement speed to calculate the difference in X,Y coordinates.

 This is the code I'm looking at:

                         TouchX = V.TX; (This is the touch event coordinates
                         TouchY =
 V.TY;                                                      )

                         Slope = (TouchY - V.CurY) / (TouchX - V.CurX);  (this 
 figures out
 the slope of the line to the touch point)
                         DegreeSlopeY = Math.atan(Slope);
                         DegreeSlopeY = Math.abs(DegreeSlopeY);
                                                         (this is so
 that I can calculate the direction the image should travel along the
 slope)
                         DegreeSlopeX = (90.0 - DegreeSlopeY);
                         NewY = (mMoveSpeed * Math.sin(DegreeSlopeY)); (This 
 calculates the
 shift in Y axis for the image)
                         NewX = (mMoveSpeed * Math.sin(DegreeSlopeX));  (This 
 calculates the
 shift in X axis for the image)
                         if(TouchX  V.CenterX) NewX = -NewX;    (This is to 
 finish
 calculating the correct X axis direction to travel)
                         if(TouchY  V.CenterY) NewY = -NewY;   (This is to 
 finish
 calculating the correct X axis direction to travel)

 The problem that I'm having is the image is veering way of course when
 traveling in Y heavy paths. When traveling horizontally it works
 almost perfect.

 I know there is probably an easier way though I don't know how to use
 a lot of things (like OpenGLES) so if your advice is to use a
 different method please link a tutorial for that method if you know of
 one.

 Thanks in advance.

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


[android-developers] Re: Is there anyway to turn USB debuggin on/off

2010-08-27 Thread Arjun
Yes Chris, I want do it thru code. I need to completly disable usb and
simply act as Power connector.

On Aug 27, 10:57 am, Chris Stewart cstewart...@gmail.com wrote:
 Are you trying to do this from code, or through the UI?  There's the option
 for it under Settings - Applications - Development, but it sounds like
 you're asking about doing it through code and that I have no idea about.

 --
 Chris Stewarthttp://chriswstewart.com

 Fantasy 
 Footballhttp://chriswstewart.com/android-applications/fantasy-football/-
 Android app for MFL fantasy football owners
 Fantasy Football
 Insiderhttp://chriswstewart.com/android-applications/fantasy-football-insider/-
 Android app for all fantasy football fanatics
 Social Updaterhttp://chriswstewart.com/android-applications/social-updater/-
 An easy way to send your status blast to multiple social networks

 On Fri, Aug 27, 2010 at 1:35 PM, Arjun arjunf...@gmail.com wrote:
  Greetings,

  Is there any class or managaer which allows me to turn USB debugging
  on/off  in android froyo 2.2.
  Please, let me know on how to acheive this.

  Thanks,
  Arjun.

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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 12:19 PM, Yahel kaye...@gmail.com wrote:

 He removed the feature list and compared his product with top-of-the-
 line desktop application that do the same thing.
 And of course he used the try it risk-free 24 hours refund argument :)

 I can tell you it would really work better on me than the bullet
 list :)

 And I have to say it is a very clever message Zsolt.


Is the actual message a secret?

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

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

Re: [android-developers] Re: Licensing server, app cracked.

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 12:32 PM, sblantipodi
perini.dav...@dpsoftware.orgwrote:

 no news on the imminent guide where is this guide?


On Tue, Aug 24, 2010 at 7:01 PM, Trevor Johns trevorjo...@google.com
 wrote:

 It's coming. We have two articles in the queue that will cover this topic.

 As soon as they're ready, we'll publish them.


-
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] How do you force a reset just like rotation does?

2010-08-27 Thread ArcDroid
Hello,
I am trying to reset my program just like when you rotate the phone.
Any way to do that in code?
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


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

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 12:34 PM, sblantipodi
perini.dav...@dpsoftware.orgwrote:

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


I don't think so, at least I've not found a way from looking around.

Checkout was really tacked on to Android and in no way designed to support
small transactions for virtual goods.

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

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

Re: [android-developers] How do you force a reset just like rotation does?

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 1:32 PM, ArcDroid jacobrjohn...@gmail.com wrote:

 Any way to do that in code?


private void reset()
{
 startActivity(/*args for this activity*/);
 finish();
}

-
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: upload image to php server problem

2010-08-27 Thread Yahel
You need to tell us where the error is raised if any.

In your php you might want to try to use the realpath function to get
the true path to your upload folder :

?php
$target_path  = realpath(uploads/);
...

Yahel


On 27 août, 17:42, CMF manf...@gmail.com wrote:
 Hi all, i have read through the internet and get some solutions on
 upload image to php server, but when i tried to use those codes, I
 cannot get the image uploaded to the server. Could anyone can help me
 to fix it?

 Android Code:
 i have added uses-permission
 android:name=android.permission.INTERNET /

 package com.test.upload;

 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;

 import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;

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

     private void doFileUpload()
     {
         HttpURLConnection connection = null;
         DataOutputStream outputStream = null;
         DataInputStream inputStream = null;

         String pathToOurFile = /sdcard/a.jpg;
         String urlServer = http://myserver/testupload.php;;
         String lineEnd = \r\n;
         String twoHyphens = --;
         String boundary =  *;

         int bytesRead, bytesAvailable, bufferSize;
         byte[] buffer;
         int maxBufferSize = 1*1024*1024;

         try
         {
         FileInputStream fileInputStream = new FileInputStream(new
 File(pathToOurFile) );

         URL url = new URL(urlServer);
         connection = (HttpURLConnection) url.openConnection();

         // Allow Inputs  Outputs
         connection.setDoInput(true);
         connection.setDoOutput(true);
         connection.setUseCaches(false);

         // Enable POST method
         connection.setRequestMethod(POST);

         connection.setRequestProperty(Connection, Keep-Alive);
         connection.setRequestProperty(Content-Type, multipart/form-
 data;boundary=+boundary);

         outputStream = new
 DataOutputStream( connection.getOutputStream() );
         outputStream.writeBytes(twoHyphens + boundary + lineEnd);
         outputStream.writeBytes(Content-Disposition: form-data; name=
 \uploadedfile\;filename=\ + pathToOurFile +\ + lineEnd);
         outputStream.writeBytes(lineEnd);

         bytesAvailable = fileInputStream.available();
         bufferSize = Math.min(bytesAvailable, maxBufferSize);
         buffer = new byte[bufferSize];

         // Read file
         bytesRead = fileInputStream.read(buffer, 0, bufferSize);

         while (bytesRead  0)
         {
         outputStream.write(buffer, 0, bufferSize);
         bytesAvailable = fileInputStream.available();
         bufferSize = Math.min(bytesAvailable, maxBufferSize);
         bytesRead = fileInputStream.read(buffer, 0, bufferSize);
         }

         outputStream.writeBytes(lineEnd);
         outputStream.writeBytes(twoHyphens + boundary + twoHyphens +
 lineEnd);

         // Responses from the server (code and message)
         int serverResponseCode = connection.getResponseCode();
         String serverResponseMessage = connection.getResponseMessage();

         fileInputStream.close();
         outputStream.flush();
         outputStream.close();
         }
         catch (Exception ex)
         {
         //Exception handling
         }
     }

 }

 /
 *** 
 **/
 server php code:
 i have make the permmision of uploads/ to 777
 and the upload.php to 755

 ?php
 $target_path  = uploads/;
 $target_path = $target_path . basename( $_FILES['uploadedfile']
 ['name']);
 if(move_uploaded_file($_FILES['uploadedfile']['name'], $target_path))
 {
  echo The file .  basename( $_FILES['uploadedfile']['name']).
   has been uploaded;} else{

  echo There was an error uploading the file, please try 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


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

2010-08-27 Thread Dominic DiTomaso
Thanks Frank. Looks like I have a lot of reading to do.



On Wed, Aug 25, 2010 at 11:45 AM, Frank Weiss fewe...@gmail.com wrote:

 An app I'm developing uses URLConnection, others like to use
 HttpClient. I suggest you find some sample code that does something
 similar and study how it's done.

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

2010-08-27 Thread OldSkoolMark
I've resolved the issue. Not sure if this is a bug, feature, or is
merely an undocumented feature. It appears that the child projection
you supply to your ExpandableListAdapter's constructor needs to
include the _ID field of the child table.

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


[android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread Zsolt Vasvari
Answers below:

 * Put some context around doubled.  From 1 to 2, 100 to 200, 1,000 to 2,000?

From about 7-8 to about 15-16.  The app is $7.  So it went from
probably not worth doing it to a nice chunk of pocket change.


 * How many cancels are in these numbers?  I've got to believe that with a
 less informative, and more catchy message, people know less about what
 they're buying and end up canceling when they find out it's not what they
 expect.

None, I only count money in the bank.  My cancel rates have actually
gone down to about 10%, from about %25 before.



 * It would be interesting to see the before and after descriptions you're
 using in the market for your app.

The app is called anMoney, you can see the current description.  The
previous one was basically just a feature list.


 But without the feature list, how will you catch people that are
 looking for your app 's features?
 This may work if your app is well ranked in the list maybe...

That's the point of this whole discussion.  My app is the highest
rated star-wise if I look in the Finance Paid category on AppBrain.


 Did you update at any point in this time frame?

No, I updated about 3 days earlier before the change in description.


 Did you happen to get featured at any point in this time frame?

I don't know, but I extremely seriously doubt it.


 Were there any new Android devices released in this time frame?

In the last week, I don't believe so.

The other things I noticed in the past week are:

- I have a lot more female purchasers.  Around 35%.
- Fewer support questions.  Went from 3-4 a day to 1-2.


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


[android-developers] Re: String being truncated when its long

2010-08-27 Thread Brion Emde
I'm pretty sure that if there is a limit, it is much bigger than what
people are saying here.

I wrote a little Twitter example on Android and just doing the
home_timeline query can return up to 200 tweets, each up to 140
characters, plus overhead. That's 10s of kilobytes per GET request.

See if looking at this code helps:
http://github.com/brione/Brion-Learns-OAuth/blob/master/src/com/example/bloa/BLOA.java


On Aug 27, 12:44 pm, DanH danhi...@ieee.org wrote:
 My knowledge of the HTTP protocol is poor to begin with, and my bad
 memory doesn't improve it, but I vaguely recall that a single HTTP
 transfer is limited to 5000-odd characters (the precise number being
 somewhat variable) by the packet sizes used in the network.  But
 normally the software used on each end should hide this sensitivity so
 that you can deal in complete data streams up to some significantly
 larger limit.

 It could be that something in your config is causing this transfer
 size to be exposed.  It's also possible that your coding style is
 opening you up to being sensitive to data stream values.  In
 particular, null may be being returned from readLine at the end of the
 block, even though there is more data in the transmission.  (I don't
 know that such is possible -- just speculating.)

 Finally, it's possible that the failure is occurring on the
 transmission end, perhaps due to an EOF character embedded in the
 source data or some such.

 On Aug 26, 5:40 pm, Achanta krishna.acha...@gmail.com wrote:



  I am trying to get a JSON response from our server and the response
  string seems is always being truncated when the string length reaches
  to around 5525 characters.

  HttpClient httpClient = new DefaultHttpClient();
  HttpPost post = new HttpPost(URL);
  ResponseHandlerString responseHandler= new BasicResponseHandler();
  String testResponse = httpClient.execute(post, responseHandler);

  I also tried this by using HttpEntity and reading the response stream.
  But that also truncates the string at approximately that length.

              HttpClient httpClient = new DefaultHttpClient();
              HttpPost post = new HttpPost(URL);
  //          HttpGet get = new HttpGet(URL);

              HttpResponse response = null;
              HttpEntity entity = null;
              InputStream inputStream = null;
              BufferedReader reader = null;
              String result = ;
              try {
                  response = (HttpResponse)httpClient.execute(post);
                  entity = response.getEntity();
                  if(entity != null){
                      inputStream = entity.getContent();
                  }
                  reader = new BufferedReader(new
  InputStreamReader(inputStream), 8000);
                  StringBuffer builder = new StringBuffer();
                  String line = reader.readLine();
                  while(line != null){
                      Log.v(tag, int max: +Integer.MAX_VALUE);
                      Log.v(tag, LINE: +line
  +reader.toString());
                      Log.v(tag, reader: +reader.toString());
                      builder.append(line+\n);
                      line = reader.readLine();
                  }
                  inputStream.close();
                  result = builder.toString();
              } catch (ClientProtocolException e) {
                  e.printStackTrace();
              } catch (IOException e) {
                  e.printStackTrace();
              } finally{
                  if(inputStream != null){
                      try{
                          inputStream.close();
                      }catch(IOException e){
                          e.printStackTrace();
                      }
                  }
              }

  Please let me know how I can handle this problem. I used this post as
  the reference while creating 
  this.http://senior.ceng.metu.edu.tr/2009/praeda/2009/01/11/a-simple-restfu...

  I tested the link in my browser and it does return the complete JSON.
  So I am sure the issue is with my code in android.

  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: How do you force a reset just like rotation does?

2010-08-27 Thread ArcDroid
thanks for the quick reply, but what args are you referring
toosorry for the novice question, but this is new turf for me

  private void reset()
{
 startActivity(Intent.);
 finish();
}


On Aug 27, 11:35 am, TreKing treking...@gmail.com wrote:
 On Fri, Aug 27, 2010 at 1:32 PM, ArcDroid jacobrjohn...@gmail.com wrote:
  Any way to do that in code?

 private void reset()
 {
  startActivity(/*args for this activity*/);
  finish();

 }

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

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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread Chris Stewart
Very cool, I'm glad to see it's working for you.  Did you include the terms
Microsoft Money or Quicken in your original description?  I could certainly
see you getting a lot of downloads driven from people searching those terms.

I did notice a few misspellings but didn't know if those were purposeful to
make it all fit or not, just FYI.

--
Chris Stewart
http://chriswstewart.com

Fantasy 
Footballhttp://chriswstewart.com/android-applications/fantasy-football/-
Android app for MFL fantasy football owners
Fantasy Football
Insiderhttp://chriswstewart.com/android-applications/fantasy-football-insider/-
Android app for all fantasy football fanatics
Social Updaterhttp://chriswstewart.com/android-applications/social-updater/-
An easy way to send your status blast to multiple social networks



On Fri, Aug 27, 2010 at 2:51 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 Answers below:

  * Put some context around doubled.  From 1 to 2, 100 to 200, 1,000 to
 2,000?

 From about 7-8 to about 15-16.  The app is $7.  So it went from
 probably not worth doing it to a nice chunk of pocket change.


  * How many cancels are in these numbers?  I've got to believe that with a
  less informative, and more catchy message, people know less about what
  they're buying and end up canceling when they find out it's not what they
  expect.

 None, I only count money in the bank.  My cancel rates have actually
 gone down to about 10%, from about %25 before.



  * It would be interesting to see the before and after descriptions you're
  using in the market for your app.

 The app is called anMoney, you can see the current description.  The
 previous one was basically just a feature list.


  But without the feature list, how will you catch people that are
  looking for your app 's features?
  This may work if your app is well ranked in the list maybe...

 That's the point of this whole discussion.  My app is the highest
 rated star-wise if I look in the Finance Paid category on AppBrain.


  Did you update at any point in this time frame?

 No, I updated about 3 days earlier before the change in description.


  Did you happen to get featured at any point in this time frame?

 I don't know, but I extremely seriously doubt it.


  Were there any new Android devices released in this time frame?

 In the last week, I don't believe so.

 The other things I noticed in the past week are:

 - I have a lot more female purchasers.  Around 35%.
 - Fewer support questions.  Went from 3-4 a day to 1-2.


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

2010-08-27 Thread Günther
Hi Bret,

do you have the latest SDK revisions? As far as I remember I got the
same error before updating to the most recent revisions...

Cheers,
Günther


On 27 Aug., 18:02, Bret Foreman bret.fore...@gmail.com wrote:
 I should also note that removing the library does not make the project
 build. In fact all the R resources are shown as unresolved. It appears
 that adding the new library breaks the R builder.

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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 1:51 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 Answers below:


Thanks for sharing!


  * Put some context around doubled.  From 1 to 2, 100 to 200, 1,000 to
 2,000?

 From about 7-8 to about 15-16.  The app is $7.  So it went from probably
 not worth doing it to a nice chunk of pocket change.


Yeah, I don't know if I'd be willing to claim this entire theory is
validated based on 8 more sales in one week for one app  ...


  * It would be interesting to see the before and after descriptions you're
   using in the market for your app.

 The app is called anMoney, you can see the current description.
  The previous one was basically just a feature list.


I hope you don't mind me linking, the old one is still on cyrket:
http://www.cyrket.com/p/android/com.zvasvari.anmoneyp/

I was typing as Chris replied, and I agree that including big names like
Quicken and Microsoft probably helped in driving people to your app. Which,
ironically, is a great marketing tactic =). And yeah, you've got some typos
/ misspellings which are generally not good marketing =P (unless intended,
before you point to me =P)


  Did you update at any point in this time frame?

 No, I updated about 3 days earlier before the change in description.


I noticed you have a free version as well. Did you update that too? That's a
marketing too in and of itself.
I always update my free version at the same time and indicate what's new in
the full version only so the freebiers will consider upgrading.


   Did you happen to get featured at any point in this time frame?

 I don't know, but I extremely seriously doubt it.


Worth a shot =P


  The other things I noticed in the past week are:

 - I have a lot more female purchasers.  Around 35%.


How did you determine this? Just curious.

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

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

Re: [android-developers] Re: How do you force a reset just like rotation does?

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 1:53 PM, ArcDroid jacobrjohn...@gmail.com wrote:

 thanks for the quick reply, but what args are you referring too


http://developer.android.com/reference/android/content/Context.html#startActivity(android.content.Intent)

And if you don't know how to start your own activity:
http://developer.android.com/guide/topics/fundamentals.html#acttask

-
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: String being truncated when its long

2010-08-27 Thread ko5tik
My game has no problem to pull and parse complete highscore list:

http://www.pribluda.de/highscore/lines/LinesHighscore/pull?since=0

(ok,  usually it is less that that - only updates sine some moment )

I would check with some other tool ( SoapUI us the one )  if server
side works
properly and delivers everything zoy are waiting for

regards,

On Aug 27, 8:51 pm, Brion Emde brione2...@gmail.com wrote:
 I'm pretty sure that if there is a limit, it is much bigger than what
 people are saying here.

 I wrote a little Twitter example on Android and just doing the
 home_timeline query can return up to 200 tweets, each up to 140
 characters, plus overhead. That's 10s of kilobytes per GET request.

 See if looking at this code 
 helps:http://github.com/brione/Brion-Learns-OAuth/blob/master/src/com/examp...

 On Aug 27, 12:44 pm, DanH danhi...@ieee.org wrote:

  My knowledge of the HTTP protocol is poor to begin with, and my bad
  memory doesn't improve it, but I vaguely recall that a single HTTP
  transfer is limited to 5000-odd characters (the precise number being
  somewhat variable) by the packet sizes used in the network.  But
  normally the software used on each end should hide this sensitivity so
  that you can deal in complete data streams up to some significantly
  larger limit.

  It could be that something in your config is causing this transfer
  size to be exposed.  It's also possible that your coding style is
  opening you up to being sensitive to data stream values.  In
  particular, null may be being returned from readLine at the end of the
  block, even though there is more data in the transmission.  (I don't
  know that such is possible -- just speculating.)

  Finally, it's possible that the failure is occurring on the
  transmission end, perhaps due to an EOF character embedded in the
  source data or some such.

  On Aug 26, 5:40 pm, Achanta krishna.acha...@gmail.com wrote:

   I am trying to get a JSON response from our server and the response
   string seems is always being truncated when the string length reaches
   to around 5525 characters.

   HttpClient httpClient = new DefaultHttpClient();
   HttpPost post = new HttpPost(URL);
   ResponseHandlerString responseHandler= new BasicResponseHandler();
   String testResponse = httpClient.execute(post, responseHandler);

   I also tried this by using HttpEntity and reading the response stream.
   But that also truncates the string at approximately that length.

               HttpClient httpClient = new DefaultHttpClient();
               HttpPost post = new HttpPost(URL);
   //          HttpGet get = new HttpGet(URL);

               HttpResponse response = null;
               HttpEntity entity = null;
               InputStream inputStream = null;
               BufferedReader reader = null;
               String result = ;
               try {
                   response = (HttpResponse)httpClient.execute(post);
                   entity = response.getEntity();
                   if(entity != null){
                       inputStream = entity.getContent();
                   }
                   reader = new BufferedReader(new
   InputStreamReader(inputStream), 8000);
                   StringBuffer builder = new StringBuffer();
                   String line = reader.readLine();
                   while(line != null){
                       Log.v(tag, int max: +Integer.MAX_VALUE);
                       Log.v(tag, LINE: +line
   +reader.toString());
                       Log.v(tag, reader: +reader.toString());
                       builder.append(line+\n);
                       line = reader.readLine();
                   }
                   inputStream.close();
                   result = builder.toString();
               } catch (ClientProtocolException e) {
                   e.printStackTrace();
               } catch (IOException e) {
                   e.printStackTrace();
               } finally{
                   if(inputStream != null){
                       try{
                           inputStream.close();
                       }catch(IOException e){
                           e.printStackTrace();
                       }
                   }
               }

   Please let me know how I can handle this problem. I used this post as
   the reference while creating 
   this.http://senior.ceng.metu.edu.tr/2009/praeda/2009/01/11/a-simple-restfu...

   I tested the link in my browser and it does return the complete JSON.
   So I am sure the issue is with my code in android.

   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


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

2010-08-27 Thread Dianne Hackborn
Yes what happens during an update is the app is first force stopped (all
processes killed, alarms unregistered, etc), then then the new version is
installed.

It seems promising that clear data would fix the problem; this is most
likely then an issue you can deal with in your app rather than something
systemic.  The first thing I would look for is any code writing data that
could cause problems if it was killed in the middle of executing.  Databases
should handle this, but you need to deal with it yourself for raw files...
 for example SharedPreferences does this in its commit by writing the
contents into a new file, and then switching from the old file to the new
file once the new one is complete.

On Fri, Aug 27, 2010 at 10:53 AM, TreKing treking...@gmail.com wrote:

 On Fri, Aug 27, 2010 at 10:01 AM, Carl Whalley 
 carl.whal...@googlemail.com wrote:

 Might be throwing in a food-for-thought curveball here but I wonder
 if there's a difference between updating an app that's running and one which
 isn't?


 Might be. It's only a handful of people (well, more than a handful for me)
 but still few in comparison to the total install base, so there's definitely
 something they're doing that's triggering the problem.

 I would think the update process would kill the app if it's running, but
 maybe not.

 Also, got confirmation from the second person that clearing the data solved
 the problem.


 -
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

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

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

[android-developers] Making sure that ... (not an ellipsis) is not wrapped

2010-08-27 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In some cases I have messages, typically shown in a toast message,
where there are three trailing periods. For instance, bla bla bla.
Please wait Note that this is _not_ an elipsis, as the string is
not truncated. The problem is that sometimes the string is wrapped at
the end of line and I get two periods in the first line, a newline,
and then a single orphaned period in the next line.

I'd like to have the ... not broken by any means. How can this be
done in a reliable way? E.g. is there any Unicode single char
guaranteed to be available in all Android appliances that
gets rendered as three periods?

- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx4EgkACgkQeDweFqgUGxcVxQCgppQtp3Owqa9vaYKw2ivAOaZH
o2sAoJLb4+dLbSlosvFoi3weL25i21Yc
=00Kj
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 do you force a reset just like rotation does?

2010-08-27 Thread ArcDroid
I have already searched all those links, but was expecting some basic
call that is generic to every program.


On Aug 27, 12:13 pm, TreKing treking...@gmail.com wrote:
 On Fri, Aug 27, 2010 at 1:53 PM, ArcDroid jacobrjohn...@gmail.com wrote:
  thanks for the quick reply, but what args are you referring too

 http://developer.android.com/reference/android/content/Context.html#s...)

 And if you don't know how to start your own 
 activity:http://developer.android.com/guide/topics/fundamentals.html#acttask

 --- 
 --
 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: Read the data in Intent

2010-08-27 Thread Indicator Veritatis
As a newcomer to Android, you absolutely must read
http://developer.android.com/guide/topics/fundamentals.html. You must
not only read it, but study it thoroughly. Thoroughly enough that you
can answer, for example, reading questions such as the following:

1) What are the four application components out of which all Android
applications are built?
2) How does Android guarantee that application processes are isolated
from each other?
3) How do different application components of a single application
share data with each other? Name ALL the ways Android supports.
4) How do completely independent applications share data with each
other?
5) Can a Service and an Activity in the same application share a
thread?
6) What is the difference between a Service and a background/worker
thread? Or a Broadcast Receiver?
7) Which class is used to manage interprocess communication between an
Application and a ContentProvider?
8) Which application components are 'activated' by an Intent?
9) Some application components run quickly to completion, and then are
deactivated. Others must be explicity deactivated. Which are which?
10) How does an Activity/Service decode the data in an Intent?
11) What are the differences between the three activity states:
active=running, paused, and stopped? In which of this is the activity
visible, in which does the user have input focus?

If I understand your question correctly, 3, 4 and 7 are most directly
relevant to your question. But in order to understand the context for
the answers, you really do need to read all of
http://developer.android.com/guide/topics/fundamentals.html well
enough to answer all the above questions and more.

Good luck with your reading;)

On Aug 26, 11:26 am, crajesh crajesh2...@gmail.com wrote:
 Hi all,

    i am new in android how read the data from server using intent

 Thanks
 Remo

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


[android-developers] Re: String being truncated when its long

2010-08-27 Thread Achanta
First of all thanks everyone for replying.

I just discovered that the problem is not with my code but with the
number of lines that the logcat is displaying.
The problem was that I got a problem in my json reply format and my
parsing code spits an error. So I started trying to debug it by
printing the response json string in logcat. This is being truncated
always and I was guessing till now that the reply itself is being
truncated.

So today I started plying with the response string builder and has to
write funny snippets to count characters and detect the characters at
positions I was expecting and I found that the response was being
returned completely.
I also tested my code on some other large stings and I discovered that
the logcat has a limit on the length of the string that it displays or
atleast it looked so. That was why my responses were being displayed
as truncated strings and I thought that its the problem with my code.

So it is working fine as the code is earlier and the only problem was
that the logcat doesnot display the complete string. But it does not
cother me anymore for this problem.

Thanks again everyone for trying to help.



On Aug 27, 1:21 pm, ko5tik kpriblo...@yahoo.com wrote:
 My game has no problem to pull and parse complete highscore list:

 http://www.pribluda.de/highscore/lines/LinesHighscore/pull?since=0

 (ok,  usually it is less that that - only updates sine some moment )

 I would check with some other tool ( SoapUI us the one )  if server
 side works
 properly and delivers everything zoy are waiting for

 regards,

 On Aug 27, 8:51 pm, Brion Emde brione2...@gmail.com wrote:

  I'm pretty sure that if there is a limit, it is much bigger than what
  people are saying here.

  I wrote a little Twitter example on Android and just doing the
  home_timeline query can return up to 200 tweets, each up to 140
  characters, plus overhead. That's 10s of kilobytes per GET request.

  See if looking at this code 
  helps:http://github.com/brione/Brion-Learns-OAuth/blob/master/src/com/examp...

  On Aug 27, 12:44 pm, DanH danhi...@ieee.org wrote:

   My knowledge of the HTTP protocol is poor to begin with, and my bad
   memory doesn't improve it, but I vaguely recall that a single HTTP
   transfer is limited to 5000-odd characters (the precise number being
   somewhat variable) by the packet sizes used in the network.  But
   normally the software used on each end should hide this sensitivity so
   that you can deal in complete data streams up to some significantly
   larger limit.

   It could be that something in your config is causing this transfer
   size to be exposed.  It's also possible that your coding style is
   opening you up to being sensitive to data stream values.  In
   particular, null may be being returned from readLine at the end of the
   block, even though there is more data in the transmission.  (I don't
   know that such is possible -- just speculating.)

   Finally, it's possible that the failure is occurring on the
   transmission end, perhaps due to an EOF character embedded in the
   source data or some such.

   On Aug 26, 5:40 pm, Achanta krishna.acha...@gmail.com wrote:

I am trying to get a JSON response from our server and the response
string seems is always being truncated when the string length reaches
to around 5525 characters.

HttpClient httpClient = new DefaultHttpClient();
HttpPost post = new HttpPost(URL);
ResponseHandlerString responseHandler= new BasicResponseHandler();
String testResponse = httpClient.execute(post, responseHandler);

I also tried this by using HttpEntity and reading the response stream.
But that also truncates the string at approximately that length.

            HttpClient httpClient = new DefaultHttpClient();
            HttpPost post = new HttpPost(URL);
//          HttpGet get = new HttpGet(URL);

            HttpResponse response = null;
            HttpEntity entity = null;
            InputStream inputStream = null;
            BufferedReader reader = null;
            String result = ;
            try {
                response = (HttpResponse)httpClient.execute(post);
                entity = response.getEntity();
                if(entity != null){
                    inputStream = entity.getContent();
                }
                reader = new BufferedReader(new
InputStreamReader(inputStream), 8000);
                StringBuffer builder = new StringBuffer();
                String line = reader.readLine();
                while(line != null){
                    Log.v(tag, int max: +Integer.MAX_VALUE);
                    Log.v(tag, LINE: +line
+reader.toString());
                    Log.v(tag, reader: +reader.toString());
                    builder.append(line+\n);
                    line = reader.readLine();
                }
               

Re: [android-developers] Making sure that ... (not an ellipsis) is not wrapped

2010-08-27 Thread Brad Gies

 Have you tried putting a span around it... like :

bla bla spanbla.../span

On 27/08/2010 12:29 PM, Fabrizio Giudici wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In some cases I have messages, typically shown in a toast message,
where there are three trailing periods. For instance, bla bla bla.
Please wait Note that this is _not_ an elipsis, as the string is
not truncated. The problem is that sometimes the string is wrapped at
the end of line and I get two periods in the first line, a newline,
and then a single orphaned period in the next line.

I'd like to have the ... not broken by any means. How can this be
done in a reliable way? E.g. is there any Unicode single char
guaranteed to be available in all Android appliances that
gets rendered as three periods?

- -- 
Fabrizio Giudici - Java Architect, Project Manager

Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx4EgkACgkQeDweFqgUGxcVxQCgppQtp3Owqa9vaYKw2ivAOaZH
o2sAoJLb4+dLbSlosvFoi3weL25i21Yc
=00Kj
-END PGP SIGNATURE-



--
Sincerely,

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

Everything in moderation, including abstinence

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

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


[android-developers] Re: Problem with reading contacts on Samsung Galaxy Europa

2010-08-27 Thread Albert
Hi Zarah,

I have reports of the app launching a blank screen but not crash. I am
getting a Samsung Spica this week but you have already stated that it
works there so that won't be of any use. For my app is wan't so
critical so I just instruct Galaxy S users to insert those details
manually. The best is probably to contact Samsung development
department and find out what mess they have done and from there find a
suitable solution.

If you ever find a solution, please let me know.

Alberto

On Aug 23, 10:20 am, Zarah Dominguez zarah.doming...@gmail.com
wrote:
 Hi Alberto,

 I saw this on the Galaxy S also.  I have tested the app on the Galaxy
 Spica (i5700), it is working perfectly.  But when I tested the app on
 the Galaxy S, the app crashes.

 I haven't found a solution yet, but this is what I found from Logcat:
 08-23 17:14:30.394: INFO/ActivityManager(2244): Displayed activity
 com.android.contacts/
 com.sec.android.app.contacts.PhoneBookTopMenuActivity: 452 ms (total
 452 ms)

 Versus what is seen from the emulator:
 08-23 17:18:08.533: INFO/ActivityManager(52): Displayed activity
 com.android.contacts/.DialtactsContactsEntryActivity: 348 ms (total
 348 ms)

 Looks like the Galaxy S has a different way of handling intents for
 the Phonebook.

 If you find a solution, please let me know also.

 Thanks!
 -Zarah

 On Aug 12, 7:06 pm, Albert albert8...@googlemail.com wrote:



  I have an user from my app that has reported this issue on aSamsung
  Galaxy S. Do you know why it's happening? Did you find a solution?

  -Alberto

  On Aug 6, 1:46 pm, Alok Kulkarni kulsu...@gmail.com wrote:

   yeah it is only happening on that deviuce. But i have found a different
   solution to it which i will put up here tomorrow.

   On Wed, Aug 4, 2010 at 12:51 PM, dan raaka danra...@gmail.com wrote:
Is this happening only on Europa ?

-Dan

On Wed, Aug 4, 2010 at 12:26 PM, Alok Kulkarni kulsu...@gmail.com 
wrote:

Hi , i am using
startActivityForResult(intent,PICK_CONTACT);
Its working on Android 1.5 to 2.1 except for the 2.1 deviceSamsung
Europa..On that device , i am not able to read thecontacts, its 
returning
empty result.
here is the link i referred for the code
   http://www.droidnova.com/use-intents-to-start-other-activities,76.html
Is thr something i m missing ?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 
android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

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

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


[android-developers] Re: String being truncated when its long

2010-08-27 Thread DanH
Great that it turned out to be so easy to debug!  This is the sort
of secondary problem that can drive one crazy for days sometimes.

On Aug 27, 2:32 pm, Achanta krishna.acha...@gmail.com wrote:
 First of all thanks everyone for replying.

 I just discovered that the problem is not with my code but with the
 number of lines that the logcat is displaying.
 The problem was that I got a problem in my json reply format and my
 parsing code spits an error. So I started trying to debug it by
 printing the response json string in logcat. This is being truncated
 always and I was guessing till now that the reply itself is being
 truncated.

 So today I started plying with the response string builder and has to
 write funny snippets to count characters and detect the characters at
 positions I was expecting and I found that the response was being
 returned completely.
 I also tested my code on some other large stings and I discovered that
 the logcat has a limit on the length of the string that it displays or
 atleast it looked so. That was why my responses were being displayed
 as truncated strings and I thought that its the problem with my code.

 So it is working fine as the code is earlier and the only problem was
 that the logcat doesnot display the complete string. But it does not
 cother me anymore for this problem.

 Thanks again everyone for trying to help.

 On Aug 27, 1:21 pm, ko5tik kpriblo...@yahoo.com wrote:

  My game has no problem to pull and parse complete highscore list:

 http://www.pribluda.de/highscore/lines/LinesHighscore/pull?since=0

  (ok,  usually it is less that that - only updates sine some moment )

  I would check with some other tool ( SoapUI us the one )  if server
  side works
  properly and delivers everything zoy are waiting for

  regards,

  On Aug 27, 8:51 pm, Brion Emde brione2...@gmail.com wrote:

   I'm pretty sure that if there is a limit, it is much bigger than what
   people are saying here.

   I wrote a little Twitter example on Android and just doing the
   home_timeline query can return up to 200 tweets, each up to 140
   characters, plus overhead. That's 10s of kilobytes per GET request.

   See if looking at this code 
   helps:http://github.com/brione/Brion-Learns-OAuth/blob/master/src/com/examp...

   On Aug 27, 12:44 pm, DanH danhi...@ieee.org wrote:

My knowledge of the HTTP protocol is poor to begin with, and my bad
memory doesn't improve it, but I vaguely recall that a single HTTP
transfer is limited to 5000-odd characters (the precise number being
somewhat variable) by the packet sizes used in the network.  But
normally the software used on each end should hide this sensitivity so
that you can deal in complete data streams up to some significantly
larger limit.

It could be that something in your config is causing this transfer
size to be exposed.  It's also possible that your coding style is
opening you up to being sensitive to data stream values.  In
particular, null may be being returned from readLine at the end of the
block, even though there is more data in the transmission.  (I don't
know that such is possible -- just speculating.)

Finally, it's possible that the failure is occurring on the
transmission end, perhaps due to an EOF character embedded in the
source data or some such.

On Aug 26, 5:40 pm, Achanta krishna.acha...@gmail.com wrote:

 I am trying to get a JSON response from our server and the response
 string seems is always being truncated when the string length reaches
 to around 5525 characters.

 HttpClient httpClient = new DefaultHttpClient();
 HttpPost post = new HttpPost(URL);
 ResponseHandlerString responseHandler= new BasicResponseHandler();
 String testResponse = httpClient.execute(post, responseHandler);

 I also tried this by using HttpEntity and reading the response stream.
 But that also truncates the string at approximately that length.

             HttpClient httpClient = new DefaultHttpClient();
             HttpPost post = new HttpPost(URL);
 //          HttpGet get = new HttpGet(URL);

             HttpResponse response = null;
             HttpEntity entity = null;
             InputStream inputStream = null;
             BufferedReader reader = null;
             String result = ;
             try {
                 response = (HttpResponse)httpClient.execute(post);
                 entity = response.getEntity();
                 if(entity != null){
                     inputStream = entity.getContent();
                 }
                 reader = new BufferedReader(new
 InputStreamReader(inputStream), 8000);
                 StringBuffer builder = new StringBuffer();
                 String line = reader.readLine();
                 while(line != null){
                     Log.v(tag, int max: +Integer.MAX_VALUE);
            

[android-developers] Re: Read the data in Intent

2010-08-27 Thread Indicator Veritatis
I wonder if he meant 'Service' instead of 'Server'. Then the question
would at least be cogently phrased. But if he really meant 'Server',
then he probably does not realize he has to set up his own code to
access the server over the Net, isolated from the main UI thread. If
he wants to do that as a separate application component, as a Service,
then that is up to him. Then he can send messages back and forth
between the UI and the Service with Intents, but that will probably be
inadequate for passing data back. So he might be better off shuffling
all the Server/Http stuff to an AsyncTask in the same Application. I
don't see how we can tell him which way is best to go without knowing
more about the service served by the server.

But what we do know is that he needs to study the fundamentals before
he can do any of this. Maybe Google should make it the official
motto for this Google group: век живи, век учись!


On Aug 27, 5:06 am, { Devdroid } webnet.andr...@gmail.com wrote:
 On 26 August 2010 20:26, crajesh crajesh2...@gmail.com wrote:

  Hi all,

    i am new in android how read the data from server using intent

 Intent is not for reading data from remote servers.

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


Re: [android-developers] Re: String being truncated when its long

2010-08-27 Thread Frank Weiss
Might I suggest you try debugging in Eclipse instead of with logcat.
You can breakpoint and step through the code and inspect variables. It
gives you much better insight into what's happening in your code than
logcat or toast.

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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread Frank Weiss
Zsolt, I work at a digital advertising agency and have been sharing
your experience with my colleagues. They found it very intereresting
and of course, obvious. When I remarked that many Android developers
are, well, developers, they joked that maybe our agency should start
helping mobile app developers market their apps. Thanks again for
sharing your story.

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


[android-developers] Debugging Droid X-specific issues

2010-08-27 Thread Paul Tongyoo
Hi Developers--

So I've run into a Droid X-specific issue but am not able to reproduce with
my emulator AVD's.  Is there a Droid X-specific AVD that I should be using?


Thanks in advance!
PT

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

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

2010-08-27 Thread TreKing
Thanks for the continued help.

On Fri, Aug 27, 2010 at 2:22 PM, Dianne Hackborn hack...@android.comwrote:

  The first thing I would look for is any code writing data that could cause
 problems if it was killed in the middle of executing.


That makes sense, but that's also why I'm confused. The main issue I've had,
for which I have nearly 30 reports now in each version of my app in the dev
console, has nothing to do with data access. Unless I'm really missing
something.

I have a base class reference that should be set to the appropriate instance
of a derived class type based on user selection.
These derived type instances come from a manager class, of sorts, that holds
the instances. There is one static instance of this manager class in the app
since it's global, constant data. So it should be initialized, along with
it's internal data it manages, at all times. None of this involves any data
access.

Some pseudocode if it helps:

// In Manager class
public Manager
{
 private MapString, BaseRef refs = null;

 public Manager()
 {
  refs = new TreeMapString, BaseRef();

  // Explicitly add derived instances of BaseRef
  refs.put(Key, new DerivedInstance());

  // add more ...
 }

 public BaseRef get(String key)
 {
  return refs.get(key);
 }
}

//In Static access class
public StaticClass
{
 private static Manager manager = new Manager();

 public static Manager getManager() { return manager; }
}

// Then, finally, in the class where the crash occurs
BaseRef baseRef = StaticClass.getManager().get(userSelection);


Userselection is the value chosen by the user from a list pre-populated by
the Keys in the Manager class to begin with.
So if the user was able to make the selection, the key was there at the
start of the Activity, and in the manager where it originated from.

baseRef, which is obtained from that single manager's list (which is
essentially hard-coded), is later used elsewhere and ends up being null.

There is no file data access involved anywhere in this Activity besides
using SharedPreferences for exactly one option.

Also, now that I've typed this out, this goes against the idea that statics
are the problem since I would have had the null pointer at the point where I
try to access the Manager class. Instead, it appears to be valid but for
some reason its internal data, which is set on construction, is not.

It's worth noting that I've seen this problem to a lesser extent before I
added this manager class stuff, but since adding it last week, the problem
seems to have exploded with a fury. But again, not sure if that's a result
of a larger user-base over two months since last major update.

I think at some point I'll start polling my users to see how many of them
continue to see the issue after updating. Since I've instructed them, in
nice big letters, to try uninstalling first, I expect not to hear any more
complaints for now, but I'd rather fix the problem than band-aid it like
this.

-
TreKing 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] AccountManager auth token and user interaction

2010-08-27 Thread Federico Paolinelli
Hi all, I am trying some interaction with my phone and an appengine
server, and I have the following question: there may be a case in
which the account manager need the user to confirm that he wants to
authorize the account. Will it be just once for the installation of
the application? Or it can happen in any time that my app still need
the user interaction?

I need to know this because I would like to interact also in
background, and think the user would be disappointed if my app stops
doing its job because the authorization was sort of expired.
Unfortunately I did not manage to find any details in the docs, I just
noticed that if I run my code it asks for the authorization only the
first time is installed on a phone.

One more question: is there some place in the settings where I can
reset the authorization so I can try again the first interaction?

Thanks a lot.

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


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

2010-08-27 Thread Tom Gibara
I wasn't able to fully follow your description, but this bit caught me eye:

Userselection is the value chosen by the user from a list pre-populated by
 the Keys in the Manager class to begin with. So if the user was able to make
 the selection, the key was there at the start of the Activity, and in the
 manager where it originated from.


Have the keys changed between releases of the application? Is the selected
key persisted in any way?

Tom.


On 27 August 2010 21:40, TreKing treking...@gmail.com wrote:

 Thanks for the continued help.

 On Fri, Aug 27, 2010 at 2:22 PM, Dianne Hackborn hack...@android.comwrote:

  The first thing I would look for is any code writing data that could
 cause problems if it was killed in the middle of executing.


 That makes sense, but that's also why I'm confused. The main issue I've
 had, for which I have nearly 30 reports now in each version of my app in the
 dev console, has nothing to do with data access. Unless I'm really missing
 something.

 I have a base class reference that should be set to the appropriate
 instance of a derived class type based on user selection.
 These derived type instances come from a manager class, of sorts, that
 holds the instances. There is one static instance of this manager class in
 the app since it's global, constant data. So it should be initialized, along
 with it's internal data it manages, at all times. None of this involves any
 data access.

 Some pseudocode if it helps:

 // In Manager class
 public Manager
 {
  private MapString, BaseRef refs = null;

  public Manager()
  {
   refs = new TreeMapString, BaseRef();

   // Explicitly add derived instances of BaseRef
   refs.put(Key, new DerivedInstance());

   // add more ...
  }

  public BaseRef get(String key)
  {
   return refs.get(key);
  }
 }

 //In Static access class
 public StaticClass
 {
  private static Manager manager = new Manager();

  public static Manager getManager() { return manager; }
 }

 // Then, finally, in the class where the crash occurs
 BaseRef baseRef = StaticClass.getManager().get(userSelection);


 Userselection is the value chosen by the user from a list pre-populated
 by the Keys in the Manager class to begin with.
 So if the user was able to make the selection, the key was there at the
 start of the Activity, and in the manager where it originated from.

 baseRef, which is obtained from that single manager's list (which is
 essentially hard-coded), is later used elsewhere and ends up being null.

 There is no file data access involved anywhere in this Activity besides
 using SharedPreferences for exactly one option.

 Also, now that I've typed this out, this goes against the idea that statics
 are the problem since I would have had the null pointer at the point where I
 try to access the Manager class. Instead, it appears to be valid but for
 some reason its internal data, which is set on construction, is not.

 It's worth noting that I've seen this problem to a lesser extent before I
 added this manager class stuff, but since adding it last week, the problem
 seems to have exploded with a fury. But again, not sure if that's a result
 of a larger user-base over two months since last major update.

 I think at some point I'll start polling my users to see how many of them
 continue to see the issue after updating. Since I've instructed them, in
 nice big letters, to try uninstalling first, I expect not to hear any more
 complaints for now, but I'd rather fix the problem than band-aid it like
 this.


 -
 TreKing 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.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] T-Mobile G1 won't appear in 'adb devices' list

2010-08-27 Thread Mike
I'm trying to connect to connect to my T-Mobile G1 to test a simple
android app I an creating. I cannot get it to show up in the list of
connected android devices. Here are the details:

- 32-bit Windows XP
- I have enabled USB Debugging on my device
- I am not prompted with the New Hardware Wizard when I plug my device
in, it is merely seen as a new removable drive. It does not appear
under any other categories in Device Manager, nor is there a new
Unknown Device entry anywhere to be found
- I have tried Update Driver and select the driver that Google
provides for their official developer devices, but it says this
driver does not match your device or something to that effect.
Probably because it is expected a device type other than Disk Drive
- I have tried uninstalling the device under Disk Drives and
plugging it in again but it always gets reinstalled automatically as a
Disk Drive
- I have tried uninstalling the device, manually installing the Google
driver from the INF file and plugging in the device and it is still
only recognized as a Disk Drive
- Most importantly, I get a blank device list when I run adb devices
from the Android SDK tools directory before and after each step I
tried

After hours of scouring the web I get the distinct impression that a
new device category should be popping up in Device Manager if the
driver is installed correctly, but I have not been able to get the
device to come up as anything other than a new Disk Drive

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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread Brad Gies


Hah.. yes.. I guess non developers have as many jokes about developers 
as developers have about them :).


But it should be obvious to any developer:

How many developers have experienced the other person's eyes glazing 
over and their mind shutting down effect when they are excitedly 
telling their friends and family about everything the latest 
technology/gadget/device can do. I would suggest that it's really close 
to 100% and if you haven't experienced it, it just proves that you are 
totally unobservant about other people :).


And yet they still want to list all the features in their marketing 
materials it just boggles my mind :).


Brad.

On 27/08/2010 1:18 PM, Frank Weiss wrote:

Zsolt, I work at a digital advertising agency and have been sharing
your experience with my colleagues. They found it very intereresting
and of course, obvious. When I remarked that many Android developers
are, well, developers, they joked that maybe our agency should start
helping mobile app developers market their apps. Thanks again for
sharing your story.



--
Sincerely,

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

Everything in moderation, including abstinence

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

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


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

2010-08-27 Thread Anil
I want to copy the youtube.apk from my phone to my computer.
It is to test out an idea.
My phone is not a rooted phone (HTC Slide Android 2.1).

adb shell
cd /system/app
adb pull Youtube.apk c:\

I get
adb: permission denied

Any help appreciated.
-
Anil

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


[android-developers] Best background practices

2010-08-27 Thread Federico Paolinelli
Hi all, my application needs to perform some activities in background
(like interacting with the network and check the location and some
other stuff), having or not the main activity visible.

Which is the best way to achieve this? Should I write a service for
each kind of job? Or just one service that performs everything?

I am aware that I will need to launch threads / asynctasks in any case
because the service runs on the same thread of the ui, but maybe
having several services is a more clear and readable structure...

Thanks to everybody.

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: Paid vs Free, My Early Experience

2010-08-27 Thread Zsolt Vasvari
 Yeah, I don't know if I'd be willing to claim this entire theory is
 validated based on 8 more sales in one week for one app  ...

8 a day, for a week.  But it the perecntage that matters.  And today
it's up to 19 so far. (21 - 2 cancelations)


 I hope you don't mind me linking, the old one is still on 
 cyrket:http://www.cyrket.com/p/android/com.zvasvari.anmoneyp/

Not at all.  Thanks.



 I was typing as Chris replied, and I agree that including big names like
 Quicken and Microsoft probably helped in driving people to your app. Which,
 ironically, is a great marketing tactic =). And yeah, you've got some typos
 / misspellings which are generally not good marketing =P (unless intended,
 before you point to me =P)

Thanks to everybody for pointing them out.  Fixed the errors -- that's
what happens when you try to edit your description in that tiny window
on the Market app page.


 I noticed you have a free version as well. Did you update that too? That's a
 marketing too in and of itself.
 I always update my free version at the same time and indicate what's new in
 the full version only so the freebiers will consider upgrading.

Yeah, the free version says the same thing, minus the 24hr thing.


 Worth a shot =P

How does somebody get featured?


 How did you determine this? Just curious.

Just by looking at the names in Google Checkout.  An overwhelming
(90+) percentage of my users are from the US and the UK, though I've
yet to see a female name from a non-US buyer.


 And of course he used the try it risk-free 24 hours refund argument :)
 And I have to say it is a very clever message Zsolt.

Thanks, Yahel, but I've read that before that very few people actually
ask for their money back on anything.  It seems to hold true even if
it entails a single click.

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


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

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 3:53 PM, Tom Gibara tomgib...@gmail.com wrote:

 Have the keys changed between releases of the application? Is the selected
 key persisted in any way?


Nope, they're hard-coded and were introduced in the last update.
So where I have Key is a string literal I use to ID the derived instance.

So it's like:

refs.add(Option1, new Derived1());
refs.add(Option1, new Derived2());

and so on.

Then in a drop down, the user can select Option1 or Option2, each option
being obtained from the hard-coded list.
So yeah, no saving or restoring of the keys. All in the code.

-
TreKing 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: Best background practices

2010-08-27 Thread Maps.Huge.Info (Maps API Guru)
I think the consensus is that AsyncTask is the way to go if what
you're trying to do affects the UI thread eventually. Using a service
to compute location for instance would be over complicated.

-John Coryat

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


[android-developers] Re: Optimizing list view scroll

2010-08-27 Thread ls02
I did some profiling and it turned out significant time is spent on
loading images. Each listview item has a distinctive image. i have
thousands of items in my listview so I cannot cache them. I tried to
create an image on card folder cache of either PNG or JPEG image files
of exactly the same dimension as the images I render in listview item
ImageView. It helped but still not ideal.

I thought about saving uncompressed bitmap data to a an image cache
file with hope it will be faster to load and render since the image
won't need to be decompressed. But i didn't find any class or method
to save and load uncompressed bitmaps. The only way I see to save the
image to a disk file is Bitmap.compress which can be either JPEG or
PNG (BTW, which one from these two is faster to load and render?).

I also thought about loading images in worker thread but this appears
to be very complicated and I am not sure it will help and won't create
other problems. I would have to create a queue if currently visible
items and have to load images inside that thread. I worry that while I
load a title image it is already scrolled out and becomes invisible.


On Aug 26, 11:26 pm, Dianne Hackborn hack...@android.com wrote:
 http://developer.android.com/guide/developing/tools/traceview.html

 http://developer.android.com/guide/developing/tools/traceview.htmlThis may
 not be documented, but in newer versions you can use the am command to
 start and stop profiling.  Use adb shell am to get help for the command.





 On Thu, Aug 26, 2010 at 7:59 PM, ls02 agal...@audible.com wrote:
  How do I profile the code? I do recycle bitmaps since each list item
  displays its own bitmap image and without recycling I quickly run out
  of memory.

  On Aug 26, 10:50 pm, Dianne Hackborn hack...@android.com wrote:
   Run your code in a profiler.

   Make sure you aren't thrashing through temporary objects.  If the GC is
   running much while scrolling, optimize to reduce temp objects.

   On Thu, Aug 26, 2010 at 6:18 PM, ls02 agal...@audible.com wrote:
I have list view with fairly complex list view items consisting of
several image views, several text views, progress bars, etc. Depending
on the state of the item some of these elements can be show and some
are hidden. I understand that listview recycles views. Right now I am
dealing with slow listview scrolling especially on lower powered
devices. What's the best way to deal with this problem?

I already optimized each list item view as much as I could. Now I am
facing with what's the best? Use one single view with many children
for all items and hide and show various children depending on the item
state. This way I do not inflate each item view as list is being
scrolled but need to show and hide constantly various child views.

Another approach is to build item view dynamically each time view is
requested in the adapter getView method. In this case I can only add
at run time those elements that are truly needed for current item
state but this requires inflating item view every time.

Finally  the third approach is most extreme is to have one custom view
and draw everything myself. This of cause requires a lot of work.

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

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

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

   - Show quoted text -

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

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

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

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android 

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

2010-08-27 Thread Maps.Huge.Info (Maps API Guru)
You have to give it a path. The pull command doesn't know where
YouTube.apk is located. Try:

adb pull /system/app/YouTube.apk

instead.

-John Coryat

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


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

2010-08-27 Thread Greg Giacovelli
I think I see where you are coming from to a point however honestly I
dislike the global statement. I mean a wall of permissions is going to
turn into white noise to users (in which case the permission could be
for Brick for all they care leading to spam) or paranoid users (in
which case your platform dies from no use, but is perceived as lack of
creativity from developers). I am just saying it would be nice, from a
user perspective and from a developer perspective if I could
optionally request a permission and/or upgrade to a permission via
user interaction (through a system UI that could persist a No or a
Yes). I mean if it's at install time, how do you explain to a user why
the permission is needed (They aren't engineers remember, and it's
only like 256 characters in the market description field).

Just my two cents.

On Aug 27, 9:45 am, Dianne Hackborn hack...@android.com wrote:
 No it must be done at install time.  Honestly, this is better than prompting
 the user all over the place when they are actually trying to do some other
 task -- they are more likely to look at permissions (and as a whole) when
 the task at hand is installing an app.

 You can't intercept URIs without going through a system UI where the user
 decides what to do.  Also at that point the task they are doing is look at
 this thing I selected, so the decision they are making (pick which will
 show the thing they are wanting to look at) is relevant to their task at
 hand.

 On Fri, Aug 27, 2010 at 9:34 AM, Greg Giacovelli miyamo...@gmail.comwrote:





  I suspect there has to be. I mean I saw for bluetooth there is. I was
  wondering why it is not as easy for the other permissions. I mean heck
  we can intercept urls without even asking a user for the most part, so
  I would have to suspect that permissions have to have this ability.

  -Greg

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

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

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

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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread TreKing
At the risk of getting into another long-winded, miscommunicated debate ...
=P

On Fri, Aug 27, 2010 at 4:03 PM, Brad Gies rbg...@gmail.com wrote:

 How many developers have experienced the other person's eyes glazing over
 and their mind shutting down effect when they are excitedly telling their
 friends and family about everything the latest technology/gadget/device can
 do.


Actually, when I show friends and family my shiny phone and start emailing /
getting driving directions / looking up bus times, etc, etc, they open their
eyes with excitement and interest.

There's a reason that promotional videos or commercials show you what you
can do with the product - like the iPad commercial with the person email,
browsing, editing pictures, and playing games. These are all features of the
product. No, dully listing every single feature as a list of text is not the
best strategy, agreed - but there is unquestionable value in conveying to
the user what they can actually do with what you're asking them to pay for.

Unfortunately, we're all extremely limited in how we can do that on the
Market.

On Fri, Aug 27, 2010 at 4:30 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

  Yeah, I don't know if I'd be willing to claim this entire theory is
  validated based on 8 more sales in one week for one app  ...

 8 a day, for a week.


OK, that's a different story.


 But it the perecntage that matters.


Not really. 1 - 2 and 1,000 - 2,000 is the same percentage, but a wholly
different ball game.


  And today it's up to 19 so far. (21 - 2 cancelations)


Nice, congrats.

Fixed the errors -- that's what happens when you try to edit your
 description in that tiny window on the Market app page.


Use Chrome and resize that stupid window as big as you want =)
It's bad enough we have the character limit - I can't believe they limit the
window size too!


 Yeah, the free version says the same thing, minus the 24hr thing.


No, I meant did you update the app itself, like so users got an update
message to download it?


 How does somebody get featured?


I think only Google insiders and Jesus know the real answer to that, but I
have some theories.

1 - Be Google and promote your own apps
2 - Be a major company that does not need to be featured (and pay for the
privilege?)
3 - Win the lottery.
4 - Be picked randomly via this
methodhttp://www.youtube.com/watch?v=oBhrpD1x8zofeature=related
.


  How did you determine this? Just curious.

 Just by looking at the names in Google Checkout.


Ah, makes sense.

Thanks for sharing.

-
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: MenuItem with Spanned elements in their titles

2010-08-27 Thread Greg Giacovelli
Just to close this off, apparently in MenuItems for context menus you
need to use a string for the condensedTitle because the internal
EventLog is dumb.

On Aug 19, 7:28 pm, Greg Giacovelli miyamo...@gmail.com wrote:
 Hi I was just trying something and realized this doesn't seem possible
 due to the debugging code in the android OS.

 I register a context menu on an AdapterView, via
 registerContextMenu(mAdapterView), and then implement the
 onCreateContextMenu, like this:

 CharSequence title = context.getString(R.string.txt, userName);
 title = Html.fromHtml((String) title);
 MenuItem item = menu.add(ContextMenu.NONE, ContextMenu.NONE,
 ContextMenu.NONE, title);

 The context menu displays correctly, however when it is clicked I get
 an illegalArgumentException from the EventLog class when it tries to
 print out the condensedTitle.

 So I have found without setting the condensedTitle explicitly to
 something that is a String this occurs. Why is this marked as a
 CharSequence if it cannot handle it?

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


Re: [android-developers] Re: Error when adding a library project

2010-08-27 Thread Xavier Ducrohet
That is correct, you need a newer version of aapt.

See the compatible platforms:
http://developer.android.com/guide/developing/eclipse-adt.html#libraryReqts

On Fri, Aug 27, 2010 at 12:00 PM, Günther gru...@googlemail.com wrote:
 Hi Bret,

 do you have the latest SDK revisions? As far as I remember I got the
 same error before updating to the most recent revisions...

 Cheers,
 Günther


 On 27 Aug., 18:02, Bret Foreman bret.fore...@gmail.com wrote:
 I should also note that removing the library does not make the project
 build. In fact all the R resources are shown as unresolved. It appears
 that adding the new library breaks the R builder.

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

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] getContentHeight pixel density

2010-08-27 Thread Tom
i'm trying to use getContentHeight to compute how much scrollable
content i have remaining in a WebView.  when i run my app on devices
w/ different screen dimensions getContentHeight appears to return the
same value while the getHeight() on the container of the WebView
returns different values (larger for higher density screen, smaller
for lower density screen).

question: what units does getContentHeight return?  i would expect
this value is actual pixels, and thus would change for the same
content on different devices with different density screens.

thoughts?

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


[android-developers] Using Bouncy Castle with an Android app

2010-08-27 Thread fba
Has anyone managed to use Bouncy Castle in one of their apps?   I need
to be able to do detailed manipulations of x509 certificates (generate
CSRs, generate key pairs, convert between different certificate
formats, etc.), and BC seems the best way to do that.

I have tried putting the bcprov library in to my project, and then
just using BC like I normally would.   When the app is installed, a
large number of DexOpt: not verifying... messages pop up.  I suspect
this is because BC is already used in Android.  However, when I make
calls to certain methods in certain classes, I get errors like this :

java.lang.ClassCastException: org.bouncycastle.asn1.DERSequence


I suspect this is because of ambiguity between the classes that are
included in the OS, and the ones in my project.

Is there any way to get around this?  Maybe tell my program to use the
BC library that is included with it and ignore the one included in the
OS?

Or, could I get around this by making sure that I am using the same
version that is included in the OS?   (Or, in a nutshell, is the
ClassCastException likely to be a problem because the parameters
defined for the same method names don't match?)

Thanks for any help!

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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread Federico Paolinelli
What I really like of this thread is this kind of solidarity (hope
it's the right term) that bind you (us) all.
All this kind of suggestion feels very genuine, and it's nice.


On Sat, Aug 28, 2010 at 12:07 AM, TreKing treking...@gmail.com wrote:
 At the risk of getting into another long-winded, miscommunicated debate ...
 =P
 On Fri, Aug 27, 2010 at 4:03 PM, Brad Gies rbg...@gmail.com wrote:

 How many developers have experienced the other person's eyes glazing over
 and their mind shutting down effect when they are excitedly telling their
 friends and family about everything the latest technology/gadget/device can
 do.

 Actually, when I show friends and family my shiny phone and start emailing /
 getting driving directions / looking up bus times, etc, etc, they open their
 eyes with excitement and interest.
 There's a reason that promotional videos or commercials show you what you
 can do with the product - like the iPad commercial with the person email,
 browsing, editing pictures, and playing games. These are all features of the
 product. No, dully listing every single feature as a list of text is not the
 best strategy, agreed - but there is unquestionable value in conveying to
 the user what they can actually do with what you're asking them to pay for.
 Unfortunately, we're all extremely limited in how we can do that on the
 Market.
 On Fri, Aug 27, 2010 at 4:30 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

  Yeah, I don't know if I'd be willing to claim this entire theory is
  validated based on 8 more sales in one week for one app  ...

 8 a day, for a week.

 OK, that's a different story.


 But it the perecntage that matters.

 Not really. 1 - 2 and 1,000 - 2,000 is the same percentage, but a wholly
 different ball game.


  And today it's up to 19 so far. (21 - 2 cancelations)

 Nice, congrats.

 Fixed the errors -- that's what happens when you try to edit your
 description in that tiny window on the Market app page.

 Use Chrome and resize that stupid window as big as you want =)
 It's bad enough we have the character limit - I can't believe they limit the
 window size too!


 Yeah, the free version says the same thing, minus the 24hr thing.

 No, I meant did you update the app itself, like so users got an update
 message to download it?


 How does somebody get featured?

 I think only Google insiders and Jesus know the real answer to that, but I
 have some theories.
 1 - Be Google and promote your own apps
 2 - Be a major company that does not need to be featured (and pay for the
 privilege?)
 3 - Win the lottery.
 4 - Be picked randomly via this method.


  How did you determine this? Just curious.

 Just by looking at the names in Google Checkout.

 Ah, makes sense.
 Thanks for sharing.
 -
 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



-- 

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: T-Mobile G1 won't appear in 'adb devices' list

2010-08-27 Thread fba
I ran in to a similar issue last year.   After much searching and
messing around I managed to get it working by using bits and pieces of
various other people's blogs.  I went ahead and blogged about it
here : http://geektaco.blogspot.com/2009/10/of-androids-and-usb.html
.

Basically, it seems that Windows can sometimes incorrectly assign
drivers the first time the device is connected.   If you use something
like USBDeview you can clear all of that out, and get a second shot.
This method has worked for me on an ADP1 (basically a G1), Nexus One,
and myTouch3g Slide.

On Aug 27, 2:53 pm, Mike mikes.mails...@gmail.com wrote:
 I'm trying to connect to connect to my T-Mobile G1 to test a simple
 android app I an creating. I cannot get it to show up in the list of
 connected android devices. Here are the details:

 - 32-bit Windows XP
 - I have enabled USB Debugging on my device
 - I am not prompted with the New Hardware Wizard when I plug my device
 in, it is merely seen as a new removable drive. It does not appear
 under any other categories in Device Manager, nor is there a new
 Unknown Device entry anywhere to be found
 - I have tried Update Driver and select the driver that Google
 provides for their official developer devices, but it says this
 driver does not match your device or something to that effect.
 Probably because it is expected a device type other than Disk Drive
 - I have tried uninstalling the device under Disk Drives and
 plugging it in again but it always gets reinstalled automatically as a
 Disk Drive
 - I have tried uninstalling the device, manually installing the Google
 driver from the INF file and plugging in the device and it is still
 only recognized as a Disk Drive
 - Most importantly, I get a blank device list when I run adb devices
 from the Android SDK tools directory before and after each step I
 tried

 After hours of scouring the web I get the distinct impression that a
 new device category should be popping up in Device Manager if the
 driver is installed correctly, but I have not been able to get the
 device to come up as anything other than a new Disk Drive

 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] Clearing the Canvas in a Framelayout

2010-08-27 Thread ArcDroid
Hello,
I have a framelayout which works great except I want to have a clear
button.  So far the best option I can think of is to use the drawcolor
but this whipes everything including the buttons I have in the
framelayout.  Any ideas are appreciated.
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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-27 Thread Brad Gies


No debate about that... demo's are very effective for some products... 
and technology products are in that group :).


A good demo for an Android app that focused on showing what you can do , 
and Look how easy it is to do it would be a great marketing tool... if 
you can figure out how to get it to your potential customers.. or get 
your potential customers to it :).





On 27/08/2010 3:07 PM, TreKing wrote:
At the risk of getting into another long-winded, miscommunicated 
debate ... =P


On Fri, Aug 27, 2010 at 4:03 PM, Brad Gies rbg...@gmail.com 
mailto:rbg...@gmail.com wrote:


How many developers have experienced the other person's eyes
glazing over and their mind shutting down effect when they are
excitedly telling their friends and family about everything the
latest technology/gadget/device can do.


Actually, when I show friends and family my shiny phone and start 
emailing / getting driving directions / looking up bus times, etc, 
etc, they open their eyes with excitement and interest.


There's a reason that promotional videos or commercials show you what 
you can do with the product - like the iPad commercial with the person 
email, browsing, editing pictures, and playing games. These are all 
features of the product. No, dully listing every single feature as a 
list of text is not the best strategy, agreed - but there is 
unquestionable value in conveying to the user what they can actually 
do with what you're asking them to pay for.


Unfortunately, we're all extremely limited in how we can do that on 
the Market.






Sincerely,

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

Everything in moderation, including abstinence

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

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


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

2010-08-27 Thread Frank Weiss
On the otherhand, I'd probably want to know if an app was ever going
to ask for a particular permission. Then again, it might be reasonable
if an app, at some point after it's installed, said if you grant me
this permission, I can do this additional function or to fulfill
your request, I will need to use this permission. I suppose, though,
that this would make the security functions of the OS more difficult,
because the OS would need to intervene and get the actual user's
approval of the request.

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


Re: [android-developers] Using Bouncy Castle with an Android app

2010-08-27 Thread Frank Weiss
I suppose you might try asking the folks at BouncyCastle to provide an
Andorid/Dalvik/Harmony version or become a committer on that project.
(Damnit! I'm starting to see some merit to the Oracle vs
Google/Android lawsuit)

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


Re: [android-developers] Using Bouncy Castle with an Android app

2010-08-27 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/28/10 00:55 , fba wrote:


 Or, could I get around this by making sure that I am using the
 same version that is included in the OS?   (Or, in a nutshell, is
 the ClassCastException likely to be a problem because the
 parameters defined for the same method names don't match?)
I don't fully understand what's happening to you because more details
are needed, and generally speaking I think that Android would prevent
you from embedding in your app classes which are already present in
the runtime, but your problem seems to definitely fall within this area.

One possible solution (but it's about the symptom, not necessarily the
real cause and thus not necessarily the best solution) is to use a
static bytecode manipulator that renames packages in a jar. I use
Maven and there is the maven-shade-plugin, but I'm sure similar tools
exist for Ant. The basic idea is that if you have L.jar containing
com.acme.MyClass and A.jar referring to it, with the tool you can
directly feed in L.jar and A.jar and achieve L2.jar and A2.jar where
both the original class and its references have been replaced by
something such as foo.bar.com.acme.MyClass. This works for me (not for
BouncyCastle but for other stuff). With this trick, your source files
stay as they are, but the binary code gets fixed before being
converted to dex.

- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx4SjMACgkQeDweFqgUGxfolwCfeStWh31mcmgzcRdjkcbCNA+Y
qOsAn0Twzw2rUyRDwSh5hT2UKyUD/dzK
=zjwJ
-END PGP SIGNATURE-

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


Re: [android-developers] Re: How do you force a reset just like rotation does?

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 2:31 PM, ArcDroid jacobrjohn...@gmail.com wrote:

 I have already searched all those links, but was expecting some basic call
 that is generic to every program.


The call itself is generic, but the arguments have to specify what activity
you're talking about and only you know that (assuming you're not handling
some generic intent).

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

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

Re: [android-developers] Re: Android libraries

2010-08-27 Thread Xavier Ducrohet
Are you sure you're referencing it through the library system and not
in the standard JDT build-path?

On Wed, Aug 25, 2010 at 1:54 AM, Günther gru...@googlemail.com wrote:
 Xavier,

 sorry to intrude here after a month, but I'm having the problem
 described above that the class files from the library project are not
 included in the apk-file at all. Compiling seems to be working, but I
 cannot run the application of course, since the classes are missing. I
 have a single library project (no external JARs), and an application
 project referencing it.

 Since deg seems to have had problems more related to auto-refresh,
 what could cause my kind of behavior?

 Thanks,
 Günther


 On 13 Jul., 18:58, Xavier Ducrohet x...@android.com wrote:
 On Tue, Jul 13, 2010 at 1:33 AM, deg d...@degel.com wrote:
  A related question, too: I'm stuck with a few warning messages in one
  of my library files. This is bad enough on it's own (my dev style is
  generally a zero warnings tolerated) but it's worse because Eclipse
  shows multiple copies of each warning; one for each open app that is
  using the library. Is there any way to educate Eclipse to treat all
  mentions of the library as the same?

 Not with the current implementation (linked folders). I haven't found
 anything (yet?) that allows me to do what I want without creating a
 linked folder in the main project. JDT is not flexible enough for
 this.

  Re shipping in binary form... that's really a pity. It defeats one of
  the major reasons to uselibraries. Any plans to fix this in the
  future?

 We don't have any plan at this time, but I hope to look into it later this 
 year.

  I'll reply to Mark's message in a moment. Perhaps some merge between
 Androidlibrariesand his parcels would work well for everyone?

 This is a possibility.

 Xav
 --
 Xavier DucrohetAndroidSDK Tech Lead
 Google Inc.

 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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

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


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

2010-08-27 Thread Dianne Hackborn
I think there is enough evidence that asking permission at time of need
doesn't generally work -- see the MIDP experience, Windows Vista/7 security,
etc.  There is a fundamental problem that at the point you ask the
permission, the user is wanting to accomplish some task at hand, and all you
are doing is bugging them.

And it gets much worse when you consider applications being able to run in
the background.  Do permission requests pop up on users from the background?
 Does a notification get posted that they respond (or not respond) to at
their leisure?

If you have a wall of permissions, the first thing I would suggest is
looking at those and seeing if you can trim it down.  In fact, doing things
that make it easier for apps to make use of lots of permissions are to me
counter-productive -- it is a good thing to make lots of permission use a
harder road.

I just had a look through the apps installed on my phone, and the *vast*
majority of them only require a couple permissions.  So someone who is using
a large number of permissions is going to stand out from what user's
normally see, as well they should.

From the platform side, we also need to avoid making it easy to have lots of
permissions.  We need to be continuing to design the platform to reduce the
permissions that apps need.  For example, the window flag to keep the screen
on avoids the need of the power manager permission for most applications; we
should beef up our intent interactions with the contacts app so applications
can work with the user to select and modify applications through that
without using permissions; etc.

On Fri, Aug 27, 2010 at 3:09 PM, Greg Giacovelli miyamo...@gmail.comwrote:

 I think I see where you are coming from to a point however honestly I
 dislike the global statement. I mean a wall of permissions is going to
 turn into white noise to users (in which case the permission could be
 for Brick for all they care leading to spam) or paranoid users (in
 which case your platform dies from no use, but is perceived as lack of
 creativity from developers). I am just saying it would be nice, from a
 user perspective and from a developer perspective if I could
 optionally request a permission and/or upgrade to a permission via
 user interaction (through a system UI that could persist a No or a
 Yes). I mean if it's at install time, how do you explain to a user why
 the permission is needed (They aren't engineers remember, and it's
 only like 256 characters in the market description field).

 Just my two cents.

 On Aug 27, 9:45 am, Dianne Hackborn hack...@android.com wrote:
  No it must be done at install time.  Honestly, this is better than
 prompting
  the user all over the place when they are actually trying to do some
 other
  task -- they are more likely to look at permissions (and as a whole) when
  the task at hand is installing an app.
 
  You can't intercept URIs without going through a system UI where the user
  decides what to do.  Also at that point the task they are doing is look
 at
  this thing I selected, so the decision they are making (pick which will
  show the thing they are wanting to look at) is relevant to their task at
  hand.
 
  On Fri, Aug 27, 2010 at 9:34 AM, Greg Giacovelli miyamo...@gmail.com
 wrote:
 
 
 
 
 
   I suspect there has to be. I mean I saw for bluetooth there is. I was
   wondering why it is not as easy for the other permissions. I mean heck
   we can intercept urls without even asking a user for the most part, so
   I would have to suspect that permissions have to have this ability.
 
   -Greg
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   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.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

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




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

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't 

[android-developers] Re: Licensing server, app cracked.

2010-08-27 Thread Lance Nanek
There's lots of information on using ProGuard with Android apps if you
just Google those terms. I implemented it once with one of my apps to
see if it would help my frame rates, but decided not to ship it.
Wasn't much performance improvement in my case and not sure if I want
the extra annoyance of having to convert stack traces back.

On Aug 27, 1:32 pm, sblantipodi perini.dav...@dpsoftware.org wrote:
 no news on the imminent guide where is this guide?

 On Aug 26, 5:37 pm, sblantipodi perini.dav...@dpsoftware.org wrote:

  Is this the guide you are talking about?
  To ensure the security of your application, particularly for a paid
  application that uses licensing and/or custom constraints and
  protections, it's very important to obfuscate your application code.
  Properly obfuscating your code makes it more difficult for a malicious
  user to decompile the application's bytecode, modify it — such as by
  removing the license check — and then recompile it.

  Several obfuscator programs are available for Android applications,
  including ProGuard, which also offers code-optimization features. The
  use of ProGuard or a similar program to obfuscate your code is
  strongly recommended for all applications that use Android Market
  Licensing. 

  Is this a guide?

  On Aug 25, 1:26 am, Nick Richardson richardson.n...@gmail.com wrote:

   The guide is linked in the article you posted...

   On Tue, Aug 24, 2010 at 3:53 PM, sblantipodi
   perini.dav...@dpsoftware.orgwrote:

As title,

   http://android-developers.blogspot.com/2010/08/licensing-server-news

where is the guide to obfuscate our code?

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

   --
   //Nick Richardson
   //richardson.n...@gmail.com

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


Re: [android-developers] Re: Optimizing list view scroll

2010-08-27 Thread Dianne Hackborn
This is an API demo for dealing with data that is slow to load:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List13.html

You'll of course want to do this a little differently, filling in as much of
each item as you can when binding, and having a background thread loading
images to populate later when they are ready.  (Instead of the stuff this
demo does with the scroll state changing.)

On Fri, Aug 27, 2010 at 2:59 PM, ls02 agal...@audible.com wrote:

 I did some profiling and it turned out significant time is spent on
 loading images. Each listview item has a distinctive image. i have
 thousands of items in my listview so I cannot cache them. I tried to
 create an image on card folder cache of either PNG or JPEG image files
 of exactly the same dimension as the images I render in listview item
 ImageView. It helped but still not ideal.

 I thought about saving uncompressed bitmap data to a an image cache
 file with hope it will be faster to load and render since the image
 won't need to be decompressed. But i didn't find any class or method
 to save and load uncompressed bitmaps. The only way I see to save the
 image to a disk file is Bitmap.compress which can be either JPEG or
 PNG (BTW, which one from these two is faster to load and render?).

 I also thought about loading images in worker thread but this appears
 to be very complicated and I am not sure it will help and won't create
 other problems. I would have to create a queue if currently visible
 items and have to load images inside that thread. I worry that while I
 load a title image it is already scrolled out and becomes invisible.


 On Aug 26, 11:26 pm, Dianne Hackborn hack...@android.com wrote:
  http://developer.android.com/guide/developing/tools/traceview.html
 
  http://developer.android.com/guide/developing/tools/traceview.htmlThis
 may
  not be documented, but in newer versions you can use the am command to
  start and stop profiling.  Use adb shell am to get help for the
 command.
 
 
 
 
 
  On Thu, Aug 26, 2010 at 7:59 PM, ls02 agal...@audible.com wrote:
   How do I profile the code? I do recycle bitmaps since each list item
   displays its own bitmap image and without recycling I quickly run out
   of memory.
 
   On Aug 26, 10:50 pm, Dianne Hackborn hack...@android.com wrote:
Run your code in a profiler.
 
Make sure you aren't thrashing through temporary objects.  If the GC
 is
running much while scrolling, optimize to reduce temp objects.
 
On Thu, Aug 26, 2010 at 6:18 PM, ls02 agal...@audible.com wrote:
 I have list view with fairly complex list view items consisting of
 several image views, several text views, progress bars, etc.
 Depending
 on the state of the item some of these elements can be show and
 some
 are hidden. I understand that listview recycles views. Right now I
 am
 dealing with slow listview scrolling especially on lower powered
 devices. What's the best way to deal with this problem?
 
 I already optimized each list item view as much as I could. Now I
 am
 facing with what's the best? Use one single view with many children
 for all items and hide and show various children depending on the
 item
 state. This way I do not inflate each item view as list is being
 scrolled but need to show and hide constantly various child views.
 
 Another approach is to build item view dynamically each time view
 is
 requested in the adapter getView method. In this case I can only
 add
 at run time those elements that are truly needed for current item
 state but this requires inflating item view every time.
 
 Finally  the third approach is most extreme is to have one custom
 view
 and draw everything myself. This of cause requires a lot of work.
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubs­cr...@googlegroups.com
   android-developers%2bunsubs­cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
--
Dianne Hackborn
Android framework engineer
hack...@android.com
 
Note: please don't send private questions to me, as I don't have time
 to
provide private support, and so won't reply to such e-mails.  All
 such
questions should be posted on public forums, where I and others can
 see
   and
answer them.- Hide quoted text -
 
- Show quoted text -
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, 

[android-developers] Re: Sysinfo CPU load in DDMS not working with 2.2 devices?

2010-08-27 Thread Patrick
OK, looking through the ddmuilib/SysinfoPanel source code
http://bit.ly/amJRR0 it looks like the code just executes
a dumpsys cpuinfo command and then parses the output
to build the pie chart.

On a 1.6 emulator the output looks like this:

# dumpsys cpuinfo
dumpsys cpuinfo
Currently running services:
  cpuinfo
---
DUMP OF SERVICE cpuinfo:
Load: 0.13 / 0.3 / 0.14
CPU usage from 62119ms to 2119ms ago:
  system_server: 1% = 1% user + 0% kernel
  com.android.inputmethod.latin: 0% = 0% user + 0% kernel / faults:
2828 minor
  com.android.phone: 0% = 0% user + 0% kernel / faults: 9 minor
  adbd: 0% = 0% user + 0% kernel / faults: 16 minor
  qemud: 0% = 0% user + 0% kernel
 +sh: 0% = 0% user + 0% kernel
TOTAL: 2% = 1% user + 0% kernel + 0% softirq


but on a 2.2 emulator, the output looks like this:

# dumpsys cpuinfo
dumpsys cpuinfo
Load: 0.0 / 0.02 / 0.07
CPU usage from 111611ms to 51608ms ago:
  system_server: 2% = 1% user + 0% kernel / faults: 3 minor
  zygote: 0% = 0% user + 0% kernel / faults: 1 minor
TOTAL: 2% = 1% user + 0% kernel


i.e. the dashes and DUMP OF SERVICE text are missing,
as well as the softirq percentage in the TOTAL line.

I'll have to look through the code more to see if it's
this or something else in the dumpsys output that causes
DDMS to not show the chart.

In the mean time, at least I now know I can use the
shell and dumpsys cpuinfo to get the same info
(but without the nice chart...)


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 LED notifications to work on my Motorola Droid (with Froyo)

2010-08-27 Thread Brian Swartzfager
Never mind:  I figured out the issue.  Apparently after the 2.1
update, the notification light on the Motorola Droid only blinks when
the screen is blank (http://androidforums.com/motorola-droid/76585-
help-led-notification-light-stopped-working.html).  I never really
noticed the change, but I was able to confirm the fact.  Once the
screen is lit, the notification light goes off.


On Aug 22, 10:08 pm, Brian Swartzfager bcswa...@gmail.com wrote:
 I know others have posted with this general problem, but I've read the
 Android developer page on the topic, as well as several forum and blog
 posts (such 
 ashttp://androidblogger.blogspot.com/2009/09/tutorial-how-to-use-led-wi...),
 and no matter what I do, the LED light will not blink.

 I've tried it with DEFAULT_LIGHTS:

 String ns = Context.NOTIFICATION_SERVICE;
 NotificationManager mNotificationManager = (NotificationManager)
 getSystemService(ns);
 int icon = R.drawable.icon;
 CharSequence tickerText = Test 1;
 long when = System.currentTimeMillis();
 ...
 Notification notification = new Notification(icon, tickerText, when);
 notification.defaults |= Notification.DEFAULT_LIGHTS;
 final int HELLO_ID = 1;
 mNotificationManager.notify(HELLO_ID, notification);

 ...and with custom lighting settings:

 String ns = Context.NOTIFICATION_SERVICE;
 NotificationManager mNotificationManager = (NotificationManager)
 getSystemService(ns);
 int icon = R.drawable.icon;
 CharSequence tickerText = Test 2;
 long when = System.currentTimeMillis();
 Notification notification = new Notification(icon, tickerText, when);
 ...
 notification.ledARGB = 0xff00ff00;
 notification.ledOnMS = 300;
 notification.ledOffMS = 1000;
 notification.flags |= Notification.FLAG_SHOW_LIGHTS;
 final int HELLO_ID = 1;
 mNotificationManager.notify(HELLO_ID, notification);

 ...but nothing happens (no error and no light).  I can get the same
 notification to play the default notification sound and to vibrate the
 phone, but the LED simply won't work (and I know the light physically
 works, as I see it flash for email and such).

 I thought perhaps it might be a color issue, but I've tried a few
 color values with no luck.

 I'm pretty much looking for any sort of suggestions, whether they be
 color values worth trying or any sample code from anyone who's
 successfully done LED notifications on a Motorola Droid running 2.1 or
 higher (I noticed one or two posts referenced some sort of bug with
 LED notifications on the Droid but no details were provided).

 I will also mention (in case it's relevant, though I doubt that it is)
 that I am defining a custom layout for my notifications.

 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


Re: [android-developers] Re: How do you force a reset just like rotation does?

2010-08-27 Thread Shawn Brown
 I have already searched all those links, but was expecting some basic call
 that is generic to every program.

 The call itself is generic, but the arguments have to specify what activity
 you're talking about and only you know that (assuming you're not handling
 some generic intent).

generic?

Can't you use :

Intent(Context packageContext, Class? cls)
Create an intent for a specific component.


So

startActivity(new Intent(this, this.class);

I haven't tested it though.  If this.class doesn't resolve to the
current activity class name, you'll have to figure out a way to get it
there.  I think it'll work.

Shawn

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


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

2010-08-27 Thread Doug
I've discovered what may be a bug in the app2sd feature of Android
2.2.  I haven't been able to find any information about it using the
usual searches.

My app will create a home screen shortcut in the usual way.  Inside
its intent that to be launched is a few extras describing the action
to take.  One of the extras is a string array.  Now apparently, if
someone creates a shortcut with my app, then moves the app to the
sdcard, Android will strip out the string array intent from the
shortcut.  Other extras are left intact.  This of course renders the
shortcut useless to the app since key data is missing.  Moving the app
back to the phone doesn't restore the missing data.

If the app is already on the sdcard and a shortcut is then created,
it's OK.  But then if the app is moved back to the phone, the string
array extra is stripped again.

I'm just going to take a wild-ass guess and say that Android does
something to an app's shortcuts when it gets moved to and from the
sdcard (maybe re-constructing it?) but it's not copying the string
array extras.  Is there any merit to this guess?  Time to file a bug?

Doug

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


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

2010-08-27 Thread Robert Green
Hey guys,

I doubt there are too many people who run CDT in eclipse for native
apps also with ADT installed for Android, but in the off-chance that
someone here knows anything about this, my problem is that any time I
run any android app, my C builder kicks in for projects totally
unrelated.  I have no idea why and have been digging through settings
on everything, unable to find out why.  All I can think is that the
ADT pre-launch process triggers it via a refresh or some kind of catch-
all type call in eclipse API land that I'm unaware of.

Does anyone know anything about this?  It's very annoying to have a C
builder run for a different project than the one you're working on
every time you launch the app.

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


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

2010-08-27 Thread Doug
I'll follow up with extra info by pointing out that the string array
extra also gets wiped when the device is rebooted.  Both N1 and
Droid.  And I'm told by a user that apparently this was a problem in
Android 2.1 as well.

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


[android-developers] Re: How do you force a reset just like rotation does?

2010-08-27 Thread ArcDroid
i was reading the links you sent and you would think that
super.ondestroy(); should also do the trick, but doesn't.  Any idea
why?

On Aug 27, 12:31 pm, ArcDroid jacobrjohn...@gmail.com wrote:
 I have already searched all those links, but was expecting some basic
 call that is generic to every program.

 On Aug 27, 12:13 pm, TreKing treking...@gmail.com wrote:



  On Fri, Aug 27, 2010 at 1:53 PM, ArcDroid jacobrjohn...@gmail.com wrote:
   thanks for the quick reply, but what args are you referring too

 http://developer.android.com/reference/android/content/Context.html#s...)

  And if you don't know how to start your own 
  activity:http://developer.android.com/guide/topics/fundamentals.html#acttask

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

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


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

2010-08-27 Thread Michael MacDonald
On 08/27/10 22:42, Doug wrote:
 I'll follow up with extra info by pointing out that the string array
 extra also gets wiped when the device is rebooted.  Both N1 and
 Droid.  And I'm told by a user that apparently this was a problem in
 Android 2.1 as well.

   
I noticed the same problem with extra data in shortcuts disappearing--
didn't realize it started in 2.1 though, I just assumed it never worked

Definitely worth a bug report

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


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

2010-08-27 Thread Romain Guy
Extras are supported but not arrays. You can use String, int, long,
byte, char, boolean, double, float and short. Nothing else will be
persisted, nor is there any plan to support arrays. You can probably
see an exception in logcat logged when Launcher tries to save your
Intent in the database.

On Fri, Aug 27, 2010 at 9:29 PM, Michael MacDonald
googlec...@antlersoft.com wrote:
 On 08/27/10 22:42, Doug wrote:
 I'll follow up with extra info by pointing out that the string array
 extra also gets wiped when the device is rebooted.  Both N1 and
 Droid.  And I'm told by a user that apparently this was a problem in
 Android 2.1 as well.


 I noticed the same problem with extra data in shortcuts disappearing--
 didn't realize it started in 2.1 though, I just assumed it never worked

 Definitely worth a bug report

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


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

2010-08-27 Thread Brad Gies


I would argue the opposite :)

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


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


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



Brad.



On 27/08/2010 5:36 PM, Dianne Hackborn wrote:
I think there is enough evidence that asking permission at time of 
need doesn't generally work -- see the MIDP experience, Windows 
Vista/7 security, etc.  There is a fundamental problem that at the 
point you ask the permission, the user is wanting to accomplish some 
task at hand, and all you are doing is bugging them.


And it gets much worse when you consider applications being able to 
run in the background.  Do permission requests pop up on users from 
the background?  Does a notification get posted that they respond (or 
not respond) to at their leisure?


If you have a wall of permissions, the first thing I would suggest is 
looking at those and seeing if you can trim it down.  In fact, doing 
things that make it easier for apps to make use of lots of permissions 
are to me counter-productive -- it is a good thing to make lots of 
permission use a harder road.


I just had a look through the apps installed on my phone, and the 
*vast* majority of them only require a couple permissions.  So someone 
who is using a large number of permissions is going to stand out from 
what user's normally see, as well they should.


From the platform side, we also need to avoid making it easy to have 
lots of permissions.  We need to be continuing to design the platform 
to reduce the permissions that apps need.  For example, the window 
flag to keep the screen on avoids the need of the power manager 
permission for most applications; we should beef up our intent 
interactions with the contacts app so applications can work with the 
user to select and modify applications through that without using 
permissions; etc.



Sincerely,

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

Everything in moderation, including abstinence

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

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


[android-developers] Re: detecting/intercepting incoming calls

2010-08-27 Thread Doug
See TelephonyManager

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


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

2010-08-27 Thread Dianne Hackborn
Well, we disagree.

On Fri, Aug 27, 2010 at 10:27 PM, Brad Gies rbg...@gmail.com wrote:


 I would argue the opposite :)

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

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

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


 Brad.




 On 27/08/2010 5:36 PM, Dianne Hackborn wrote:

 I think there is enough evidence that asking permission at time of need
 doesn't generally work -- see the MIDP experience, Windows Vista/7 security,
 etc.  There is a fundamental problem that at the point you ask the
 permission, the user is wanting to accomplish some task at hand, and all you
 are doing is bugging them.

 And it gets much worse when you consider applications being able to run in
 the background.  Do permission requests pop up on users from the background?
  Does a notification get posted that they respond (or not respond) to at
 their leisure?

 If you have a wall of permissions, the first thing I would suggest is
 looking at those and seeing if you can trim it down.  In fact, doing things
 that make it easier for apps to make use of lots of permissions are to me
 counter-productive -- it is a good thing to make lots of permission use a
 harder road.

 I just had a look through the apps installed on my phone, and the *vast*
 majority of them only require a couple permissions.  So someone who is using
 a large number of permissions is going to stand out from what user's
 normally see, as well they should.

 From the platform side, we also need to avoid making it easy to have lots
 of permissions.  We need to be continuing to design the platform to reduce
 the permissions that apps need.  For example, the window flag to keep the
 screen on avoids the need of the power manager permission for most
 applications; we should beef up our intent interactions with the contacts
 app so applications can work with the user to select and modify applications
 through that without using permissions; etc.

  Sincerely,

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

 Everything in moderation, including abstinence

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

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




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

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

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

[android-developers] Re: Piracy Breakdown by Country

2010-08-27 Thread gosh
Hi Dave,

Thanks for the stats - as disconcerting as they are.

As an Australian software developer I was very disappointed to see
Australia up top in the percentages on your scale of software pirates,
wrt to your app - which I find hard to explain, subjectively or
otherwise.

I'll make a few points though (I'm assuming your figures are for your
utility 'Screebl Pro', via your link):

* Having some background in data analysis, I don't consider sample
sizes under 300 to be statistically significant - which leaves you
with 4 rows of data at this stage.

* Going on your app, the US is the only place where Android is a big
success thus far -  I do know that 'utility' programs are a bit
'techie' for most regular phone users, but I'm thinking percentages
here.

* Android phones are fairly few on the ground in Australia (in my
limited experience with other Android owners - other owners have been
either software developers/publishers or university students, many of
whom are from overseas - many/most countries). That said, since the
'main' telco here (Telstra) began selling Android phones here in April
2010, some regular folk/mums-and-dads are now starting to buy them….
i.e. The fact that australia is 4th in your list of overall downloads
is very surprising to me, given the great lack of Google/Android-phone
focus upon Australia - I thought it would be down around the NZ
figures. Note: Most ads I've seen for Android phones here do 'not'
even mention 'Android' at all (E.g. the recent ads for the Samsung
i9000 Galaxy S ) - so I assume its either a perceived marketing
negative, or its not worth the 'copy' space the single word would take
up.

* As a former president of the Australian Software Publishers
Association, I know that Australians generally 'do' buy their software
when its not open source - which is the main precursor to a country
having a software industry. Its a part of the 'a fair go mate' ethos
here - so Indy developers are likely to do well here - and do, given
an avenue to market.

* I do know that there are lots of software developers in Australia
'very pissed-off' with Google in that we are unable to 'sell' our
programs in the Android Market (even though our customers can buy them
from elsewhere) - e.g. I've had programs sitting here collecting dust
for 12 months (yes, 365 days, one planetary orbit around the Sun [the
one thats 93 million miles away] - no actions, and worse, no words
about actions, from Google) come Tuesday this week see:
http://www.digitalfriend.org/blog/month2009-09.html - but that is
unlikely to cause a software developer to pirate other software
developers hard work. I certain haven't and wouldn't. That kama is
reserved for Google (and then Android), not for fellow software
developers.  i.e. If you are unable to circulate your own work, ones
enthusiasm eventually dries up and withers on the vine, such that, in
my case at least, I've abandoned my daily usage of the Android phone
itself, and now use an alternative smart phone from a company with a
global perspective instead.

* Its true that, within the list of countries wrt your downloads,
Canadian, Kiwi and Swiss developers also cannot sell their apps on
Google Android Market to their own customers - so if it was 'a
disgruntled developer issue' re Australia, you would likely see it
there too - but as I've pointed out, your figures for those countries
are statistically insignificant, so that doesn't constitute evidence
either way.

* I'm not surprised at your figures for Japan - even major software
contracts with Japanese companies usually only require a hand-shake to
seal an honorable relationship. (I wonder if they even have local
lawyers? )

* As much as I am surprised at your figures for Australia, I am also
surprised at your figures for the US. They seem overly high to me. It
makes me wonder what your software does and how much it costs wrt
other apps? More so, it makes me wonder if the 'Lite' version is an
overly crippled version of the 'Pro' version, such that large numbers
of people are justifying an illegal download of the Pro version. I.e.
Is the Lite version 'really' useful in its own right - or is it little
more than 'an ad' that constitutes an expensive download to the
unwitting customer/phone user? It would also be of general interest to
know what the respective download numbers for your 'Lite' version are,
over the same period of time? (Note: I really have no knowledge of
your app - so these are just very general questions/ponderings by me,
and are certainly 'not' reflections upon your apps, Lite version or
Pro)…

If your figures are indeed generally representative of Android apps of
all sorts, then yes, your experience is indeed a worry for all - and
it makes a Licensing approach totally necessary for paid apps - sad
but true, given the low retail cost of phone apps in general.

Cheers
Steve

On Aug 27, 7:15 am, keyeslabs keyes...@gmail.com wrote:
 Actually, the largest *contributor* to piracy was the US, but the
 

<    1   2