[android-developers] URGENT!!!!! Can't update apps in android market!!!

2009-04-24 Thread Yan Shi

When I upload an apk update for one of my apps(Hello Yahoo), I was
told that Market requires the minSdkVersion to be set in
AndroidManifest.xml.. So I can't do the update!

I already set this attribute in AndroidManifest.xml. What's wrong??

I even set it to uses-sdk minSdkVersion=3 /, but still I can't do
the update.

Has anyone met this problem?

BTW, when I go to http://market.android.com/publish/Home today, I have
accepted Term and Service again. I think already accepted it the first
time I registered for it. Why should I accept it again?

Could any google stuff look into this please?

Thanks very much


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



[android-developers] Re: What's this problem?

2009-04-24 Thread Alex

I have tried this.
// code snip start
URL url = new URL(string);
HttpURLConnection con = (HttpURLConnection)url.openConnection();
InputStream is = con.getInputStream();
Bitmap bmp = BitmapFactory.decodeStream(is);
is.close();
con.disconnect();
// code snip stop
It doesn't help.

FYI, when I added a while loop, like this
while(bmp == null)
{
  Thread.sleep(100);
  URL url = new URL(string);
  Bitmap bmp = BitmapFactory.decodeStream(url.openStream());
}

After one/two try, it always return a valid Bitmap.

But I think it just a workaround. Is there any stand way to fix it?

On Apr 24, 1:08 pm, Jack Ha (T-Mobile USA) jack...@t-mobile.com
wrote:
 You may want to try adding the following line before return bmp;

     con.disconnect()

 --
 Jack Ha
 Open Source Development Center
 ・T・ ・ ・Mobile・ stick together

 The views, opinions and statements in this email are those of
 the author solely in their individual capacity, and do not
 necessarily represent those of T-Mobile USA, Inc.

 On Apr 23, 6:29 am, Alex alex@gmail.com wrote:

  I have written a method, like this
  private Bitmap getBitmapFromUrl(String urlString)
  {
    try  {
      URL url = new URL(urlString);
      HttpURLConnection con = (HttpURLConnection)url.openConnection();
      InputStream is = con.getInputStream();
      Bitmap bmp = BitmapFactory.decodeStream(is);
      return bmp;
    }catch(Exception e)
    {
      return null;
    }

  };

  When I call this method continuously in a thread, it returns a valid
  bitmap only at the first call, as for the following call, LogCat would
  report jpeg error 20 Improper call to JPEG library in state.

  Actually, I think the problem is because of the connection error,
  since when I debug the application, the inputstream seems invalid.

  Is there anyone know what the problem is it?
  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] where is APN setting stored in emulator/device?

2009-04-24 Thread Lawrence

Dear all,
   I am wondering where is APN setting stored in emulator/devices. and
what's its file format, in xml or anything else?
   Thanks,

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



[android-developers] JPEG PixelFormat

2009-04-24 Thread Sheado

Hi,

Is the JPEG image returned by Camera.takePicture(...) always going to
be in the same color space, regardless of the phone Android is on?

Thank 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: SharedPreferences got deleted! - What could be the problem?

2009-04-24 Thread scanning_it

These reports don't sound good at all. I'm just wondering why some
developers don't have any problems at all.

On Apr 23, 10:36 pm, nEx.Software justin.shapc...@gmail.com wrote:
 I was having this issue but couldn't figure it out. Now, I store all
 of my settings in the SQLiteDatabase I use for the rest of the
 Application. I don't even touch theSharedPreferencesfor fear of
 losing the Preferences altogether.

 On Apr 23, 1:27 pm, Mattaku Betsujin mattaku.betsu...@gmail.com
 wrote:

  I also saw the prefs being lost ocassionally, especially after update or
  reinstall. I haven't seen it happen (yet) after quoting, but maybe that's
  just luck.

  I will also add a call to setPersistent to my app see if that helps.

  On Thu, Apr 23, 2009 at 1:12 PM, scanning_it
  festival.s...@googlemail.comwrote:

   Thank you for your responses. By the way I love Nubinews. :)

   It is a known bug that  signs lead to a loss of shared prefs. But my
   settings don't include these signs. :( I have only the following
   things included as strings:

   content://media/internal/audio/media/33
   100,200,300,400

   So this can't be the problem with my settings loss. :( I will try
   using to quote the strings right now and I hope to fix the problems
   with that. My problem ist that I can't reproduce the bug on a daily
   basis. Often it works with the same settings for weeks and suddenly
   the prefs are gone.

   On Apr 23, 7:09 pm, Mattaku Betsujin mattaku.betsu...@gmail.com
   wrote:
I found that the preferences XML will break very easily if you store 
some
Strings containing 'special' characters. I am not sure what exactly 
those
are, but when I stored things like

     putString(someurl, http://xyz/?a=bc=d;)

the preference file becomes empty next time I try to open it.

My solution is to quote all Strings that I put into the
  SharedPreferences.
After that my problems seems to go away.

I couldn't find a Base64 encoder in the Android API, so I wrote a
quick-and-dirty PrefQuote class:

   http://code.google.com/p/nubi/source/browse/trunk/android/nubinews/sr...

     putString(someurl, PrefQuote.quote(http://xyz/?a=b;))

Hope this helps

On Thu, Apr 23, 2009 at 9:56 AM, bo bost...@gmail.com wrote:

 I doSharedPreferences.Editor.commit() in couple of places. 1.
 Immediately after setting the preference. 2. in Activity#onStop.
 Nevertheless when I restart the app the preferences are gone. Any more
 ideas? I do create prefs programmaticaly after harvesting these from
 user (username/pwd)

 On Apr 21, 11:00 pm, Chander Pechetty cspeche...@gmail.com wrote:
  Sorry, I was referring to the settings created using
  PreferenceActivity screen using xml. Your actual preference values 
  do
  not help much in diagnosing the issue.

  Example snippet from loadingpreferencesfrom xml:
                      CheckBoxPreference android:key=pref1
                          android:title=pref1
                          android:summaryOn=SummaryOn
                          android:summaryOff=SummaryOff
                          android:defaultValue=true
                          android:persistent=true/

  Forpreferencescreated programatically, you can use
  Preference.setPersistent(true);

  If no Settings screen is present, and everything is through your
  program, then batchSharedPreferences.Editor.commit()'s should be
  fine.

  I had a similar problem as yours, but have not faced it again so 
  far.
  Other than the known issue mentioned in the previous post, I don't
  know what else the problem could be unless you post your code
  perhaps...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Disable XSL transforms in HTTPClient

2009-04-24 Thread Magnus

Am I really first with this problem? If anyone has a suggestion -
please share.
/M

On 21 Apr, 20:11, Magnus maneman...@gmail.com wrote:
 Does anyone know how to avoid the XSL transforming that is taking
 place in the HTTPClient? I just want the raw xml.

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

2009-04-24 Thread Mika

I can't use DefaultHttpClient because I need to get the OutputStream
for writing to the remote server. But anyway... I accidently got this
working, by calling the method that starts the thread (where all
HttpUrlConnection stuff is handled) from an Activity class. Before I
had it in a class that implements the onClickListener interface. But I
have no idea why it is working now correctly.

-Mika

On Apr 23, 9:39 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
 I had a similar issue and i gave up.
 Instead i used the DefaultHttpClient class together with HttpPut/
 HttpGet/HttpResponse classes.

 This works fine.

 On Apr 23, 5:50 am, Mika mika.ristim...@tkk.fi wrote:

  Hi all,

  I have a strange problem with HttpUrlConnection. I can send data (with
  POST), but the receiving succeeds only every second time or after a
  sufficiently long ( 5 min) pause between the sends. I basically start
  a new thread where the initialization of the HttpUrlConnection,
  writing/reading from output/input streams and closing the connection
  is done. If I don't close the input and the output streams the sending
  works correctly each time.

  Any suggestions where's the problem? The same problem was discussed in
  herehttp://groups.google.com/group/android-developers/browse_thread/threa...
  but no solution were found.

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



[android-developers] How to check screen is in IDLE or not?

2009-04-24 Thread jpopop

according to whether user is in IDLE screen, show different view to
user, how to do this?
how to check whether it is in IDLE(Home) screen or not. any api for
this?


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



[android-developers] Re: Why the service is always to restart even if force to kill it?

2009-04-24 Thread Eckel

No I do not write a apk and write the code on framework notification
view.

I just have a try the force stop functionality and it's a new
interface for activitymanger.restartPacakge, right?   If I try to
force stop a background service like inputmethod, acitivtymanger will
also restart the crash service and related process :(It's by
design?  So I still not force to remove a service.

On Apr 24, 12:46 am, Dianne Hackborn hack...@android.com wrote:
 On Wed, Apr 22, 2009 at 10:51 PM, Eckel zhangjin...@gmail.com wrote:
  You can get the running prcess info with process id from
  activitymanager, then kill it by Process.KillProcess(mPid).

 So wait...  you are saying you just wrote a regular application in an .apk,
 and you can do this?  You really shouldn't be able to do this.  I am almost
 positive you can't.  So I really want to confirm what you are actually
 doing.

  Could you have a simple introduction for how to use Force Stop?

 Er...  press the button?

  As Mike and you said, android will automatically manager the activity
  and service lifecyle and don't need task management by users. I often
  meet a case,  playback a music on background service and view a a lot
  picture on foreground,  which maybe will cause low memory, then
  android will kill the background music. You will not hear the music
  again, but if you check the music process, you will find the music
  service restart and service is still alive and still occupy system
  resource. So for this case, I think service should not be restart.
  What's your opinion?

 It's basically working as intended.  If you really care about this, in
 cupcake you can go in to manage applications, see the list of applications
 with running processes, and force stop that one.

 --
 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] Layout bugs

2009-04-24 Thread Al Sutton

Having read
http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.htm
l I noted this little section;

Due to changes in the View rendering infrastructure, unreasonably deep
(more than 10 or so) or broad (more than 30 total) View hierarchies in
layouts are now likely to cause crashes. This was always a risk for
excessively complex layouts, but you can think of Android 1.5 as being
better than 1.1 at exposing this problem...

Will the SDK warn us when we're reaching the limit for crashes?

And more to the point why does it crash and not return some form of
meaningful error to the app? With an error code or thrown exception
developers could create various levels of layout complexity and step down
the layout complexity level until they find one the device will support.

Al.

P.S. No matter what the post says I see this as a regression in
functionality and I definitely do not see it as Android 1.5 as being better
than 1.1 in any way.

---

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

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

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



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



[android-developers] Re: URGENT!!!!! Can't update apps in android market!!!

2009-04-24 Thread Yan Shi

Anyone please?

On Apr 24, 2:16 pm, Yan Shi shiyansu...@gmail.com wrote:
 When I upload an apk update for one of my apps(Hello Yahoo), I was
 told that Market requires the minSdkVersion to be set in
 AndroidManifest.xml.. So I can't do the update!

 I already set this attribute in AndroidManifest.xml. What's wrong??

 I even set it to uses-sdk minSdkVersion=3 /, but still I can't do
 the update.

 Has anyone met this problem?

 BTW, when I go tohttp://market.android.com/publish/Hometoday, I have
 accepted Term and Service again. I think already accepted it the first
 time I registered for it. Why should I accept it again?

 Could any google stuff look into this please?

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



[android-developers] Re: Why the service is always to restart even if force to kill it?

2009-04-24 Thread Dianne Hackborn
Yes, if you force stop the input method, it is restarted, because it is
actually being used and needed by the system to let the user perform input!
It makes no sense to try stop it from running.

Seriously, what are you trying to accomplish?

On Fri, Apr 24, 2009 at 12:42 AM, Eckel zhangjin...@gmail.com wrote:


 No I do not write a apk and write the code on framework notification
 view.

 I just have a try the force stop functionality and it's a new
 interface for activitymanger.restartPacakge, right?   If I try to
 force stop a background service like inputmethod, acitivtymanger will
 also restart the crash service and related process :(It's by
 design?  So I still not force to remove a service.

 On Apr 24, 12:46 am, Dianne Hackborn hack...@android.com wrote:
  On Wed, Apr 22, 2009 at 10:51 PM, Eckel zhangjin...@gmail.com wrote:
   You can get the running prcess info with process id from
   activitymanager, then kill it by Process.KillProcess(mPid).
 
  So wait...  you are saying you just wrote a regular application in an
 .apk,
  and you can do this?  You really shouldn't be able to do this.  I am
 almost
  positive you can't.  So I really want to confirm what you are actually
  doing.
 
   Could you have a simple introduction for how to use Force Stop?
 
  Er...  press the button?
 
   As Mike and you said, android will automatically manager the activity
   and service lifecyle and don't need task management by users. I often
   meet a case,  playback a music on background service and view a a lot
   picture on foreground,  which maybe will cause low memory, then
   android will kill the background music. You will not hear the music
   again, but if you check the music process, you will find the music
   service restart and service is still alive and still occupy system
   resource. So for this case, I think service should not be restart.
   What's your opinion?
 
  It's basically working as intended.  If you really care about this, in
  cupcake you can go in to manage applications, see the list of
 applications
  with running processes, and force stop that one.
 
  --
  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.
 



-- 
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: SharedPreferences got deleted! - What could be the problem?

2009-04-24 Thread Dianne Hackborn
You really really should commit the data after you make each batch of
changes, as the docs say.  It is certainly very possible for the system to
kill your process between onPause() and onStop() if it is under memory
pressure.

On Thu, Apr 23, 2009 at 9:56 AM, bo bost...@gmail.com wrote:


 I do SharedPreferences.Editor.commit() in couple of places. 1.
 Immediately after setting the preference. 2. in Activity#onStop.
 Nevertheless when I restart the app the preferences are gone. Any more
 ideas? I do create prefs programmaticaly after harvesting these from
 user (username/pwd)

 On Apr 21, 11:00 pm, Chander Pechetty cspeche...@gmail.com wrote:
  Sorry, I was referring to the settings created using
  PreferenceActivity screen using xml. Your actual preference values do
  not help much in diagnosing the issue.
 
  Example snippet from loadingpreferencesfrom xml:
  CheckBoxPreference android:key=pref1
  android:title=pref1
  android:summaryOn=SummaryOn
  android:summaryOff=SummaryOff
  android:defaultValue=true
  android:persistent=true/
 
  Forpreferencescreated programatically, you can use
  Preference.setPersistent(true);
 
  If no Settings screen is present, and everything is through your
  program, then batch SharedPreferences.Editor.commit()'s should be
  fine.
 
  I had a similar problem as yours, but have not faced it again so far.
  Other than the known issue mentioned in the previous post, I don't
  know what else the problem could be unless you post your code
  perhaps...
 



-- 
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: Layout bugs

2009-04-24 Thread Dianne Hackborn
We didn't  have time for Cupcake, but we definitely want to have some very
well-defined limits in a future release.  There is no nice error because
what actually is happening is the app is running out of stack space -- some
optimizations and new features in the view hierarchy caused certain
functions to use a little more stack, which can result in apps that were
skirting the edge of the stack to go over the limit.

We apologize, and definitely aren't happy about this; we had some some
additional optimization of the code to reduce stack usage at the very last
minute but found a little later that it still wasn't enough.

Anyway, if this makes cupcake not a good as 1.1 to you, well okay, I guess
don't run cupcake or something.

(Btw, in practice, an application with a deep hierarchy like this is also
going to have noticeable performance issues because of the work required to
manage it, so this can be considered a nice opportunity to do a bit of good
optimization.)

On Fri, Apr 24, 2009 at 12:52 AM, Al Sutton a...@funkyandroid.com wrote:


 Having read

 http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.htm
 l I noted this little section;

 Due to changes in the View rendering infrastructure, unreasonably deep
 (more than 10 or so) or broad (more than 30 total) View hierarchies in
 layouts are now likely to cause crashes. This was always a risk for
 excessively complex layouts, but you can think of Android 1.5 as being
 better than 1.1 at exposing this problem...

 Will the SDK warn us when we're reaching the limit for crashes?

 And more to the point why does it crash and not return some form of
 meaningful error to the app? With an error code or thrown exception
 developers could create various levels of layout complexity and step down
 the layout complexity level until they find one the device will support.

 Al.

 P.S. No matter what the post says I see this as a regression in
 functionality and I definitely do not see it as Android 1.5 as being
 better
 than 1.1 in any way.

 ---

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

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

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



 



-- 
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: SDK1.5 AudioRecord sample rate problem

2009-04-24 Thread Steven_T

you can try this code:

private static final int AUDIO_SAMPLE_FREQ = 8000;
private static final int AUDIO_BUFFER_SIZE = 20;
private AudioRecord recorder;
 try
 {
 // init recorder
 recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
 AUDIO_SAMPLE_FREQ,
 AudioFormat.CHANNEL_CONFIGURATION_MONO,
 AudioFormat.ENCODING_PCM_16BIT,
 AUDIO_BUFFER_SIZE);
 }
 catch (IllegalArgumentException e)
 {
e.printStackTrace();
 }


On Apr 24, 3:32 am, szabolcs szabolcs.vr...@gmail.com wrote:
 I was trying to record sound using the MIC with the AudioRecord class:

 mRecord = new AudioRecord(
                         MediaRecorder.AudioSource.MIC,
                         SAMPLE_RATE,
                         AudioFormat.CHANNEL_CONFIGURATION_DEFAULT,
                         AudioFormat.ENCODING_DEFAULT,
                         BUFFERSIZE
                         );

 This call results in:

 ERROR/AudioRecord(1120): Recording parameters are not supported:
 sampleRate 11025, channelCount 1, format 1
 ERROR/AudioRecord-JNI(1120): Error creating AudioRecord instance:
 initialization check failed.
 ERROR/AudioRecord-Java(1120): [ android.media.AudioRecord ] Error code
 -20 when initializing native AudioRecord object.

 whenever the SAMPLE_RATE is some value other than
 AudioRecord::DEFAULT_SAMPLE_RATE (8000) declared in ./frameworks/base/
 include/media/AudioRecord.h from GIT.
 The documentation says 11025/22050/44100 should be ok too.

 Am I missing something?

 Thank you for your help,

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



[android-developers] What is the correct way to refresh UI when I use android:configChanges=keyboardHidden|orientation

2009-04-24 Thread Wang He

Hi all

when I use android:configChanges=keyboardHidden|orientation in my
code, the activity will not destroy and recreate when I change from
portrait to landscape, only onConfigurationChanged(newConfig) will be
called by framework.

The issue is:
My UI cannot refresh by default, what is the correct way in
onConfigurationChanged() to refresh my UI?

BTW, my UI is write with mylayout.xml and added to my Widget by addView
(inflator(mylayout.xml),null).

Thanks in advance!!
BRs
Wang He

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: URGENT!!!!! Can't update apps in android market!!!

2009-04-24 Thread s...@zooropa.com

I'm having the same problem when I try to upload a new app to the
market. Any help would be great.

On Apr 24, 4:15 am, Yan Shi shiyansu...@gmail.com wrote:
 Anyone please?

 On Apr 24, 2:16 pm, Yan Shi shiyansu...@gmail.com wrote:



  When I upload an apk update for one of my apps(Hello Yahoo), I was
  told that Market requires the minSdkVersion to be set in
  AndroidManifest.xml.. So I can't do the update!

  I already set this attribute in AndroidManifest.xml. What's wrong??

  I even set it to uses-sdk minSdkVersion=3 /, but still I can't do
  the update.

  Has anyone met this problem?

  BTW, when I go tohttp://market.android.com/publish/Hometoday, I have
  accepted Term and Service again. I think already accepted it the first
  time I registered for it. Why should I accept it again?

  Could any google stuff look into this please?

  Thanks very much
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SharedPreferences got deleted! - What could be the problem?

2009-04-24 Thread scanning_it

Thank you Dianne for joining the discussion.

I will look into my code again but I'm sure that this is the only way
I am writting to the SharedPreferences:

settings.edit().putString(SOME_STRING, Hello world.).commit();

So there shouldn't be a problem with that one.

Is it possible that SharedPreferences could get lost when a background
services writes to the SharedPreferences file and gets killed during
that process? In my background service I am updating e.g. some shared
prefs that tell me if I have set a specific notification or not.

Could this usage in services be a problem?

In addition it would be interesting why a lot of users are complaining
that their settings got lost after updating my application? I have
never had that problem testing my own app. But a lot of my users are
reporting that. (My application has 97.000 active installs and is
called Missed Call)

I'm looking forward reading your response.

On Apr 24, 10:17 am, Dianne Hackborn hack...@android.com wrote:
 You really really should commit the data after you make each batch of
 changes, as the docs say.  It is certainly very possible for the system to
 kill your process between onPause() and onStop() if it is under memory
 pressure.



 On Thu, Apr 23, 2009 at 9:56 AM, bo bost...@gmail.com wrote:

  I do SharedPreferences.Editor.commit() in couple of places. 1.
  Immediately after setting the preference. 2. in Activity#onStop.
  Nevertheless when I restart the app the preferences are gone. Any more
  ideas? I do create prefs programmaticaly after harvesting these from
  user (username/pwd)

  On Apr 21, 11:00 pm, Chander Pechetty cspeche...@gmail.com wrote:
   Sorry, I was referring to the settings created using
   PreferenceActivity screen using xml. Your actual preference values do
   not help much in diagnosing the issue.

   Example snippet from loadingpreferencesfrom xml:
                       CheckBoxPreference android:key=pref1
                           android:title=pref1
                           android:summaryOn=SummaryOn
                           android:summaryOff=SummaryOff
                           android:defaultValue=true
                           android:persistent=true/

   Forpreferencescreated programatically, you can use
   Preference.setPersistent(true);

   If no Settings screen is present, and everything is through your
   program, then batch SharedPreferences.Editor.commit()'s should be
   fine.

   I had a similar problem as yours, but have not faced it again so far.
   Other than the known issue mentioned in the previous post, I don't
   know what else the problem could be unless you post your code
   perhaps...

 --
 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: Layout bugs

2009-04-24 Thread Al Sutton
Dianne,
 
Thanks for the explanation, it does leave me concerned that we're yet again
seeing an android version rushed out the door and as a result of this we're
now being told of problems even before consumers have it on their devices.
 
Not upgrading to cupcake isn't an realistic option. The average consumer is
going to do the update and therefore to serve them effectively and test
applications properly I'll have to do the upgrade as well.
 
Al.

---

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

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

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



 

  _  

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Dianne Hackborn
Sent: 24 April 2009 09:23
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Layout bugs


We didn't  have time for Cupcake, but we definitely want to have some very
well-defined limits in a future release.  There is no nice error because
what actually is happening is the app is running out of stack space -- some
optimizations and new features in the view hierarchy caused certain
functions to use a little more stack, which can result in apps that were
skirting the edge of the stack to go over the limit.

We apologize, and definitely aren't happy about this; we had some some
additional optimization of the code to reduce stack usage at the very last
minute but found a little later that it still wasn't enough.

Anyway, if this makes cupcake not a good as 1.1 to you, well okay, I guess
don't run cupcake or something.

(Btw, in practice, an application with a deep hierarchy like this is also
going to have noticeable performance issues because of the work required to
manage it, so this can be considered a nice opportunity to do a bit of good
optimization.)


On Fri, Apr 24, 2009 at 12:52 AM, Al Sutton a...@funkyandroid.com wrote:



Having read
http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.htm
l I noted this little section;

Due to changes in the View rendering infrastructure, unreasonably deep
(more than 10 or so) or broad (more than 30 total) View hierarchies in
layouts are now likely to cause crashes. This was always a risk for
excessively complex layouts, but you can think of Android 1.5 as being
better than 1.1 at exposing this problem...

Will the SDK warn us when we're reaching the limit for crashes?

And more to the point why does it crash and not return some form of
meaningful error to the app? With an error code or thrown exception
developers could create various levels of layout complexity and step down
the layout complexity level until they find one the device will support.

Al.

P.S. No matter what the post says I see this as a regression in
functionality and I definitely do not see it as Android 1.5 as being better
than 1.1 in any way.

---

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

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

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









-- 
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: URGENT!!!!! Can't update apps in android market!!!

2009-04-24 Thread Al Sutton

There's little the people on this list can do to help you with the inner
workings of Market. Your best option would be to try and contact Google.

Al. 


---

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

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

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


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Yan Shi
Sent: 24 April 2009 09:15
To: Android Developers
Subject: [android-developers] Re: URGENT! Can't update apps in android
market!!!


Anyone please?

On Apr 24, 2:16 pm, Yan Shi shiyansu...@gmail.com wrote:
 When I upload an apk update for one of my apps(Hello Yahoo), I was 
 told that Market requires the minSdkVersion to be set in 
 AndroidManifest.xml.. So I can't do the update!

 I already set this attribute in AndroidManifest.xml. What's wrong??

 I even set it to uses-sdk minSdkVersion=3 /, but still I can't do 
 the update.

 Has anyone met this problem?

 BTW, when I go tohttp://market.android.com/publish/Hometoday, I have 
 accepted Term and Service again. I think already accepted it the first 
 time I registered for it. Why should I accept it again?

 Could any google stuff look into this please?

 Thanks very much



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



[android-developers] IPv6 problemes inside the emulator?!

2009-04-24 Thread sumdroid

hi,

did someone know that problemes exist with the emulator and ipv6? my
networkcard got a ipv4 and a ipv6 adress (DNS, DHCP, Gateway etc.).
when i start the emulator and try to browse g-maps nothing happens.
only an error occured google.com can not be resoved.

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



[android-developers] Re: SDK1.5 AudioRecord sample rate problem

2009-04-24 Thread szabolcs

Steven,

Thank you for your reply.

I know AudioRecord works with a sample frequency of 8000Hz. In my
initial post I was asking why this frequency is the ONLY frequency
that works?!

BTW, there is no exception thrown when the initialization of
AudioRecord fails. I figured you are supposed to check that yourself
by something like:
if(mRecord.getState()==AudioRecord.STATE_INITIALIZED), not a try-catch
block.

So again: the question is, why does the initialization fail, if I
supply the constructor with AUDIO_SAMPLE_FREQ= 11025 || 22050 ||
44100?

Thank you,

-Szabolcs

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

2009-04-24 Thread WindWaker

Any help??

On Apr 23, 3:05 pm, WindWaker cyank...@gmail.com wrote:
 Hi guys i am having a problem disabling a particular listadapter's
 item depending on a certain condition.
  I have overriden
 public boolean isEnabled(int position) {

                     return true;

                 }
 and
  public boolean isEnabled(int position) {

                     return !mStrings[position].startsWith(Eclipse);

                 }
 This is getting disabled fine but i want to toggle it to enable -
 disable based on a certain condition. Presently it is permanently
 Disabled.Any help ? thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Toggle Listadapter Item

2009-04-24 Thread WindWaker

Any help??

On Apr 23, 3:05 pm, WindWaker cyank...@gmail.com wrote:
 Hi guys i am having a problem disabling a particular listadapter's
 item depending on a certain condition.
  I have overriden
 public boolean isEnabled(int position) {

                     return true;

                 }
 and
  public boolean isEnabled(int position) {

                     return !mStrings[position].startsWith(Eclipse);

                 }
 This is getting disabled fine but i want to toggle it to enable -
 disable based on a certain condition. Presently it is permanently
 Disabled.Any help ? thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Toggle Listadapter Item

2009-04-24 Thread Mark Murphy

WindWaker wrote:
 Any help??

isEnabled() is designed for use with category headers (as seen in the
preferences UI) and, as such, may not work well for your case.

Some options:

1. Try requestLayout() or something to see if that will trigger
isEnabled() to be requeried.

2. Call setEnabled() on the actual row you want to enable or disable,
and hope the ListView row-selection logic honors your request.

3. Call setListAdapter() again on your ListView, though this will
probably reset your selected row as well.

4. Find some other UI pattern to achieve your ends that does not involve
trying to dynamically enable/disable list entries.

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

Android App Developer Training: http://commonsware.com/training.html

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



[android-developers] What is field type in db table for audio and image?

2009-04-24 Thread jj

What is field type in db  table  for audio and image?

here is code from Media provider, in that it is 'data' type is text,
same is for image table its data type too text.

  so what is data type for images, audio or video for database table.
will you clear me for the this stuff.
   In one tut I saw he stored the file as it is with field name file,
is this perfect way?

 // Contains meta data about audio files
db.execSQL(CREATE TABLE IF NOT EXISTS audio_meta ( +
   _id INTEGER PRIMARY KEY, +
   _data TEXT NOT NULL, +
   _display_name TEXT, +
   _size INTEGER, +
   mime_type TEXT, +
   date_added INTEGER, +
   date_modified INTEGER, +
   title TEXT NOT NULL, +
   title_key TEXT NOT NULL, +
   duration INTEGER, +
   artist_id INTEGER, +
   composer TEXT, +
   album_id INTEGER, +
   track INTEGER, +// track is an integer to
allow proper sorting
   year INTEGER CHECK(year!=0), +
   is_ringtone INTEGER, +
   is_music INTEGER, +
   is_alarm INTEGER, +
   is_notification INTEGER +
   ););

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

2009-04-24 Thread e-satis

Hello,

I manage to find this post right after trying to solve something like
this :

http://groups.google.com/group/android-developers/browse_thread/thread/f3fdd1eb1726/0d28c51a6b9ffdfe?lnk=gstq=tab+focus#0d28c51a6b9ffdfe

Apparently, tabs seems to still the focus of TextView that are not
part of them.

Any idea of a workaround ? For the moment I just can think of
overriding mTabKeyListener, but it's probably private...

On Mar 6, 4:45 am, Dianne Hackborn hack...@android.com wrote:
 I don't believe the tab host is doing anything special for this, it is just
 letting the normal focus navigation take place.



 On Thu, Mar 5, 2009 at 4:00 PM, ying lcs ying...@gmail.com wrote:

  Thank you Dianne.

  I have another related question. I appreciate if you can help me with that.

  Let's say the a button in a tab content currently has focus.  When I
  click the UP button, the tab-widget has the focus.
  My question is how can the Tabhost knows that The tab-content reaches
  the end of its focusable control and decide to give tab-widget the
  focus?

  Thank you.

  On Thu, Mar 5, 2009 at 12:06 PM, Dianne Hackborn hack...@android.com
  wrote:
   The comment says is re-directs non-navigation keys to the content.  It
  isn't
   intercepting the other keys, it is ignoring them (returning false).

   On Thu, Mar 5, 2009 at 11:42 AM, ying lcs ying...@gmail.com wrote:

   Hi,

   I am trying to understand TabHost source code. In the setup() , it has:

    // KeyListener to attach to all tabs. Detects non-navigation keys
          // and relays them to the tab content.
          mTabKeyListener = new OnKeyListener() {
              public boolean onKey(View v, int keyCode, KeyEvent event) {
                  switch (keyCode) {
                      case KeyEvent.KEYCODE_DPAD_CENTER:
                      case KeyEvent.KEYCODE_DPAD_LEFT:
                      case KeyEvent.KEYCODE_DPAD_RIGHT:
                      case KeyEvent.KEYCODE_DPAD_UP:
                      case KeyEvent.KEYCODE_DPAD_DOWN:
                      case KeyEvent.KEYCODE_ENTER:
                          return false;

                  }
                  mTabContent.requestFocus(View.FOCUS_FORWARD);
                  return mTabContent.dispatchKeyEvent(event);
              }

          };

   My question is why it intersects all LEFT/RIGHT/UP/DOWN key event? If
   that is the case, can i still use LEFT/RIGHT/UP/DOWN to navigate
   within the TabContent (let say I have a row of buttons in the
   TabContent. Can I use LEFT/RIGHT/UP/DOWN to move from 1 button to
   another in the TabContent)?

   Thank you.

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

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

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

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



[android-developers] Re: Disable XSL transforms in HTTPClient

2009-04-24 Thread Mark Murphy

Magnus wrote:
 Am I really first with this problem? If anyone has a suggestion -
 please share.
 /M
 
 On 21 Apr, 20:11, Magnus maneman...@gmail.com wrote:
 Does anyone know how to avoid the XSL transforming that is taking
 place in the HTTPClient? I just want the raw xml.

That would be a fine question to ask the people responsible for HttpClient:

http://hc.apache.org

It looks like somebody asked them last October but got no response.

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

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

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



[android-developers] Re: Where are packages?

2009-04-24 Thread Mark Murphy

AlexNguyen wrote:
 I have see some apps in Android that use some packages:
 
 import android.net.http.EventHandler;
 import android.net.http.Headers;
 import android.net.http.RequestQueue;
 ..
 
 So some packages do not support the current version of SDK. Where can
 I find it? Would u tell me about it?

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/java/android/net/http;h=44d583ebb3d35bd84f1e75c64bcb15d52fee0736;hb=HEAD

(or http://bit.ly/19dhvx if that URL is too long)

They are in the source code, but are not part of the SDK official API,
at least as of 1.1r1.

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

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

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



[android-developers] Re: Layout bugs

2009-04-24 Thread Romain Guy

Cupcake is not rushed in any way and every change we made was made
after careful consideration. The problem that Dan warns about should
not affect the vast majority of apps. In my experience, to trigger it,
you need to have a hierarchy of views that's about 14 levels deep. And
even in 1.0 and 1.1, such a deep hierarchy could blow up depending on
the code path taken or how the app is using the views. And for what
it's worth I DID made some changes to avoid this problem to occur in
some existing Market applications. The fix goes against optimizing
the framework but we gave priority to backward compatibility with
existing apps.

As Dianne said, applications that have enough views to trigger that
crash would run into other issues anyway and we feel it's a good way
to force developers who run into these issues to fix their
applications. Inflating, laying out and drawing that many Views is
just too slow.

On Fri, Apr 24, 2009 at 3:15 AM, Al Sutton a...@funkyandroid.com wrote:
 Dianne,

 Thanks for the explanation, it does leave me concerned that we're yet again
 seeing an android version rushed out the door and as a result of this we're
 now being told of problems even before consumers have it on their devices.

 Not upgrading to cupcake isn't an realistic option. The average consumer is
 going to do the update and therefore to serve them effectively and test
 applications properly I'll have to do the upgrade as well.

 Al.

 ---

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

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

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


 
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Dianne Hackborn
 Sent: 24 April 2009 09:23
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Layout bugs

 We didn't  have time for Cupcake, but we definitely want to have some very
 well-defined limits in a future release.  There is no nice error because
 what actually is happening is the app is running out of stack space -- some
 optimizations and new features in the view hierarchy caused certain
 functions to use a little more stack, which can result in apps that were
 skirting the edge of the stack to go over the limit.

 We apologize, and definitely aren't happy about this; we had some some
 additional optimization of the code to reduce stack usage at the very last
 minute but found a little later that it still wasn't enough.

 Anyway, if this makes cupcake not a good as 1.1 to you, well okay, I guess
 don't run cupcake or something.

 (Btw, in practice, an application with a deep hierarchy like this is also
 going to have noticeable performance issues because of the work required to
 manage it, so this can be considered a nice opportunity to do a bit of good
 optimization.)

 On Fri, Apr 24, 2009 at 12:52 AM, Al Sutton a...@funkyandroid.com wrote:

 Having read

 http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.htm
 l I noted this little section;

 Due to changes in the View rendering infrastructure, unreasonably deep
 (more than 10 or so) or broad (more than 30 total) View hierarchies in
 layouts are now likely to cause crashes. This was always a risk for
 excessively complex layouts, but you can think of Android 1.5 as being
 better than 1.1 at exposing this problem...

 Will the SDK warn us when we're reaching the limit for crashes?

 And more to the point why does it crash and not return some form of
 meaningful error to the app? With an error code or thrown exception
 developers could create various levels of layout complexity and step down
 the layout complexity level until they find one the device will support.

 Al.

 P.S. No matter what the post says I see this as a regression in
 functionality and I definitely do not see it as Android 1.5 as being
 better
 than 1.1 in any way.

 ---

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

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

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







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

 




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

Note: please don't send 

[android-developers] Re: Layout bugs

2009-04-24 Thread jarkman

I'm not sure it's realistic to describe this as a simple optimisation
issue.

We've just gone through an exercise to fix these crashes in one of our
apps. We've managed it, but only at the expense of uglification of the
code.

We're working with a custom list on a tab. Looking at the hierarchy
viewer, we are 12 deep in the tree by the time we get to our ListView.
We now have three levels under that - a RelativeLayout for our list
item, various simple views, and one custom control with a child view.

That just fits, and doesn't crash in 1.5. Previously, we laid out the
list item with a 2-deep tree of linear layouts, which was a lot more
convenient in our code.

As far as I can see, if we had built any more custom controls or used
a more complex layout, we'd be quite knackered at this point, which
makes this restriction seem like a real step backwards.

Richard


On Apr 24, 9:23 am, Dianne Hackborn hack...@android.com wrote:
 We didn't  have time for Cupcake, but we definitely want to have some very
 well-defined limits in a future release.  There is no nice error because
 what actually is happening is the app is running out of stack space -- some
 optimizations and new features in the view hierarchy caused certain
 functions to use a little more stack, which can result in apps that were
 skirting the edge of the stack to go over the limit.

 We apologize, and definitely aren't happy about this; we had some some
 additional optimization of the code to reduce stack usage at the very last
 minute but found a little later that it still wasn't enough.

 Anyway, if this makes cupcake not a good as 1.1 to you, well okay, I guess
 don't run cupcake or something.

 (Btw, in practice, an application with a deep hierarchy like this is also
 going to have noticeable performance issues because of the work required to
 manage it, so this can be considered a nice opportunity to do a bit of good
 optimization.)



 On Fri, Apr 24, 2009 at 12:52 AM, Al Sutton a...@funkyandroid.com wrote:

  Having read

 http://android-developers.blogspot.com/2009/04/future-proofing-your-a...
  l I noted this little section;

  Due to changes in the View rendering infrastructure, unreasonably deep
  (more than 10 or so) or broad (more than 30 total) View hierarchies in
  layouts are now likely to cause crashes. This was always a risk for
  excessively complex layouts, but you can think of Android 1.5 as being
  better than 1.1 at exposing this problem...

  Will the SDK warn us when we're reaching the limit for crashes?

  And more to the point why does it crash and not return some form of
  meaningful error to the app? With an error code or thrown exception
  developers could create various levels of layout complexity and step down
  the layout complexity level until they find one the device will support.

  Al.

  P.S. No matter what the post says I see this as a regression in
  functionality and I definitely do not see it as Android 1.5 as being
  better
  than 1.1 in any way.

  ---

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

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

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

 --
 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: Layout bugs

2009-04-24 Thread Romain Guy

A custom control has nothing to do with this kind of issue. Actually,
custom controls are a good way to avoid that issue, and optimize
layouts in general. Around 15 levels deep of layouts is just insanely
complex for a cell phone screen.

On Fri, Apr 24, 2009 at 5:08 AM, jarkman jark...@gmail.com wrote:

 I'm not sure it's realistic to describe this as a simple optimisation
 issue.

 We've just gone through an exercise to fix these crashes in one of our
 apps. We've managed it, but only at the expense of uglification of the
 code.

 We're working with a custom list on a tab. Looking at the hierarchy
 viewer, we are 12 deep in the tree by the time we get to our ListView.
 We now have three levels under that - a RelativeLayout for our list
 item, various simple views, and one custom control with a child view.

 That just fits, and doesn't crash in 1.5. Previously, we laid out the
 list item with a 2-deep tree of linear layouts, which was a lot more
 convenient in our code.

 As far as I can see, if we had built any more custom controls or used
 a more complex layout, we'd be quite knackered at this point, which
 makes this restriction seem like a real step backwards.

 Richard


 On Apr 24, 9:23 am, Dianne Hackborn hack...@android.com wrote:
 We didn't  have time for Cupcake, but we definitely want to have some very
 well-defined limits in a future release.  There is no nice error because
 what actually is happening is the app is running out of stack space -- some
 optimizations and new features in the view hierarchy caused certain
 functions to use a little more stack, which can result in apps that were
 skirting the edge of the stack to go over the limit.

 We apologize, and definitely aren't happy about this; we had some some
 additional optimization of the code to reduce stack usage at the very last
 minute but found a little later that it still wasn't enough.

 Anyway, if this makes cupcake not a good as 1.1 to you, well okay, I guess
 don't run cupcake or something.

 (Btw, in practice, an application with a deep hierarchy like this is also
 going to have noticeable performance issues because of the work required to
 manage it, so this can be considered a nice opportunity to do a bit of good
 optimization.)



 On Fri, Apr 24, 2009 at 12:52 AM, Al Sutton a...@funkyandroid.com wrote:

  Having read

 http://android-developers.blogspot.com/2009/04/future-proofing-your-a...
  l I noted this little section;

  Due to changes in the View rendering infrastructure, unreasonably deep
  (more than 10 or so) or broad (more than 30 total) View hierarchies in
  layouts are now likely to cause crashes. This was always a risk for
  excessively complex layouts, but you can think of Android 1.5 as being
  better than 1.1 at exposing this problem...

  Will the SDK warn us when we're reaching the limit for crashes?

  And more to the point why does it crash and not return some form of
  meaningful error to the app? With an error code or thrown exception
  developers could create various levels of layout complexity and step down
  the layout complexity level until they find one the device will support.

  Al.

  P.S. No matter what the post says I see this as a regression in
  functionality and I definitely do not see it as Android 1.5 as being
  better
  than 1.1 in any way.

  ---

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

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

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

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




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

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

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



[android-developers] Re: AppWidgetProvider question on 1.5 SDK

2009-04-24 Thread Romain Guy

And it takes forever to layout and draw a WebView. That's why widgets
are not implemented in HTML for instance: Home would become unusable.

On Wed, Apr 22, 2009 at 4:26 PM, Dianne Hackborn hack...@android.com wrote:
 Yes, there is a security issue.  And a performance issue.  We are flat-out
 not allowing web views in remote views because:

 1. The browser is the #1 attack vector; it is a huge complicated pieces of
 native code that people continually find vulnerabilities in.
 2. The browser also consumes a huge amount of memory.  Running the browser
 in the home app could easily consume 10MB or more of memory that can't be
 reclaimed while other apps are running.

 On Wed, Apr 22, 2009 at 12:53 PM, j jac...@gmail.com wrote:

 Jeff,

 Thanks for the reply.

 But is there any security implications of allowing a WebView as a
 RemoteViews in a widget?  Webkit browser is running as a sandbox with
 a security model in place so I can't think of potential security
 issues by allowing a WebView in a widget.



 On Apr 21, 11:45 pm, Jeff Sharkey jshar...@android.com wrote:
  There is a list of pre-approved Views that are allowed through
  RemoteViews, mostly for security reasons, and right now WebView isn't
  one of those.
 
  If push updates are really important, you could write the comet code
  in a Service that pushes widget updates to the surface as needed.  As
  long as you're not pushing any bitmaps, widget updates are pretty
  fast.
 
  However, if you're considering user interaction, you might launch a
  full-screen app or dialog.
 
  j
 
  On Tue, Apr 21, 2009 at 6:08 PM, j jac...@gmail.com wrote:
 
   Jeff,
 
   Thanks for the Wkionary sample code on the Android blog.
 
   I have a general question.  Is it possible to set the RemoteView of
   the widget to a WebView?  My goal is to push real time updates to the
   WebView via the comet technique (HTTP long polling), similar to how
   Google Talk does it on the desktop browser I suppose.
 
   Do you think battery life would be significantly impacted with this
   approach?
 
  --
  Jeff Sharkey
  jshar...@google.com




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


 




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

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

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



[android-developers] optimization problem

2009-04-24 Thread Zhubham

Hi Experts,

I am trying to optimize the following code:

  textview[0]=(TextView)findViewById
(R.id.TextView1);
  textview[1]=(TextView)findViewById(R.id.TextView2);
  textview[2]=(TextView)findViewById(R.id.TextView3);
  textview[3]=(TextView)findViewById(R.id.TextView4);
  textview[4]=(TextView)findViewById(R.id.TextView5);
  textview[5]=(TextView)findViewById(R.id.TextView6);
  textview[6]=(TextView)findViewById(R.id.TextView7);
  textview[7]=(TextView)findViewById(R.id.TextView8);
  textview[8]=(TextView)findViewById(R.id.TextView9);
  textview[9]=(TextView)findViewById(R.id.TextView10);

using:

int j;
for(int i=0;i10;i++)
{
   j = i+1;
   textViewId = TextView+j;
   textview[i] = 
(TextView)findViewById(R.id.textViewId);//
error textViewId not recognized
}

but this is giving error at the last line.. Can you please help me to
come out of this.

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: EditText Tabhost problem

2009-04-24 Thread e-satis

Actually this is even stranger because when you use the arrow key from
the keyboard and get the focus to the textview from the tab view, it
does not take the focus back.

Here is the XML file :

?xml version=1.0 encoding=utf-8?

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical android:layout_width=fill_parent
android:layout_height=fill_parent

LinearLayout
  android:padding=5px
  android:orientation=vertical
  android:id=@+id/task_edit_panel
  android:layout_width=fill_parent
  android:layout_height=fill_parent
   android:layout_weight=50 

LinearLayout android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=wrap_content

TextView android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/title
android:textStyle=bold
 /

EditText android:id=@+id/title
  android:layout_width=fill_parent
android:layout_height=fill_parent /

/LinearLayout

TabHost android:id=@+id/edit_item_tab_host
android:layout_width=fill_parent
android:layout_height=fill_parent

TabWidget android:layout_width=fill_parent
android:layout_height=wrap_content
android:id=@android:id/tabs
/

FrameLayout
  android:id=@android:id/tabcontent
  android:layout_width=fill_parent
  android:layout_height=fill_parent
  android:paddingTop=65px !--  you need that if you
don't want the tab content to overflow --

  LinearLayout
   android:id=@+id/edit_item_date_tab
   android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
android:padding=5px 

TextView 
android:layout_width=wrap_content

android:layout_height=wrap_content

android:text=date
 
android:textStyle=bold /



/LinearLayout

LinearLayout
   android:id=@+id/edit_item_geocontext_tab
   android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
android:padding=5px 

TextView 
android:layout_width=wrap_content

android:layout_height=wrap_content

android:text=lieu
 
android:textStyle=bold /



/LinearLayout

LinearLayout
   android:id=@+id/edit_item_text_tab
   android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
 android:padding=5px


EditText 
android:id=@+id/details

android:layout_width=fill_parent

android:layout_height=fill_parent

android:scrollbars=vertical /

/LinearLayout

/FrameLayout

/TabHost

/LinearLayout

!-- Bottom pannel with add item button --

LinearLayout
  android:padding=5px
  android:orientation=horizontal
  android:layout_weight=1
  android:id=@+id/task_edit_panel
  android:layout_width=fill_parent
  android:layout_height=wrap_content
  android:background=#E7E7E7
  

  !--  Let the height set to fill_parent until we find a better
way for the layout  --


  Button 

[android-developers] Forecast widget for Android 1.5 (with source!)

2009-04-24 Thread Jeff Sharkey

I've been working with the AppWidget framework over the past few
months, and I wrote an in-depth example showing off all the various
features of the framework.  It's a forecast widget that shows the
weather in locations of your choice.  It offers multiple
configurations, and can handle several widgets at once.

http://www.jsharkey.org/blog/2009/04/24/forecast-widget-for-android-15-with-source/

And you can grab the source from Google Code under an Apache 2.0
license:

http://code.google.com/p/android-sky/source/browse/#svn/trunk/Sky

Feel free to ping me here if you have any questions about the code or
widgets in general.  :)

j


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



[android-developers] Re: optimization problem

2009-04-24 Thread Mark Murphy

Zhubham wrote:
 Hi Experts,
 
 I am trying to optimize the following code:
 
   textview[0]=(TextView)findViewById
 (R.id.TextView1);
 textview[1]=(TextView)findViewById(R.id.TextView2);
 textview[2]=(TextView)findViewById(R.id.TextView3);
 textview[3]=(TextView)findViewById(R.id.TextView4);
 textview[4]=(TextView)findViewById(R.id.TextView5);
 textview[5]=(TextView)findViewById(R.id.TextView6);
 textview[6]=(TextView)findViewById(R.id.TextView7);
 textview[7]=(TextView)findViewById(R.id.TextView8);
 textview[8]=(TextView)findViewById(R.id.TextView9);
 textview[9]=(TextView)findViewById(R.id.TextView10);
 
 using:
 
 int j;
 for(int i=0;i10;i++)
 {
j = i+1;
  textViewId = TextView+j;
  textview[i] = 
 (TextView)findViewById(R.id.textViewId);//
 error textViewId not recognized
 }
 
 but this is giving error at the last line.. Can you please help me to
 come out of this.

1. There is nothing named R.id.textViewId in your layout, in all likelihood.

2. Putting things in loops does not optimize the code, from an execution
speed standpoint.

3. You cannot dynamically construct the name of a widget ID in the
manner you are trying.

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

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: SDK 1.5 Build Error

2009-04-24 Thread Karima

I met this today.
I solved it :
In your project's folder the file .classpath is wrong. The good file
is :
?xml version=1.0 encoding=UTF-8?
classpath
classpathentry kind=src path=src/
classpathentry kind=src path=gen/
classpathentry kind=con
path=com.android.ide.eclipse.adt.ANDROID_FRAMEWORK/
classpathentry kind=output path=bin/
/classpath

On 15 avr, 19:05, Chris McCurdy christopher.mccu...@gmail.com wrote:
 I'm attempting to test one of my applications in the SDK1.5
 environment, but when it tries to build, I get this error:

 [2009-04-15 12:33:13 - Battle Bricks]
 trouble processing java/awt/font/NumericShaper.class:
 [2009-04-15 12:33:13 - Battle Bricks]
 Attempt to include a core VM class in something other than a core
 library.
 It is likely that you have attempted to include the core library from
 a desktop
 virtual machine into an application, which will most assuredly not
 work. If
 you really intend to build a core library -- which is only appropriate
 as
 part of creating a full virtual machine binary, as opposed to
 compiling an
 application -- then use the --core-library option to suppress this
 error
 message. If you go ahead and use --core-library but are in fact
 building
 an application, then please be aware that your build will still fail
 at some
 point; you will simply be denied the pleasure of reading this helpful
 error
 message.

 But I've tested my other application in the environment, and it worked
 fine. I've looked through my imports, and none of my files import
 NumericShaper, so I'm confused as to why it seems to think that it is
 being referenced.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ANT Build files sdk 1.5 and beyond

2009-04-24 Thread Fred Grott(shareme)

Good morning,

I am in the process of writing some new build files for Android Sdk
1.5 and beyond.

My question is every tool-IDE plugin the same in that they do not
contribute the ANT task libs to the IDE ant editor and thus have to
manually set the paths in each IDE?

At them moment i know ADT 0.90 pre is but I am assuming that will
change as we approach the ADT 0.90 final release.

Just trying to write the buid file so that I idiot proof some  issues.

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



[android-developers] Re: Layout bugs

2009-04-24 Thread Al Sutton

To me whenever someone on a project says We didn't have time for .
when discussing something that increases chances of an app crashing in *any*
way that indicates the project has been rushed along.

Personally I don't believe an OS should crash when a developer writes code
that doesn't fit in with OS design decisions. Error messages and exceptions
are the way to handle code that exhausts resources such as the stack,
crashing out doesn't give the app a chance to handle things gracefully or
give the developer much to work with in terms of finding the problem.

Given that the stack size can be changed on different platforms (or even
between compilations for the same target) by altering kDefaultStackSize in
vm/Thread.h in the davlik project in the repo, doesn't this introduce a
problem where an app which works on one platform may just crash out on
another  where the stack size is different?

Al.
---

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

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

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


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Romain Guy
Sent: 24 April 2009 13:06
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Layout bugs


Cupcake is not rushed in any way and every change we made was made after
careful consideration. The problem that Dan warns about should not affect
the vast majority of apps. In my experience, to trigger it, you need to have
a hierarchy of views that's about 14 levels deep. And even in 1.0 and 1.1,
such a deep hierarchy could blow up depending on the code path taken or how
the app is using the views. And for what it's worth I DID made some changes
to avoid this problem to occur in some existing Market applications. The
fix goes against optimizing the framework but we gave priority to backward
compatibility with existing apps.

As Dianne said, applications that have enough views to trigger that crash
would run into other issues anyway and we feel it's a good way to force
developers who run into these issues to fix their applications. Inflating,
laying out and drawing that many Views is just too slow.

On Fri, Apr 24, 2009 at 3:15 AM, Al Sutton a...@funkyandroid.com wrote:
 Dianne,

 Thanks for the explanation, it does leave me concerned that we're yet 
 again seeing an android version rushed out the door and as a result of 
 this we're now being told of problems even before consumers have it on
their devices.

 Not upgrading to cupcake isn't an realistic option. The average 
 consumer is going to do the update and therefore to serve them 
 effectively and test applications properly I'll have to do the upgrade as
well.

 Al.

 ---

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

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

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


 
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Dianne 
 Hackborn
 Sent: 24 April 2009 09:23
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Layout bugs

 We didn't  have time for Cupcake, but we definitely want to have some 
 very well-defined limits in a future release.  There is no nice error 
 because what actually is happening is the app is running out of stack 
 space -- some optimizations and new features in the view hierarchy 
 caused certain functions to use a little more stack, which can result 
 in apps that were skirting the edge of the stack to go over the limit.

 We apologize, and definitely aren't happy about this; we had some some 
 additional optimization of the code to reduce stack usage at the very 
 last minute but found a little later that it still wasn't enough.

 Anyway, if this makes cupcake not a good as 1.1 to you, well okay, I 
 guess don't run cupcake or something.

 (Btw, in practice, an application with a deep hierarchy like this is 
 also going to have noticeable performance issues because of the work 
 required to manage it, so this can be considered a nice opportunity to 
 do a bit of good
 optimization.)

 On Fri, Apr 24, 2009 at 12:52 AM, Al Sutton a...@funkyandroid.com wrote:

 Having read

 http://android-developers.blogspot.com/2009/04/future-proofing-your-a
 pps.htm
 l I noted this little section;

 Due to changes in the View rendering infrastructure, unreasonably 
 deep (more than 10 or 

[android-developers] Re: Layout bugs

2009-04-24 Thread Romain Guy

By crash here we mean that you get a StackOverflowException, just
like with any regular Java application. There is nothing special about
this.

 To me whenever someone on a project says We didn't have time for .
 when discussing something that increases chances of an app crashing in *any*
 way that indicates the project has been rushed along.

ANY code change that we do increases chances of an app crashing. (And
by crashing I mean altering its behavior or throwing an exception,
etc.) Like I said, all changes we make are carefully considered and
this one was NOT deemed critical. We are releasing a preview SDK *and*
articles to help you fix that kind of bug if you run into it but it
doesn't mean it is going to happen to your app or even any app.

Whatever you might think we take compatibility VERY seriously. We also
monitor Market applications closely to ensure we don't break them when
it's not justified (we caught many bugs we introduced during the
Cupcake development by looking at Market applications.)

 Personally I don't believe an OS should crash when a developer writes code
 that doesn't fit in with OS design decisions. Error messages and exceptions
 are the way to handle code that exhausts resources such as the stack,
 crashing out doesn't give the app a chance to handle things gracefully or
 give the developer much to work with in terms of finding the problem.

 Given that the stack size can be changed on different platforms (or even
 between compilations for the same target) by altering kDefaultStackSize in
 vm/Thread.h in the davlik project in the repo, doesn't this introduce a
 problem where an app which works on one platform may just crash out on
 another  where the stack size is different?

 Al.
 ---

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

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

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


 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Romain Guy
 Sent: 24 April 2009 13:06
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Layout bugs


 Cupcake is not rushed in any way and every change we made was made after
 careful consideration. The problem that Dan warns about should not affect
 the vast majority of apps. In my experience, to trigger it, you need to have
 a hierarchy of views that's about 14 levels deep. And even in 1.0 and 1.1,
 such a deep hierarchy could blow up depending on the code path taken or how
 the app is using the views. And for what it's worth I DID made some changes
 to avoid this problem to occur in some existing Market applications. The
 fix goes against optimizing the framework but we gave priority to backward
 compatibility with existing apps.

 As Dianne said, applications that have enough views to trigger that crash
 would run into other issues anyway and we feel it's a good way to force
 developers who run into these issues to fix their applications. Inflating,
 laying out and drawing that many Views is just too slow.

 On Fri, Apr 24, 2009 at 3:15 AM, Al Sutton a...@funkyandroid.com wrote:
 Dianne,

 Thanks for the explanation, it does leave me concerned that we're yet
 again seeing an android version rushed out the door and as a result of
 this we're now being told of problems even before consumers have it on
 their devices.

 Not upgrading to cupcake isn't an realistic option. The average
 consumer is going to do the update and therefore to serve them
 effectively and test applications properly I'll have to do the upgrade as
 well.

 Al.

 ---

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

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

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


 
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Dianne
 Hackborn
 Sent: 24 April 2009 09:23
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Layout bugs

 We didn't  have time for Cupcake, but we definitely want to have some
 very well-defined limits in a future release.  There is no nice error
 because what actually is happening is the app is running out of stack
 space -- some optimizations and new features in the view hierarchy
 caused certain functions to use a little more stack, which can result
 in apps that were skirting the edge of the stack to go over the limit.

 We apologize, and 

[android-developers] Re: optimization problem

2009-04-24 Thread MrSnowflake

If you really want to use a for loop (for maintenance point of view,
somewhat, as TextView1...10 aren't very clear) you need to use
reflection which is a lot of work for this and it's slow.
For your purpose you should consider creating your layout fully in
code.

On 24 apr, 14:30, Mark Murphy mmur...@commonsware.com wrote:
 Zhubham wrote:
  Hi Experts,

  I am trying to optimize the following code:

                            textview[0]=(TextView)findViewById
  (R.id.TextView1);
               textview[1]=(TextView)findViewById(R.id.TextView2);
               textview[2]=(TextView)findViewById(R.id.TextView3);
               textview[3]=(TextView)findViewById(R.id.TextView4);
               textview[4]=(TextView)findViewById(R.id.TextView5);
               textview[5]=(TextView)findViewById(R.id.TextView6);
               textview[6]=(TextView)findViewById(R.id.TextView7);
               textview[7]=(TextView)findViewById(R.id.TextView8);
               textview[8]=(TextView)findViewById(R.id.TextView9);
               textview[9]=(TextView)findViewById(R.id.TextView10);

  using:

  int j;
  for(int i=0;i10;i++)
  {
                                     j = i+1;
                        textViewId = TextView+j;
                        textview[i] = 
  (TextView)findViewById(R.id.textViewId);//
  error textViewId not recognized
  }

  but this is giving error at the last line.. Can you please help me to
  come out of this.

 1. There is nothing named R.id.textViewId in your layout, in all likelihood.

 2. Putting things in loops does not optimize the code, from an execution
 speed standpoint.

 3. You cannot dynamically construct the name of a widget ID in the
 manner you are trying.

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

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



[android-developers] Re: optimization problem

2009-04-24 Thread Romain Guy

You don't have to use reflection, you can use the package manager's
APIs to create ids from strings (and the other way around.)

On Fri, Apr 24, 2009 at 5:54 AM, MrSnowflake mrsnowfl...@gmail.com wrote:

 If you really want to use a for loop (for maintenance point of view,
 somewhat, as TextView1...10 aren't very clear) you need to use
 reflection which is a lot of work for this and it's slow.
 For your purpose you should consider creating your layout fully in
 code.

 On 24 apr, 14:30, Mark Murphy mmur...@commonsware.com wrote:
 Zhubham wrote:
  Hi Experts,

  I am trying to optimize the following code:

                            textview[0]=(TextView)findViewById
  (R.id.TextView1);
               textview[1]=(TextView)findViewById(R.id.TextView2);
               textview[2]=(TextView)findViewById(R.id.TextView3);
               textview[3]=(TextView)findViewById(R.id.TextView4);
               textview[4]=(TextView)findViewById(R.id.TextView5);
               textview[5]=(TextView)findViewById(R.id.TextView6);
               textview[6]=(TextView)findViewById(R.id.TextView7);
               textview[7]=(TextView)findViewById(R.id.TextView8);
               textview[8]=(TextView)findViewById(R.id.TextView9);
               textview[9]=(TextView)findViewById(R.id.TextView10);

  using:

  int j;
  for(int i=0;i10;i++)
  {
                                     j = i+1;
                        textViewId = TextView+j;
                        textview[i] = 
  (TextView)findViewById(R.id.textViewId);//
  error textViewId not recognized
  }

  but this is giving error at the last line.. Can you please help me to
  come out of this.

 1. There is nothing named R.id.textViewId in your layout, in all likelihood.

 2. Putting things in loops does not optimize the code, from an execution
 speed standpoint.

 3. You cannot dynamically construct the name of a widget ID in the
 manner you are trying.

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

 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
 




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

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

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



[android-developers] Re: What is the correct way to refresh UI when I use android:configChanges=keyboardHidden|orientation

2009-04-24 Thread MrSnowflake

Why do so much people avoid the destoying and recreation of Activities
on orientation change. It's there to make the switch to a different
orientation easier, because it automatically loads the correct
resources. To be honest, I don't fully understand the whole recreation
of Activities neither, as it would take a lot of time to recreate the
activity and loading (and saving the instance state too) the instance
state could take a long time too. But I bet those intelligent Google
people have good reasons, that's why I follow their idea.

I don't know how to refresh your UI. If you mean by refreshing:
loading the appropriate resources to get the correct layout for the
current orientation, then you need to destroy and recreate the
Activity. That's why the system does this by default!

You should save all current state specific information in
onSaveInstancestate() (or what is it called, I forgot, it's a couple
of weeks ago I did some Androiding :) ) and reload it in
onRestoreInstancestate(). And well, all this stuff is in the docs so
you can take a look there :).

On 24 apr, 10:53, Wang He iptvph...@gmail.com wrote:
 Hi all

 when I use android:configChanges=keyboardHidden|orientation in my
 code, the activity will not destroy and recreate when I change from
 portrait to landscape, only onConfigurationChanged(newConfig) will be
 called by framework.

 The issue is:
 My UI cannot refresh by default, what is the correct way in
 onConfigurationChanged() to refresh my UI?

 BTW, my UI is write with mylayout.xml and added to my Widget by addView
 (inflator(mylayout.xml),null).

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



[android-developers] Re: MediaPlayer sound problem

2009-04-24 Thread BlackLight

Thanks! I will try MediaPlayer.setLooping(true).
With longer sounds it works just fine. I have feeling that error
happens because of no sync. MediaPlayer playes and is going to stop,
at this moment seekTo makes freeze sound problem. (Just my guess)

On Apr 23, 7:18 pm, Marco Nelissen marc...@android.com wrote:
 Does it work with longer sounds?
 Have you tried using MediaPlayer.setLooping(true) instead of restarting it
 yourself from the OnCompletionListener callback?

 On Thu, Apr 23, 2009 at 12:00 AM, BlackLight blacklight1...@gmail.comwrote:



  Hello.

  I have this task:
  Need to play short (0.3-0.4 sec) sounds all the time. When sound is
  played, it should start again, etc. User can press button to reset
  sound - it should stop and lunch.

  I did many tests. I tried to create 1 MediaPlayer, then do this:
         MediaPlayer.OnCompletionListener complListener = new
  MediaPlayer.OnCompletionListener()
         {
                 public void onCompletion(MediaPlayer mp) {
                         lunchSound(); // rewind
                 }
         };

         private boolean lunchSound()
         {
                 try
                 {
                         mplayer.seekTo(0); // move to start
                         mplayer.start();
                         return true;
                 }catch(Exception e){}
                 return false;
         }
  When user press button, I call lunchSound();

  It works great on emulator and on device if I have eclipse+debugger
  on.
  When I disconnect debugger, I have very strange errors - sound can
  stop at all (till program restart), sound can start repeating (play
  0.1-0.2 sec, then restart). Can someone please provide me some info
  about problem?
  Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Here is some sample code for a live folder example

2009-04-24 Thread Satya Komatineni

http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURLreportId=3014ownerUserId=satya

If you see any errors or discrepancies, I will appreciate it if you let me know

Thanks
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Forecast widget for Android 1.5 (with source!)

2009-04-24 Thread Fred Grott(shareme)

Jeff great work..

Would you consider reposting the details at andmob
wiki..andmob.wikidot.com?

Some of us got together to get an Android community  wiki effort
going.. Mark Murphy handles the administrative stuff..

My ANT build scripts tutorial will be going up at there over the
weekend.

Once again, great work..

On Apr 24, 4:17 am, Jeff Sharkey jshar...@android.com wrote:
 I've been working with the AppWidget framework over the past few
 months, and I wrote an in-depth example showing off all the various
 features of the framework.  It's a forecast widget that shows the
 weather in locations of your choice.  It offers multiple
 configurations, and can handle several widgets at once.

 http://www.jsharkey.org/blog/2009/04/24/forecast-widget-for-android-1...

 And you can grab the source from Google Code under an Apache 2.0
 license:

 http://code.google.com/p/android-sky/source/browse/#svn/trunk/Sky

 Feel free to ping me here if you have any questions about the code or
 widgets in general.  :)

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



[android-developers] 1.5 and bluetooth call button

2009-04-24 Thread bw

Hi,

Does the 1.5 update fix/enable using bluetooth headsets' call button -
(eg. hold the button down to start voice dialer, press to pick up a
call, press to end call)?
This doesn't seem to work in the current version of android.

Thanks
-Ben


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



[android-developers] Do you have an example of layout like contact's form (add) ? (version 1.5)

2009-04-24 Thread Karima

Hi,

I seen the apiDemos but i didn't find the same form like the contact's
form (add).
I don't know, if it's a ExpandableListView or a activityList or ...
Do you have an example in xml or/and java ?

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



[android-developers] Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread chrispix

While I read the blog here : 
http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.html
I almost had a heart attack. Having a location based application, the
number one issue we had was being able to automatically turn on / off
GPS based on an application setting. Which quite frankly makes some
sense.

Having to prompt the user each time to turn on / off gps is a giant
pain from the standpoint of program flow.

I have used our applications setting to actually turn GPS off, because
it was faster to open our app and close the app, and turn off GPS.
Rather than opening the settings, and doing it that way.

I hope you have updated the market so we can respond to all the
negative feedback regarding having to manually enable GPS/disable
GPS.

The coding change is not the matter. The fact that a useful function
was taken away. Can't there be some way to code GPS state to an
application state?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] after launching audio recording intent MediaStoreAudio.Media.RECORD_SOUND_ACTION

2009-04-24 Thread jj

after launching audio recording intent
MediaStoreAudio.Media.RECORD_SOUND_ACTION

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Disconnect
Don't forget the fact that it assumes the google devs (or, more likely, the
mysterious and secretive Designers) have the One True Best Way to change
settings.

Want to set profiles in toggle settings or other apps (or, say, the
much-vaunted Locale) to do things like turn gps off when you are on a train,
and turn brightness up when you are outside? Yeah, forget that. Lets see
what it takes in 1.1 to turn up the brightness on my phone: Drag down the
notification bar (1 drag), click 'toggle settings' (1 click), click
'brightness' (2 clicks) and select a level (3 clicks). Getting back is as
easy as a single click to 'back'.

Now lets look at the new way. Instead of going to one app that has a list
(or no apps, in the case of locale) you have to open settings (click 1),
scroll down to the bottom (drag), open display (click 2), scroll down to the
bottom (2 drags basically) and click 'brightness' (click three) and then
select the slider position (click 4). then hold home (click five, plus a
long delay) and select the app you were using (click six).

Wow. That sure is convenient when all i want to do is make a phone call in
the sun. The good news is, by the time I do that, make my call, and do it
again to set the brightness back down, its probably nighttime.

(And if I were to set up profiles, I could do all that - plus gps and
ringtones - in 3 clicks. Instead of 10+ to do it in 'settings')

On Fri, Apr 24, 2009 at 10:19 AM, chrispix chris...@gmail.com wrote:


 While I read the blog here :
 http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.html
 I almost had a heart attack. Having a location based application, the
 number one issue we had was being able to automatically turn on / off
 GPS based on an application setting. Which quite frankly makes some
 sense.

 Having to prompt the user each time to turn on / off gps is a giant
 pain from the standpoint of program flow.

 I have used our applications setting to actually turn GPS off, because
 it was faster to open our app and close the app, and turn off GPS.
 Rather than opening the settings, and doing it that way.

 I hope you have updated the market so we can respond to all the
 negative feedback regarding having to manually enable GPS/disable
 GPS.

 The coding change is not the matter. The fact that a useful function
 was taken away. Can't there be some way to code GPS state to an
 application state?
 


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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Mark Murphy

chrispix wrote:
 Having to prompt the user each time to turn on / off gps is a giant
 pain from the standpoint of program flow.

It is rather mystifying that the solution was to disable the APIs rather
than add more permissions, or even a system-launched confirmation dialog.

If the goal was to prevent rogue applications from mucking with GPS
availability, well, that's fine, but I'd hope there'd be a way to not
throw the baby out with the bathwater.

I haven't played with the new 1.5 Settings class yet to be in position
to write up an enhancement request on http://b.android.com -- anyone
else want to take a crack at that?

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

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread JP



On Apr 24, 7:26 am, Disconnect dc.disconn...@gmail.com wrote:
 Now lets look at the new way. Instead of going to one app that has a list
 (or no apps, in the case of locale) you have to open settings (click 1),
 scroll down to the bottom (drag), open display (click 2), scroll down to the
 bottom (2 drags basically) and click 'brightness' (click three) and then
 select the slider position (click 4). then hold home (click five, plus a
 long delay) and select the app you were using (click six).

 Wow. That sure is convenient when all i want to do is make a phone call in
 the sun. The good news is, by the time I do that, make my call, and do it
 again to set the brightness back down, its probably nighttime.


It's only half as bad as you guys make it out to be. I agree with
Google's change so that device settings are made in one location only
to emphasize it as a conscious step. You can jump straight into the
relevany settings from an app with the user returning to your app via
the Back button. Here's a snippet how I handle this even now in
1.0/1.1 (haven't had the time to try 1.5; I do this on the side),
using an alert dialog to directly jump to the location settings:

 snip 

boolean okToFinishApp = true;
string bestProvider;
LocationListener locListener;
LocatioManager locMan;

class DummyListener implements OnClickListener {
public void onClick(DialogInterface dialog, int 
whichButton)
{
okToFinishApp = false; //  starting Intent sends a stop
to myApp; do not respond if this is just opening the browser or some
else
Intent myIntent = new Intent
(Settings.ACTION_SECURITY_SETTINGS );
startActivity(myIntent);
} ;
};

if (locListener == null)
 locListener = new LocListener(this);
bestProvider = locMan.getBestProvider(providerCriteria, true);
if (bestProvider == null) {
 AlertDialog noProviderDialog = new
AlertDialog.Builder(this)
 .setIcon(R.drawable.menudetour)
 .setTitle(Where I am)
 .setPositiveButton(Turn on, new DummyListener())
 .setMessage(No provider for location tracking
available.\n\nYou must turn on a location provider.) // lazy...
string not transferred to resources yet
 .setNeutralButton(Cancel, null)
 .create();

noProviderDialog.show();
return true;
}

@Override
protected void onStop() {

super.onStop();

if (okToFinishApp)
this.finish();

okToFinishApp = false;
 }


-- snip 

Diane H. critizised the override of onStop() (on another occasion) but
this may not necessary when jumping to settings. It is needed however
when opening the browser from within an app, which I do, so I need
this anyway and I just run with it throughout.

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

2009-04-24 Thread jarkman

Well, it didn't seem insane on 1.1, and it ran happily enough. Let me
break it down for you, and see if it makes any more sense.

From the top, in HierarchyViewer, reading down the deepest path, we
go:

PhoneWindow$DecorView
LinearLayout
FrameLayout
TabHost
LinearLayout  (comes with the TabHost)
FrameLayout  (comes with the TabHost)
PhoneWindow$DecorView
FrameLayout  (for this tab)
LinearLayout
FrameLayout  (also holds a loading-progress gizmo)
FastScrollView
ListView
RelativeLayout (for the list item)
OurPhotoView
ImageView

So, the total depth is the sum of several constructs that each use a
few nested views - the TabHost needs a few, the fancy list needs a
few, the photo view needs a few, and all of a sudden we are at 15.

We used to use more, because the nesting of LinearLayouts worked very
well as a way of collecting up a number of items that were often
invisible, but that took us over the new stack size limit.

Do you see how we got here ?

Richard



On Apr 24, 1:13 pm, Romain Guy romain...@google.com wrote:
 A custom control has nothing to do with this kind of issue. Actually,
 custom controls are a good way to avoid that issue, and optimize
 layouts in general. Around 15 levels deep of layouts is just insanely
 complex for a cell phone screen.



 On Fri, Apr 24, 2009 at 5:08 AM, jarkman jark...@gmail.com wrote:

  I'm not sure it's realistic to describe this as a simple optimisation
  issue.

  We've just gone through an exercise to fix these crashes in one of our
  apps. We've managed it, but only at the expense of uglification of the
  code.

  We're working with a custom list on a tab. Looking at the hierarchy
  viewer, we are 12 deep in the tree by the time we get to our ListView.
  We now have three levels under that - a RelativeLayout for our list
  item, various simple views, and one custom control with a child view.

  That just fits, and doesn't crash in 1.5. Previously, we laid out the
  list item with a 2-deep tree of linear layouts, which was a lot more
  convenient in our code.

  As far as I can see, if we had built any more custom controls or used
  a more complex layout, we'd be quite knackered at this point, which
  makes this restriction seem like a real step backwards.

  Richard

  On Apr 24, 9:23 am, Dianne Hackborn hack...@android.com wrote:
  We didn't  have time for Cupcake, but we definitely want to have some very
  well-defined limits in a future release.  There is no nice error because
  what actually is happening is the app is running out of stack space -- some
  optimizations and new features in the view hierarchy caused certain
  functions to use a little more stack, which can result in apps that were
  skirting the edge of the stack to go over the limit.

  We apologize, and definitely aren't happy about this; we had some some
  additional optimization of the code to reduce stack usage at the very last
  minute but found a little later that it still wasn't enough.

  Anyway, if this makes cupcake not a good as 1.1 to you, well okay, I guess
  don't run cupcake or something.

  (Btw, in practice, an application with a deep hierarchy like this is also
  going to have noticeable performance issues because of the work required to
  manage it, so this can be considered a nice opportunity to do a bit of good
  optimization.)

  On Fri, Apr 24, 2009 at 12:52 AM, Al Sutton a...@funkyandroid.com wrote:

   Having read

  http://android-developers.blogspot.com/2009/04/future-proofing-your-a...
   l I noted this little section;

   Due to changes in the View rendering infrastructure, unreasonably deep
   (more than 10 or so) or broad (more than 30 total) View hierarchies in
   layouts are now likely to cause crashes. This was always a risk for
   excessively complex layouts, but you can think of Android 1.5 as being
   better than 1.1 at exposing this problem...

   Will the SDK warn us when we're reaching the limit for crashes?

   And more to the point why does it crash and not return some form of
   meaningful error to the app? With an error code or thrown exception
   developers could create various levels of layout complexity and step down
   the layout complexity level until they find one the device will support.

   Al.

   P.S. No matter what the post says I see this as a regression in
   functionality and I definitely do not see it as Android 1.5 as being
   better
   than 1.1 in any way.

   ---

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

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

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

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

[android-developers] Theme issues with 1.5

2009-04-24 Thread jarkman

We've got a couple of issues with apps drawing differently in the 1.5
preview SDK.

Theme_Translucent_NoTitleBar_Fullscreen doesn't result in a full
screen, but in one which wraps our content. Also, we get a fat grey
border drawn round our views.

I've not been able to find any way to change these behaviours, which
make me wonder if they might be issues with the SDK. Are there any
known issues along those lines ?

Thanks,

Richard

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread JP


You don't need that okToFinishApp = false there in the end. That
slipped in when I pulled this together from various places

On Apr 24, 7:49 am, JP joachim.pfeif...@gmail.com wrote:
 On Apr 24, 7:26 am, Disconnect dc.disconn...@gmail.com wrote:


 @Override
 protected void onStop() {

 super.onStop();

 if (okToFinishApp)
 this.finish();

 okToFinishApp = false;
  }

 -- snip 

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Ward Willats

At 7:19 AM -0700 4/24/09, chrispix wrote:

Having to prompt the user each time to turn on / off gps is a giant
pain from the standpoint of program flow.

I'm not sure why you have to prompt each time. You only need to check 
the GPS state once at startup and then fire the user off to settings 
if it is not on. They press back after that and you're on your way.


  Can't there be some way to code GPS state to an application state?

I'm having a hard time understanding most of your writing, but do you 
mean doing something like this:

 public static boolean gpsEnabledInSettings( final Context context )
 {
 android.location.LocationManager alm =
 (android.location.LocationManager) 
context.getSystemService( Context.LOCATION_SERVICE );
 return alm.isProviderEnabled( 
android.location.LocationManager.GPS_PROVIDER );
 }

...or are you proposing a manifest entry staying your app only wants 
to run with GPS on? or?

Sure it is nice to be able to provide an in application control but 
it is not strictly a requirement for operation. This just does not 
seem to me to be that big a deal. Am I missing something?

-- Ward

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



[android-developers] SurfaceFlinger and permitions

2009-04-24 Thread Guian

I'm porting my app on the t-mobile G1. this app uses OpenGL (using the
glSurfaceView from API demo )

my app works fine on the emulator with these minor errors :

04-24 16:57:04.957: ERROR/GLLogger(213): couldn't load libhgl.so
library (Cannot find library)
04-24 16:57:05.147: DEBUG/SurfaceFlinger(45): pid 213 requesting gpu
surface (current owner = -1)
04-24 16:57:05.157: ERROR/MemoryHeapBase(45): error opening /dev/
pmem_gpu1: No such file or directory
04-24 16:57:05.157: ERROR/MemoryHeapBase(45): error opening /dev/
pmem_gpu0: No such file or directory
04-24 16:57:05.157: DEBUG/SurfaceFlinger(45): pid 213 requesting gpu
surface (current owner = -2)
04-24 16:57:05.157: ERROR/MemoryHeapBase(45): error opening /dev/
pmem_gpu1: No such file or directory
04-24 16:57:05.157: ERROR/MemoryHeapBase(45): error opening /dev/
pmem_gpu0: No such file or directory


when lauching it on the G1 errors become :
and the app simply close.

D/SurfaceFlinger(18083): pid 18620 requesting gpu core (owner = -1)
D/SurfaceFlinger(18083): pid 18620 requesting gpu surface (current
owner = -1)
D/SurfaceFlinger(18083): gpu surface granted to pid 18620
D/SurfaceFlinger(18083): pid 18620 requesting gpu surface (current
owner = 18620)
D/SurfaceFlinger(18083): gpu surface granted to pid 18620
I/ActivityManager(18083): Displayed activity
com.aquafadas.glLibrary/.TestLib: 11906 ms
D/EGL.oem (18620): SMI  region at virtual=0x45648000, physical=0x0,
size=7340032 offset=0
D/EGL.oem (18620): EBI1 region at virtual=0x45d48000,
physical=0x1650, size=8388608 offset=1228800
D/EGL.oem (18620): REGS region at virtual=0x44c44000,
physical=0xa000, size=1048576, offset=0
D/dalvikvm(18620): GC freed 1754 objects / 95936 bytes in 108ms
D/dalvikvm(18620): GC freed 309 objects / 15832 bytes in 92ms
D/dalvikvm(18620): GC freed 63 objects / 2152 bytes in 93ms
D/dalvikvm(18620): GC freed 70 objects / 2592 bytes in 91ms
I/ActivityManager(18083): Process com.navigaia.android (pid 18319) has
died.
D/dalvikvm(18620): GC freed 44 objects / 1576 bytes in 118ms
D/dalvikvm(18620): GC freed 52 objects / 1856 bytes in 93ms
D/dalvikvm(18620): GC freed 50 objects / 1784 bytes in 92ms
D/dalvikvm(18620): GC freed 52 objects / 1840 bytes in 91ms
D/dalvikvm(18620): GC freed 50 objects / 1784 bytes in 94ms
D/dalvikvm(18620): GC freed 44 objects / 1560 bytes in 95ms
D/dalvikvm(18620): GC freed 52 objects / 1840 bytes in 120ms
D/dalvikvm(18620): GC freed 50 objects / 1784 bytes in 92ms
D/dalvikvm(18620): GC freed 44 objects / 1568 bytes in 91ms
D/dalvikvm(18620): GC freed 44 objects / 1576 bytes in 92ms
D/dalvikvm(18620): GC freed 52 objects / 2576 bytes in 93ms
I/ActivityManager(18083): Process
com.smartcapsules.cooking.android.taster (pid 18288) has died.
I/DEBUG   (   29): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG   (   29): Build fingerprint: 'android-devphone1/
dream_devphone/dream/trout:1.1/UNLOCKED/142608:userdebug/test-keys'
I/DEBUG   (   29): pid: 18620, tid: 18636   com.aquafadas.glLibrary

I/DEBUG   (   29): signal 11 (SIGSEGV), fault addr 00c0
I/DEBUG   (   29):  r0 0018  r1 001a94d8  r2 0001  r3 
I/DEBUG   (   29):  r4 001aa4d8  r5 001a94d8  r6 ad31a3fc  r7 
I/DEBUG   (   29):  r8 fffe  r9   10 0001  fp deadbeef
I/DEBUG   (   29):  ip   sp 44c43d78  lr 8012eaac  pc
80123250  cpsr 0010
I/DEBUG   (   29):  #00  pc 80123250  /system/lib/libhgl.so
I/DEBUG   (   29):  #01  lr 8012eaac  /system/lib/libhgl.so
I/DEBUG   (   29): stack:
I/DEBUG   (   29): 44c43d38  0320
I/DEBUG   (   29): 44c43d3c  afe35d78
I/DEBUG   (   29): 44c43d40  001e62d0  [heap]
I/DEBUG   (   29): 44c43d44  001aac70  [heap]
I/DEBUG   (   29): 44c43d48  ffcf
I/DEBUG   (   29): 44c43d4c  
I/DEBUG   (   29): 44c43d50  ffe0
I/DEBUG   (   29): 44c43d54  8012eaac  /system/lib/libhgl.so
I/DEBUG   (   29): 44c43d58  001aac70  [heap]
I/DEBUG   (   29): 44c43d5c  8012ea00  /system/lib/libhgl.so
I/DEBUG   (   29): 44c43d60  001aa4d8  [heap]
I/DEBUG   (   29): 44c43d64  001a94d8  [heap]
I/DEBUG   (   29): 44c43d68  ad31a3fc  /system/lib/
libandroid_runtime.so
I/DEBUG   (   29): 44c43d6c  
I/DEBUG   (   29): 44c43d70  df002777
I/DEBUG   (   29): 44c43d74  e3a070ad
I/DEBUG   (   29): #00 44c43d78  44c43dc0
I/DEBUG   (   29): 44c43d7c  
I/DEBUG   (   29): 44c43d80  ad31a3fc  /system/lib/
libandroid_runtime.so
I/DEBUG   (   29): 44c43d84  41016eb4
I/DEBUG   (   29): 44c43d88  44c43da0
I/DEBUG   (   29): 44c43d8c  41016eac
I/DEBUG   (   29): 44c43d90  41016e98
I/DEBUG   (   29): 44c43d94  0001
I/DEBUG   (   29): 44c43d98  acb15524
I/DEBUG   (   29): 44c43d9c  ad00d9f8  /system/lib/libdvm.so
I/DEBUG   (   29): 44c43da0  41092718
I/DEBUG   (   29): 44c43da4  001e0ee8  [heap]
I/DEBUG   (   29): 44c43da8  ad31a3fc  /system/lib/
libandroid_runtime.so
I/DEBUG   ( 

[android-developers] Re: Layout bugs

2009-04-24 Thread Mark Murphy

jarkman wrote:
 Well, it didn't seem insane on 1.1, and it ran happily enough. Let me
 break it down for you, and see if it makes any more sense.
 
 From the top, in HierarchyViewer, reading down the deepest path, we
 go:
 
 PhoneWindow$DecorView
 LinearLayout
 FrameLayout
 TabHost
 LinearLayout  (comes with the TabHost)
 FrameLayout  (comes with the TabHost)
 PhoneWindow$DecorView
 FrameLayout  (for this tab)
 LinearLayout
 FrameLayout  (also holds a loading-progress gizmo)
 FastScrollView
 ListView
 RelativeLayout (for the list item)
 OurPhotoView
 ImageView

My guess from this list is that are using the embed-an-activity-in-a-tab
stuff, which is why you get the second PhoneWindow$DecorView and,
possibly, the subsequent FrameLayout.

If my guess is correct, you could alter your application to not use
activities in this fashion and save 1-2 levels in your view hierarchy.
Populate your tabs via Views (possibly using the factory pattern for a
faster initial open) instead of activities.

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

Warescription: Three Android Books, Plus Updates, $35/Year

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



[android-developers] SurfaceFlinger and permitions

2009-04-24 Thread Guian

I'm porting my app on the t-mobile G1. this app uses OpenGL (using the
glSurfaceView from API demo )

my app works fine on the emulator with these minor errors :

04-24 16:57:04.957: ERROR/GLLogger(213): couldn't load libhgl.so
library (Cannot find library)
04-24 16:57:05.147: DEBUG/SurfaceFlinger(45): pid 213 requesting gpu
surface (current owner = -1)
04-24 16:57:05.157: ERROR/MemoryHeapBase(45): error opening /dev/
pmem_gpu1: No such file or directory
04-24 16:57:05.157: ERROR/MemoryHeapBase(45): error opening /dev/
pmem_gpu0: No such file or directory
04-24 16:57:05.157: DEBUG/SurfaceFlinger(45): pid 213 requesting gpu
surface (current owner = -2)
04-24 16:57:05.157: ERROR/MemoryHeapBase(45): error opening /dev/
pmem_gpu1: No such file or directory
04-24 16:57:05.157: ERROR/MemoryHeapBase(45): error opening /dev/
pmem_gpu0: No such file or directory


when lauching it on the G1 errors become :
and the app simply close.

D/SurfaceFlinger(18083): pid 18620 requesting gpu core (owner = -1)
D/SurfaceFlinger(18083): pid 18620 requesting gpu surface (current
owner = -1)
D/SurfaceFlinger(18083): gpu surface granted to pid 18620
D/SurfaceFlinger(18083): pid 18620 requesting gpu surface (current
owner = 18620)
D/SurfaceFlinger(18083): gpu surface granted to pid 18620
I/ActivityManager(18083): Displayed activity
com.mypackage.package/.Test: 11906 ms
D/EGL.oem (18620): SMI region at virtual=0x45648000, physical=0x0,
size=7340032 offset=0
D/EGL.oem (18620): EBI1 region at virtual=0x45d48000,
physical=0x1650, size=8388608 offset=1228800
D/EGL.oem (18620): REGS region at virtual=0x44c44000,
physical=0xa000, size=1048576, offset=0
D/dalvikvm(18620): GC freed 1754 objects / 95936 bytes in 108ms
D/dalvikvm(18620): GC freed 309 objects / 15832 bytes in 92ms
D/dalvikvm(18620): GC freed 63 objects / 2152 bytes in 93ms
D/dalvikvm(18620): GC freed 70 objects / 2592 bytes in 91ms
I/ActivityManager(18083): Process com.navigaia.android (pid 18319) has
died.
D/dalvikvm(18620): GC freed 44 objects / 1576 bytes in 118ms
D/dalvikvm(18620): GC freed 52 objects / 1856 bytes in 93ms
D/dalvikvm(18620): GC freed 50 objects / 1784 bytes in 92ms
D/dalvikvm(18620): GC freed 52 objects / 1840 bytes in 91ms
D/dalvikvm(18620): GC freed 50 objects / 1784 bytes in 94ms
D/dalvikvm(18620): GC freed 44 objects / 1560 bytes in 95ms
D/dalvikvm(18620): GC freed 52 objects / 1840 bytes in 120ms
D/dalvikvm(18620): GC freed 50 objects / 1784 bytes in 92ms
D/dalvikvm(18620): GC freed 44 objects / 1568 bytes in 91ms
D/dalvikvm(18620): GC freed 44 objects / 1576 bytes in 92ms
D/dalvikvm(18620): GC freed 52 objects / 2576 bytes in 93ms
I/ActivityManager(18083): Process
com.smartcapsules.cooking.android.taster (pid 18288) has died.
I/DEBUG ( 29): *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*** ***
I/DEBUG ( 29): Build fingerprint: 'android-devphone1/dream_devphone/
dream/trout:1.1/UNLOCKED/142608:userdebug/test-keys'
I/DEBUG ( 29): pid: 18620, tid: 18636  com.myPackage.package 
I/DEBUG ( 29): signal 11 (SIGSEGV), fault addr 00c0
I/DEBUG ( 29): r0 0018 r1 001a94d8 r2 0001 r3 
I/DEBUG ( 29): r4 001aa4d8 r5 001a94d8 r6 ad31a3fc r7 
I/DEBUG ( 29): r8 fffe r9  10 0001 fp deadbeef
I/DEBUG ( 29): ip  sp 44c43d78 lr 8012eaac pc 80123250 cpsr
0010
I/DEBUG ( 29): #00 pc 80123250 /system/lib/libhgl.so
I/DEBUG ( 29): #01 lr 8012eaac /system/lib/libhgl.so
I/DEBUG ( 29): stack:
I/DEBUG ( 29): 44c43d38 0320
I/DEBUG ( 29): 44c43d3c afe35d78
I/DEBUG ( 29): 44c43d40 001e62d0 [heap]
I/DEBUG ( 29): 44c43d44 001aac70 [heap]
I/DEBUG ( 29): 44c43d48 ffcf
I/DEBUG ( 29): 44c43d4c 
I/DEBUG ( 29): 44c43d50 ffe0
I/DEBUG ( 29): 44c43d54 8012eaac /system/lib/libhgl.so
I/DEBUG ( 29): 44c43d58 001aac70 [heap]
I/DEBUG ( 29): 44c43d5c 8012ea00 /system/lib/libhgl.so
I/DEBUG ( 29): 44c43d60 001aa4d8 [heap]
I/DEBUG ( 29): 44c43d64 001a94d8 [heap]
I/DEBUG ( 29): 44c43d68 ad31a3fc /system/lib/libandroid_runtime.so
I/DEBUG ( 29): 44c43d6c 
I/DEBUG ( 29): 44c43d70 df002777
I/DEBUG ( 29): 44c43d74 e3a070ad
I/DEBUG ( 29): #00 44c43d78 44c43dc0
I/DEBUG ( 29): 44c43d7c 
I/DEBUG ( 29): 44c43d80 ad31a3fc /system/lib/libandroid_runtime.so
I/DEBUG ( 29): 44c43d84 41016eb4
I/DEBUG ( 29): 44c43d88 44c43da0
I/DEBUG ( 29): 44c43d8c 41016eac
I/DEBUG ( 29): 44c43d90 41016e98
I/DEBUG ( 29): 44c43d94 0001
I/DEBUG ( 29): 44c43d98 acb15524
I/DEBUG ( 29): 44c43d9c ad00d9f8 /system/lib/libdvm.so
I/DEBUG ( 29): 44c43da0 41092718
I/DEBUG ( 29): 44c43da4 001e0ee8 [heap]
I/DEBUG ( 29): 44c43da8 ad31a3fc /system/lib/libandroid_runtime.so
I/DEBUG ( 29): 44c43dac 
I/DEBUG ( 29): 44c43db0 3072
I/DEBUG ( 29): 44c43db4 001e0ee8 [heap]
I/DEBUG ( 29): 44c43db8 44c43dc0
I/DEBUG ( 29): 44c43dbc ad041211 /system/lib/libdvm.so
I/ActivityManager(18083): Process com.myPackagepackage (pid 18620) has
died.
D/Zygote (18059): Process 18620 terminated by signal (11)
E/SurfaceFlinger(18083): HW3D_REVOKE_GPU 

[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Jean-Baptiste Queru

All right, here's the deal:

One of the reasons that motivated the change is battery life, which is
a major point of frustration for many Android users. More precisely,
we've noticed in our testing that there was a strong correlation
between user complaints about battery life and specific applications
being installed, and a deeper investigation showed that those apps
were indeed causing poor battery life by turning hardware on in a way
that users weren't expecting. Restricting access to those settings
through an explicit UI was found to be an appropriate mechanism for
users to known precisely enough what was going on and to get
appropriate expectations about battery life.

Another reason that motivated the change is an overall concern about
privacy and abuse. There've been concerns that changing settings like
GPS, data roaming, wifi, airplane mode without the user's explicit
action for each operation was inappropriate.

Both of those areas were broadly reported by users, by carriers, and
in the press.

1.5 addresses those concerns based on the feedback that we're
received, by putting the user in better control of their phone.

JBQ

On Fri, Apr 24, 2009 at 7:19 AM, chrispix chris...@gmail.com wrote:

 While I read the blog here : 
 http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.html
 I almost had a heart attack. Having a location based application, the
 number one issue we had was being able to automatically turn on / off
 GPS based on an application setting. Which quite frankly makes some
 sense.

 Having to prompt the user each time to turn on / off gps is a giant
 pain from the standpoint of program flow.

 I have used our applications setting to actually turn GPS off, because
 it was faster to open our app and close the app, and turn off GPS.
 Rather than opening the settings, and doing it that way.

 I hope you have updated the market so we can respond to all the
 negative feedback regarding having to manually enable GPS/disable
 GPS.

 The coding change is not the matter. The fact that a useful function
 was taken away. Can't there be some way to code GPS state to an
 application state?
 




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

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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



[android-developers] When GPS goes off?

2009-04-24 Thread Mohamed Amir

I am working on an application that requires getting location using
GPS.

I registered a listener to get GPS location updates.  The location
manager keeps reporting GPS locations for sometime and then stops
reporting according to the updates frequency I requested.

I couldn't understand when the GPS decides to stop reporting.  I have
written logs for the accuracy of the reported locations and the number
of satellites, but I couldn't correlate that with the duration of the
GPS being ON.

Please, what are the parameters that are affecting this, because I
don't want to end up with an application that kills the battery.

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: URGENT!!!!! Can't update apps in android market!!!

2009-04-24 Thread yhfudev

You may move the
uses-sdk android:minSdkVersion=1/uses-sdk
to the first line, after the manifest 

On Apr 24, 6:04 am, s...@zooropa.com s...@zooropa.com wrote:
 Okay I just sent a message to Google we'll see what they say.

 On Apr 24, 6:17 am, Al Sutton a...@funkyandroid.com wrote: There's 
 little the people on this list can do to help you with the inner
  workings of Market. Your best option would be to try and contact Google.

  Al.

  ---

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

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

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

  -Original Message-
  From: android-developers@googlegroups.com

  [mailto:android-develop...@googlegroups.com] On Behalf Of Yan Shi
  Sent: 24 April 2009 09:15
  To: Android Developers
  Subject: [android-developers] Re: URGENT! Can't update apps in android
  market!!!

  Anyone please?

  On Apr 24, 2:16 pm, Yan Shi shiyansu...@gmail.com wrote:
   When I upload an apk update for one of my apps(Hello Yahoo), I was
   told that Market requires the minSdkVersion to be set in
   AndroidManifest.xml.. So I can't do the update!

   I already set this attribute in AndroidManifest.xml. What's wrong??

   I even set it to uses-sdk minSdkVersion=3 /, but still I can't do
   the update.

   Has anyone met this problem?

   BTW, when I go tohttp://market.android.com/publish/Hometoday, I have
   accepted Term and Service again. I think already accepted it the first
   time I registered for it. Why should I accept it again?

   Could any google stuff look into this please?

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



[android-developers] Re: How to config G1 to make both browser and MMS work?

2009-04-24 Thread biAji

if you use cmnet as apn. keep the proxy blank. It's only useful in
cmwap.

G1's browser will use this proxy.



On Apr 22, 12:47 pm, shimsim shim@gmail.com wrote:
 yep, have tired a few different sites, with no luck. basically the
 browser just does not get anywhere, it looks like its found the page
 and is loading it, but nothing, the loading bar never moves.

 On Apr 22, 10:49 am, Anonymous Anonymous

 firewallbr...@googlemail.com wrote:
  have u tried differnt urls with cmnet? saywww.cnn.cometc, soemthing the
  home configured may not work

  On Wed, Apr 22, 2009 at 7:30 AM, shimsim shim@gmail.com wrote:

   if i change from cmnet to cmwap i dont even get a data connection (no
   edge icon in the notification bar)

   On Apr 22, 9:16 am, Anonymous Anonymous firewallbr...@googlemail.com
   wrote:
give a try with cmwap asapn

On Wed, Apr 22, 2009 at 6:41 AM, shimsim shim@gmail.com wrote:

 Just tried the settings above and get exactly the same results, email
 works, maps work, etc ... but not the browser

 What else could it be?

 thanks

 On Apr 22, 8:08 am, Anonymous Anonymous firewallbr...@googlemail.com
 wrote:
  Settings seems to be correct,please keep only the below information
   and
 see
  the browser works

 apn: cmnet
  proxy: 10.0.0.172
  port:80
  username: blank
  password: blank
  server: blank
  mmsc:blank
  mms proxy: blank
  mms port: blank
  mcc: 460
  mnc:02
 apntype: default

  and i think Pinyin input is not supported(not sure)

  On Tue, Apr 21, 2009 at 8:39 PM, shimsim shim@gmail.com wrote:

   I got the same problem in China with my Dev G1. I'm using the
   M-Zone
   Sim card and with the settings below everything works except the
   browser.

   name: china mobile
  apn: cmnet
   proxy: 10.0.0.172
   port:80
   username: blank
   password: blank
   server: blank
   mmsc:http://mmsc.monternet.com
   mms proxy: 10.0.0.172
   mms port: 9201
   mcc: 460
   mnc:02
  apntype: default

   I have not tried sending any mms, but with these setting i can
   collect
   and send mail, use maps, see the market but NO browser.

   Any ideas?

   ps how do i get pinyin input, is there a way and to still have
   english
   as default?

   Thanks!

   On Apr 21, 7:48 am, Anonymous Anonymous 
   firewallbr...@googlemail.com
   wrote:
for the mmsapnmake the apntype to mms, it shud work

On Fri, Apr 17, 2009 at 11:44 PM, kilroy238 kilroy...@gmail.com

 wrote:

 Which one of the 3 China mobile SIMS do you have?

 On Mar 18, 3:38 pm, FayGU gqm...@gmail.com wrote:
  I have a G1 phone and use it in mainland China.
  But I can't config it to work with browser and MMS at the
   same
 time.
  However with differentAPN, the browser and MMS can work
 seperately.
  For browser, I use followingAPNconfig:
  ---
  name:cmnet
 apn: cmnet
  proxy:blank
  port:blank
  username:blank
  password:blank
  server:blank
  mmsc:blank
  mms proxy:blank
  mms port:blank
  mcc:460
  mnc:00
 apntype:blank
  --

  For MMS, I use followingAPNconfig:
  --
  name:cmwap
 apn: cmwap
  proxy:blank
  port:blank
  username:blank
  password:blank
  server:blank
  mmsc:http://mmsc.monternet.com
  mms proxy:010.000.000.172
  mms port:80
  mcc:460
  mnc:00
 apntype:blank
  ---

  When above two APNs both exists, only browser can work. MMS
 doesn't
  work any more.

  Does any google export know that how to config G1 to make
   both
   browser
  and MMS work?
  If it's a known issue, is there any roadmap to fix it?
  Thanks!


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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread GasBot

If you're worried about an app turning those things on without the
user's permission, why not just detect the application changing the
setting and pop up a quick dialog asking the user if its ok.  That way
they wouldn't have to go clicking through menus, it would only add an
extra click to say ok to turning the devices on.

On Apr 24, 9:34 am, Jean-Baptiste Queru j...@android.com wrote:
 All right, here's the deal:

 One of the reasons that motivated the change is battery life, which is
 a major point of frustration for many Android users. More precisely,
 we've noticed in our testing that there was a strong correlation
 between user complaints about battery life and specific applications
 being installed, and a deeper investigation showed that those apps
 were indeed causing poor battery life by turning hardware on in a way
 that users weren't expecting. Restricting access to those settings
 through an explicit UI was found to be an appropriate mechanism for
 users to known precisely enough what was going on and to get
 appropriate expectations about battery life.

 Another reason that motivated the change is an overall concern about
 privacy and abuse. There've been concerns that changing settings like
 GPS, data roaming, wifi, airplane mode without the user's explicit
 action for each operation was inappropriate.

 Both of those areas were broadly reported by users, by carriers, and
 in the press.

 1.5 addresses those concerns based on the feedback that we're
 received, by putting the user in better control of their phone.

 JBQ



 On Fri, Apr 24, 2009 at 7:19 AM, chrispix chris...@gmail.com wrote:

  While I read the blog here 
  :http://android-developers.blogspot.com/2009/04/future-proofing-your-a...
  I almost had a heart attack. Having a location based application, the
  number one issue we had was being able to automatically turn on / off
  GPS based on an application setting. Which quite frankly makes some
  sense.

  Having to prompt the user each time to turn on / off gps is a giant
  pain from the standpoint of program flow.

  I have used our applications setting to actually turn GPS off, because
  it was faster to open our app and close the app, and turn off GPS.
  Rather than opening the settings, and doing it that way.

  I hope you have updated the market so we can respond to all the
  negative feedback regarding having to manually enable GPS/disable
  GPS.

  The coding change is not the matter. The fact that a useful function
  was taken away. Can't there be some way to code GPS state to an
  application state?

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

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Jean-Baptiste Queru

It's already possible for a user to see an app's permissions - though
it'd be nice indeed if the list could be organized the other way
(contributions welcome).

At least anecdotally, though, we've noticed that users (even
sophisticated ones) don't associate poor battery life or control over
some of the core aspects of their phone with permissions (so the point
of how fine-grained the permissions are defined or how verbosely
they're worded is pretty moot): for a certain category of settings,
our anecdotal evidence suggests that users don't expect any
application to be able to change such settings without asking for
permission each time.

JBQ

On Fri, Apr 24, 2009 at 8:52 AM, André Charles Legendre
andre.legen...@gmail.com wrote:

 Hi Jean Batiste

 It seems that a better way would be to have a list of applications
 allowed to make GPS status changes.
 So user would be prompted one time to say if he allow or not this
 application to change GPS status.
 And to be able to consult and change the list of applications allowed
 to do so if he wants.

 But actual solution seems to be very poor and not very user friendly.

 Regards

 Andre Legendre

 




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

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Disconnect
Where was this discussion held? It sounds like quite a few developers and
platform hackers are interested in providing feedback/alternatives.

(And as a later poster said, a popup that says turn on gps? is not nearly
as bad as this new method, AND doesn't involve a major regression for apps
written to 1.0/1.1.)

On Fri, Apr 24, 2009 at 11:34 AM, Jean-Baptiste Queru j...@android.comwrote:


 All right, here's the deal:

 One of the reasons that motivated the change is battery life, which is
 a major point of frustration for many Android users. More precisely,
 we've noticed in our testing that there was a strong correlation
 between user complaints about battery life and specific applications
 being installed, and a deeper investigation showed that those apps
 were indeed causing poor battery life by turning hardware on in a way
 that users weren't expecting. Restricting access to those settings
 through an explicit UI was found to be an appropriate mechanism for
 users to known precisely enough what was going on and to get
 appropriate expectations about battery life.

 Another reason that motivated the change is an overall concern about
 privacy and abuse. There've been concerns that changing settings like
 GPS, data roaming, wifi, airplane mode without the user's explicit
 action for each operation was inappropriate.

 Both of those areas were broadly reported by users, by carriers, and
 in the press.

 1.5 addresses those concerns based on the feedback that we're
 received, by putting the user in better control of their phone.

 JBQ

 On Fri, Apr 24, 2009 at 7:19 AM, chrispix chris...@gmail.com wrote:
 
  While I read the blog here :
 http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.html
  I almost had a heart attack. Having a location based application, the
  number one issue we had was being able to automatically turn on / off
  GPS based on an application setting. Which quite frankly makes some
  sense.
 
  Having to prompt the user each time to turn on / off gps is a giant
  pain from the standpoint of program flow.
 
  I have used our applications setting to actually turn GPS off, because
  it was faster to open our app and close the app, and turn off GPS.
  Rather than opening the settings, and doing it that way.
 
  I hope you have updated the market so we can respond to all the
  negative feedback regarding having to manually enable GPS/disable
  GPS.
 
  The coding change is not the matter. The fact that a useful function
  was taken away. Can't there be some way to code GPS state to an
  application state?
  
 



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

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.

 


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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread André Charles Legendre

Hi Jean Batiste

It seems that a better way would be to have a list of applications
allowed to make GPS status changes.
So user would be prompted one time to say if he allow or not this
application to change GPS status.
And to be able to consult and change the list of applications allowed
to do so if he wants.

But actual solution seems to be very poor and not very user friendly.

Regards

Andre Legendre

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SharedPreferences got deleted! - What could be the problem?

2009-04-24 Thread bo

That's pretty much what I do also (why take any chances?). Now - all
that business with  gets me thinking. I'm actually storing some
snippets of unescaped HTML (which I actually don't care about much). I
think these I'll move to Bundle and see if my real preferences will
persist

On Apr 24, 3:09 am, scanning_it festival.s...@googlemail.com wrote:
 Thank you Dianne for joining the discussion.

 I will look into my code again but I'm sure that this is the only way
 I am writting to the SharedPreferences:

 settings.edit().putString(SOME_STRING, Hello world.).commit();

 So there shouldn't be a problem with that one.

 Is it possible that SharedPreferences could get lost when a background
 services writes to the SharedPreferences file and gets killed during
 that process? In my background service I am updating e.g. some shared
 prefs that tell me if I have set a specific notification or not.

 Could this usage in services be a problem?

 In addition it would be interesting why a lot of users are complaining
 that their settings got lost after updating my application? I have
 never had that problem testing my own app. But a lot of my users are
 reporting that. (My application has 97.000 active installs and is
 called Missed Call)

 I'm looking forward reading your response.

 On Apr 24, 10:17 am, Dianne Hackborn hack...@android.com wrote:

  You really really should commit the data after you make each batch of
  changes, as the docs say.  It is certainly very possible for the system to
  kill your process between onPause() and onStop() if it is under memory
  pressure.

  On Thu, Apr 23, 2009 at 9:56 AM, bo bost...@gmail.com wrote:

   I do SharedPreferences.Editor.commit() in couple of places. 1.
   Immediately after setting the preference. 2. in Activity#onStop.
   Nevertheless when I restart the app the preferences are gone. Any more
   ideas? I do create prefs programmaticaly after harvesting these from
   user (username/pwd)

   On Apr 21, 11:00 pm, Chander Pechetty cspeche...@gmail.com wrote:
Sorry, I was referring to the settings created using
PreferenceActivity screen using xml. Your actual preference values do
not help much in diagnosing the issue.

Example snippet from loadingpreferencesfrom xml:
                    CheckBoxPreference android:key=pref1
                        android:title=pref1
                        android:summaryOn=SummaryOn
                        android:summaryOff=SummaryOff
                        android:defaultValue=true
                        android:persistent=true/

Forpreferencescreated programatically, you can use
Preference.setPersistent(true);

If no Settings screen is present, and everything is through your
program, then batch SharedPreferences.Editor.commit()'s should be
fine.

I had a similar problem as yours, but have not faced it again so far.
Other than the known issue mentioned in the previous post, I don't
know what else the problem could be unless you post your code
perhaps...

  --
  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] Timer Help (Time Stamp my code)

2009-04-24 Thread mcmc

Hi, I'm trying to put a timer in my code to determine the amount of
time it takes to execute a block of code.

I've tried googling up some ideas, but they are all related to
scheduling tasks, which is not what I want.

I want to, perhaps, place a time stamp in different parts of my code.
How can I do this?

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



[android-developers] Re: Layout bugs

2009-04-24 Thread Al Sutton

Responses inline.

Al.

---

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

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

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


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Romain Guy
Sent: 24 April 2009 13:52
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Layout bugs


 By crash here we mean that you get a StackOverflowException, just like
with any regular Java application. There is nothing special about this.



Thanks for the clarification. To me a crash is when a program suddenly stops
executing (i.e. running stopped by a crash), if it's throwing a SOE then
that’s good to know.



  To me whenever someone on a project says We didn't have time for .
  when discussing something that increases chances of an app crashing in 
  *any* way that indicates the project has been rushed along.

 ANY code change that we do increases chances of an app crashing. (And by
crashing I mean altering its behavior or throwing an exception,
 etc.) Like I said, all changes we make are carefully considered and this
one was NOT deemed critical. We are releasing a preview SDK *and* articles 
to help you fix that kind of bug if you run into it but it doesn't mean it
is going to happen to your app or even any app.



Crashing isn't about altering behaviour, crashing is about a program
becoming ceasing to respond (see
http://en.wikipedia.org/wiki/Crash_(computing)). I know the Google
dictionary is a little different to the one every else uses (with Beta
having a vary loose definition in it), so when someone says Crash you'll
have to expect some of us to be using the more widely accepted definition.

If every change made increased the chances of crashing then you could draw
the conclusion that after a number of changes you would have code that ever
app crashed all of the time, which I hope isn't the goal.

Btw, All the support work to help to test for this is much appreciated.



 Whatever you might think we take compatibility VERY seriously. We also
monitor Market applications closely to ensure we don't break them when it's
  not justified (we caught many bugs we introduced during the Cupcake
development by looking at Market applications.)



It's good to know you're doing compatibility testing and, in all
seriousness, it's a great leap forward in the QA stakes.



 Personally I don't believe an OS should crash when a developer writes 
 code that doesn't fit in with OS design decisions. Error messages and 
 exceptions are the way to handle code that exhausts resources such as 
 the stack, crashing out doesn't give the app a chance to handle things 
 gracefully or give the developer much to work with in terms of finding the
problem.

 Given that the stack size can be changed on different platforms (or 
 even between compilations for the same target) by altering 
 kDefaultStackSize in vm/Thread.h in the davlik project in the repo, 
 doesn't this introduce a problem where an app which works on one 
 platform may just crash out on another  where the stack size is different?

 Al.
 ---

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

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

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


 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Romain Guy
 Sent: 24 April 2009 13:06
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Layout bugs


 Cupcake is not rushed in any way and every change we made was made 
 after careful consideration. The problem that Dan warns about should 
 not affect the vast majority of apps. In my experience, to trigger it, 
 you need to have a hierarchy of views that's about 14 levels deep. And 
 even in 1.0 and 1.1, such a deep hierarchy could blow up depending on 
 the code path taken or how the app is using the views. And for what 
 it's worth I DID made some changes to avoid this problem to occur in 
 some existing Market applications. The fix goes against optimizing 
 the framework but we gave priority to backward compatibility with existing
apps.

 As Dianne said, applications that have enough views to trigger that 
 crash would run into other issues anyway and we feel it's a good way 
 to force developers who run into these issues to fix their 
 applications. Inflating, laying out and drawing 

[android-developers] Difficulty Resuming SurfaceView

2009-04-24 Thread robotissues

I am stuck.  My main activity creates and starts a SurfaceView.  My
app needs to access a listview via the options menu to change
properties of the items shown in the view.

Two strange things occur:

1.) When I scroll the listview quickly, the list sometimes gets
farklempt.  Words overlap each other.

2.) When I select the item and the app returns to the main activity,
the thread is no longer alive.

If someone out there can offer help I will post the code.  This will
take a little effort.  My code is loosely based upon LunarLander and
the GLSurfaceView examples.  If there is a good example (more recent
example) someone can point me to, that would be boss.

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: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Al Sutton

Couple of things I can see;

- Isn't this new scenario going to have a negative impact on battery life
because apps won't be able to turn GPS off when they don't need to use it.

- Isn't the biggest privacy problem at the moment with permission
granularity on Internet access?, There are many apps that want internet
access just to access a donations page, but as a user of, say, an accounts
program, how can I tell that is all the app wants to do and that it isn't
also sending my bank and credit card details somewhere?

Al.



---

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

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

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


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 24 April 2009 16:35
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Android v. 1.5 = FAIL #2: Directly
Manipulating Settings


All right, here's the deal:

One of the reasons that motivated the change is battery life, which is a
major point of frustration for many Android users. More precisely, we've
noticed in our testing that there was a strong correlation between user
complaints about battery life and specific applications being installed, and
a deeper investigation showed that those apps were indeed causing poor
battery life by turning hardware on in a way that users weren't expecting.
Restricting access to those settings through an explicit UI was found to be
an appropriate mechanism for users to known precisely enough what was going
on and to get appropriate expectations about battery life.

Another reason that motivated the change is an overall concern about privacy
and abuse. There've been concerns that changing settings like GPS, data
roaming, wifi, airplane mode without the user's explicit action for each
operation was inappropriate.

Both of those areas were broadly reported by users, by carriers, and in the
press.

1.5 addresses those concerns based on the feedback that we're received, by
putting the user in better control of their phone.

JBQ

On Fri, Apr 24, 2009 at 7:19 AM, chrispix chris...@gmail.com wrote:

 While I read the blog here : 
 http://android-developers.blogspot.com/2009/04/future-proofing-your-ap
 ps.html I almost had a heart attack. Having a location based 
 application, the number one issue we had was being able to 
 automatically turn on / off GPS based on an application setting. Which 
 quite frankly makes some sense.

 Having to prompt the user each time to turn on / off gps is a giant 
 pain from the standpoint of program flow.

 I have used our applications setting to actually turn GPS off, because 
 it was faster to open our app and close the app, and turn off GPS.
 Rather than opening the settings, and doing it that way.

 I hope you have updated the market so we can respond to all the 
 negative feedback regarding having to manually enable GPS/disable GPS.

 The coding change is not the matter. The fact that a useful function 
 was taken away. Can't there be some way to code GPS state to an 
 application state?
 




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

Questions sent directly to me that have no reason for being private will
likely get ignored or forwarded to a public forum with no further warning.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: URGENT!!!!! Can't update apps in android market!!!

2009-04-24 Thread havexz

This is the right solution.but why such a wierd but Google only
knows..:)
I also faced the same problem and tried different combination and then
it worked fine finally.

On Apr 24, 10:38 am, yhfudev yhfu...@gmail.com wrote:
 You may move the
 uses-sdk android:minSdkVersion=1/uses-sdk
 to the first line, after the manifest 

 On Apr 24, 6:04 am, s...@zooropa.com s...@zooropa.com wrote:



  Okay I just sent a message to Google we'll see what they say.

  On Apr 24, 6:17 am, Al Sutton a...@funkyandroid.com wrote: There's 
  little the people on this list can do to help you with the inner
   workings of Market. Your best option would be to try and contact Google.

   Al.

   ---

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

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

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

   -Original Message-
   From: android-developers@googlegroups.com

   [mailto:android-develop...@googlegroups.com] On Behalf Of Yan Shi
   Sent: 24 April 2009 09:15
   To: Android Developers
   Subject: [android-developers] Re: URGENT! Can't update apps in android
   market!!!

   Anyone please?

   On Apr 24, 2:16 pm, Yan Shi shiyansu...@gmail.com wrote:
When I upload an apk update for one of my apps(Hello Yahoo), I was
told that Market requires the minSdkVersion to be set in
AndroidManifest.xml.. So I can't do the update!

I already set this attribute in AndroidManifest.xml. What's wrong??

I even set it to uses-sdk minSdkVersion=3 /, but still I can't do
the update.

Has anyone met this problem?

BTW, when I go tohttp://market.android.com/publish/Hometoday, I have
accepted Term and Service again. I think already accepted it the first
time I registered for it. Why should I accept it again?

Could any google stuff look into this please?

Thanks very much- Hide quoted text -

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Dianne Hackborn
On Fri, Apr 24, 2009 at 9:55 AM, Al Sutton a...@funkyandroid.com wrote:

 - Isn't the biggest privacy problem at the moment with permission
 granularity on Internet access?, There are many apps that want internet
 access just to access a donations page, but as a user of, say, an accounts
 program, how can I tell that is all the app wants to do and that it isn't
 also sending my bank and credit card details somewhere?


I think some people are really missing what the turn on GPS setting is.
It just is saying that GPS is -allowed- to run.  The GPS hardware will only
actually be powered up if someone is asking to get data from it.  So the
vast majority of apps should NEVER be touching this setting -- they should
just request location updates when they want them, which will bring up the
GPS hardware if it isn't already running (and the user has confirmed that
this okay at all with that setting).

Another way to look at this -- the GPS setting is primarily there for
privacy, to allow users to determine whether is okay -at all- for anyone to
be getting the fine-grained information about where they are.

The built in maps app (with friend finder and everything) never ever touches
the GPS setting.  The vast majority of other apps should never have been
doing this either.  Yes, there are a couple ones out there that have some
justification for it, but given the significant abuse and bad user
experience and press that was happening with these, we (and I was the main
person who made sure this happened so blame me) decided to shut that door
now and decide how we wanted to support the much smaller subset of
reasonable needs in the future.

For example, we should build into the platform a toggles widget that
allows users directly control these settings on the home screen.  We didn't
have time to do this in cupcake; if someone wants to work on it, I think we
would be happy to accept a good change to the settings app to add this
widget in the next release.

Finally, as far as putting up a dialog to confirm with the user -- we don't
do this, anywhere in the UI, because experience with other platforms has
shown that these kinds of dialogs are more annoying to users than anything
else (and they just don't work at all for stuff being done in the
background).  You also basically get the same thing with the ability to
directly launch the location settings panel to have the user turn it on
themselves.

-- 
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: How to send mail in HTML format?

2009-04-24 Thread havexz

Someone have any idea

On Mar 30, 1:19 am, havexz bali.param...@gmail.com wrote:
 I want to send the Email in HTML format. Currently i am using the
 default text format using the Intent.

 sendIntent.putExtra(Intent.EXTRA_TEXT, helleo);

 But I want to send the email in html format something llike

 htmlbodyhelleo/body/html

 Is there a way to send the mail in html format?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Timer Help (Time Stamp my code)

2009-04-24 Thread Mark Anacker


Well, you could grab the System.nanoTime() value at the start of the
block, again at the end, and subtract...

On Apr 24, 9:43 am, mcmc manni...@gmail.com wrote:
 Hi, I'm trying to put a timer in my code to determine the amount of
 time it takes to execute a block of code.

 I've tried googling up some ideas, but they are all related to
 scheduling tasks, which is not what I want.

 I want to, perhaps, place a time stamp in different parts of my code.
 How can I do this?

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



[android-developers] setNetworkPreference problem...

2009-04-24 Thread Marc

Now here's something odd.

If I use setNetworkPreference(ConnectivityManager.TYPE_WIFI), and I
use the WRITE_SETTINGS uses-permission, all is well.   HOWEVER, if I
then try the other setting (TYPE_MOBILE), I get a security exception
(can't write secure settings).

Does that make sense to anyone?

Thanks.

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread patg

I too think this change is a bad idea and will decrease the user's
experience with my application.

I am surprised that Android's security model asking for permissions
when every application is installed is tollerated while WIndows Vista
basically doing the same thing in a simpler way receives howls of
protest.

Additionally, I don't think the average teenager or grand-mother knows
what any of the fine grain permissions in Android mean and will just
go ahead and allow any app to have the permissions it wants.  Being
somewhat knowledgable, I wonder if the app is using the permission for
the stated purpose or does it do more than it says.



On Apr 24, 7:19 am, chrispix chris...@gmail.com wrote:
 While I read the blog here 
 :http://android-developers.blogspot.com/2009/04/future-proofing-your-a...
 I almost had a heart attack. Having a location based application, the
 number one issue we had was being able to automatically turn on / off
 GPS based on an application setting. Which quite frankly makes some
 sense.

 Having to prompt the user each time to turn on / off gps is a giant
 pain from the standpoint of program flow.

 I have used our applications setting to actually turn GPS off, because
 it was faster to open our app and close the app, and turn off GPS.
 Rather than opening the settings, and doing it that way.

 I hope you have updated the market so we can respond to all the
 negative feedback regarding having to manually enable GPS/disable
 GPS.

 The coding change is not the matter. The fact that a useful function
 was taken away. Can't there be some way to code GPS state to an
 application state?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Layout bugs

2009-04-24 Thread jarkman

Thanks for the suggestion (and yes, your guess is spot-on - we'll try
rearranging it next time we have the covers off).

But I don't think that changes the point - this app is not insanely
badly-written as it stands, and it is already tripping over the stack-
depth problem. Scratching about looking for ways to use less stack,
and to avoid complicated view structures, doesn't feel very 2009. Nor
does it feel like a good use of our time.

R,


On Apr 24, 4:21 pm, Mark Murphy mmur...@commonsware.com wrote:
 jarkman wrote:
  Well, it didn't seem insane on 1.1, and it ran happily enough. Let me
  break it down for you, and see if it makes any more sense.

  From the top, in HierarchyViewer, reading down the deepest path, we
  go:

  PhoneWindow$DecorView
  LinearLayout
  FrameLayout
  TabHost
  LinearLayout  (comes with the TabHost)
  FrameLayout  (comes with the TabHost)
  PhoneWindow$DecorView
  FrameLayout  (for this tab)
  LinearLayout
  FrameLayout  (also holds a loading-progress gizmo)
  FastScrollView
  ListView
  RelativeLayout (for the list item)
  OurPhotoView
  ImageView

 My guess from this list is that are using the embed-an-activity-in-a-tab
 stuff, which is why you get the second PhoneWindow$DecorView and,
 possibly, the subsequent FrameLayout.

 If my guess is correct, you could alter your application to not use
 activities in this fashion and save 1-2 levels in your view hierarchy.
 Populate your tabs via Views (possibly using the factory pattern for a
 faster initial open) instead of activities.

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

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



[android-developers] Re: Layout bugs

2009-04-24 Thread Jeff Sharkey

 FastScrollView
 ListView

You can now specify android:fastScrollEnabled=true on the ListView
instead of wrapping in a FastScrollView.  ;)


-- 
Jeff Sharkey
jshar...@android.com

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



[android-developers] Re: Difficulty Resuming SurfaceView

2009-04-24 Thread Jason Van Anden

Perhaps this would be a better way to inspire feedback.   Is it
possible to pause and resume a view based upon SurfaceView?  What
would be the correct way to restart the view so that the thread can
begin drawing again?






On Fri, Apr 24, 2009 at 1:29 PM, Jason Van Anden
jason.van.an...@gmail.com wrote:
 I created a toy app that demos my problem ... the complete code can be
 found here:  http://www.smileproject.com/SurfCodeExample.zip

 Feedback super appreciated.  Here is the code from the activity and
 view only ...

 public class Surf extends Activity {
    /** Called when the activity is first created. */

    private SurfView mView;
    private SurfThread mThread;

        private static final int COLOR_MENU_ID = Menu.FIRST;
        public static final int ACTIVITY_ASSIGN_COLOR = 0;

   �...@override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        mView= new SurfView(this, null);
        setContentView(mView);
   }

       �...@override
        protected void onPause() {
                // TODO Auto-generated method stub
                super.onPause();

                System.out.println (PAUSED);
                mThread.pause();
        }

       �...@override
        protected void onResume() {
                // TODO Auto-generated method stub
                super.onResume();

                System.out.println (RESUMED);

                mThread = mView.getThread();
            mThread.resume();
        }

       �...@override
        public boolean onCreateOptionsMenu(Menu menu) {

                boolean result = super.onCreateOptionsMenu(menu);

                menu.add(0, COLOR_MENU_ID, 0, R.string.menu_color);

                return result;
        }

       �...@override
        public boolean onPrepareOptionsMenu(Menu menu) {
                super.onPrepareOptionsMenu(menu);
                return true;
        }

       �...@override
        public boolean onOptionsItemSelected(MenuItem item) {

                super.onOptionsItemSelected(item);

                switch (item.getItemId()) {

                case COLOR_MENU_ID:
                        Intent i = new Intent(this, SurfChooser.class);
                        startActivityForResult(i, ACTIVITY_ASSIGN_COLOR);
                        return true;
                }

                return true;
        }

         @Override
         protected void onActivityResult(int requestCode, int resultCode,
 Intent data) {
                // TODO Auto-generated method stub
                super.onActivityResult(requestCode, resultCode, data);

                Bundle extras;

                if (data == null) return;

                extras = data.getExtras();

                switch(requestCode) {

                case ACTIVITY_ASSIGN_COLOR:
                        Log.w(this.getClass().getName(), back);
                        if (data == null) return;

                }
         }
 }

 class SurfView extends SurfaceView implements SurfaceHolder.Callback,
 OnGestureListener  {

        private String TAG  = SurfView;
    private boolean is_dirty = true;

    private boolean block_block = false;
    private boolean block_after_draw = true;

    /** The thread that actually draws the animation */
    private SurfThread thread;
        private GestureDetector mGestureDetector;


        public float offset_x = 0; // review this later
        public float offset_y = 0;

        public float x_velocity = 0; // review this later
        public float y_velocity = 0;

        private float last_pos_x = 0;
        private float last_pos_y = 0;

        private int keep_on_trucking = -1;

        // used for managing timing in physics
    private long start_time = System.currentTimeMillis();
    private long end_time = 0;
    private long sleep_time = 0;
    private long diff_time = 0;
    private long action_period = 20; // 50 = 20fps

    /** coords of bg circle */
    private float bX;
    private float bY;

    /** coords of pointer (m == mouse). */
    private float mX;
    private float mY;

    /** Handle to the surface manager object we interact with */
    private boolean hasSurface;

        class SurfThread extends Thread {

        private int mCanvasWidth = -1;
        private int mCanvasHeight = -1;

        /** !!! Message handler used by thread to interact with TextView */
        // private Handler mHandler;

        /** Used to figure out elapsed time between frames */
        private long mLastTime;

         /** The state of the game. One of READY, RUNNING, PAUSE,
 LOSE, or WIN */
        private int mMode;

        /** Scratch rect object. */
        private RectF mScratchRect;

                Paint mPaint = new Paint();

                int transparent_white;

            /** Indicate whether the surface has been created  is ready to 
 draw */
        private boolean mRunning = false;
                public boolean is_drawing = false;

                private 

[android-developers] Re: JPEG PixelFormat

2009-04-24 Thread Yusuf T. Mobile

Since the API does not mention color space consistency, the only
assumption you can make about the JPEG data returned is that is is
JPEG data. Or, according to the documentation, it could be null.


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.




On Apr 23, 11:20 pm, Sheado chad...@gmail.com wrote:
 Hi,

 Is the JPEG image returned by Camera.takePicture(...) always going to
 be in the same color space, regardless of the phone Android is on?

 Thank in Advance!

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



[android-developers] new object position after canvas.rotate()

2009-04-24 Thread Andrea

Hi all,
I need to know the coordinates of a drawable object after its
rotation?
Here the code (ball is Drawable):

 canvas.save();
 canvas.rotate(degree, pivot_x,pivot_y);
  ball.setBounds(...);
  ball.draw(canvas);
 canvas.restore();

What are new coordinates of the ball? I tried with ball.getBounds()
but it contains original coordinates.
Thank you all

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread nEx.Software

So, if I understand this all correctly... Those of us who have paid
for an app to toggle settings for us, specifically - Power Manager
(which, by the way, is currently the 2nd most popular Paid
Application), have thrown away our money since we will be prompted to
allow changes for some of the settings every time the application
wants to change them? Man, I am glad this app was only $0.99,
otherwise I'd be really ticked off. Not to mention that I will not be
able to conserve battery life as well as I do now, meaning that this
effort to help users conserve battery life actually hurts me (and
10,000 - 50,000 other users who have purchased Power Manager).

On Apr 24, 10:48 am, Tom Gibara m...@tomgibara.com wrote:
  ... The GPS hardware will only actually be powered up if someone is

 asking to get data from it Another way to look at this -- the GPS 
 setting is primarily there for
  privacy, to allow users to determine whether is okay -at
  all- for anyone to be getting the fine-grained information
  about where they are.

 So it's really unfortunate that the explanation for the GPS setting reads:
 deselect to conserve battery, it gives every user I've discussed it with
 the impression that enabling the setting will drain their battery faster
 independently of what applications choose to do. This is enforced the
 absence of similar indications for other settings.

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



[android-developers] Re: URGENT!!!!! Can't update apps in android market!!!

2009-04-24 Thread Hw3699


What's your solution? I got the same issure.

manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.innersocial.planner
  android:versionCode=1
  android:versionName=1.1.1
uses-sdk android:minSdkVersion=1/uses-sdk


It doesn't work.


On Apr 24, 1:14 pm, havexz bali.param...@gmail.com wrote:
 This is the right solution.but why such a wierd but Google only
 knows..:)
 I also faced the same problem and tried different combination and then
 it worked fine finally.

 On Apr 24, 10:38 am, yhfudev yhfu...@gmail.com wrote:



  You may move the
  uses-sdk android:minSdkVersion=1/uses-sdk
  to the first line, after the manifest 

  On Apr 24, 6:04 am, s...@zooropa.com s...@zooropa.com wrote:

   Okay I just sent a message to Google we'll see what they say.

   On Apr 24, 6:17 am, Al Sutton a...@funkyandroid.com wrote: There's 
   little the people on this list can do to help you with the inner
workings of Market. Your best option would be to try and contact Google.

Al.

---

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

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

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

-Original Message-
From: android-developers@googlegroups.com

[mailto:android-develop...@googlegroups.com] On Behalf Of Yan Shi
Sent: 24 April 2009 09:15
To: Android Developers
Subject: [android-developers] Re: URGENT! Can't update apps in 
android
market!!!

Anyone please?

On Apr 24, 2:16 pm, Yan Shi shiyansu...@gmail.com wrote:
 When I upload an apk update for one of my apps(Hello Yahoo), I was
 told that Market requires the minSdkVersion to be set in
 AndroidManifest.xml.. So I can't do the update!

 I already set this attribute in AndroidManifest.xml. What's wrong??

 I even set it to uses-sdk minSdkVersion=3 /, but still I can't do
 the update.

 Has anyone met this problem?

 BTW, when I go tohttp://market.android.com/publish/Hometoday, I have
 accepted Term and Service again. I think already accepted it the first
 time I registered for it. Why should I accept it again?

 Could any google stuff look into this please?

 Thanks very much- Hide quoted text -

  - Show quoted text -- Hide quoted text -

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Al Sutton

I wouldn't worry, you can always do a chargeback on your credit card for
power manager and Google will approve it through and fine the developer $3
all without asking them...

Nice... Not.

Al. 

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of nEx.Software
Sent: 24 April 2009 20:01
To: Android Developers
Subject: [android-developers] Re: Android v. 1.5 = FAIL #2: Directly
Manipulating Settings


So, if I understand this all correctly... Those of us who have paid for an
app to toggle settings for us, specifically - Power Manager (which, by the
way, is currently the 2nd most popular Paid Application), have thrown away
our money since we will be prompted to allow changes for some of the
settings every time the application wants to change them? Man, I am glad
this app was only $0.99, otherwise I'd be really ticked off. Not to mention
that I will not be able to conserve battery life as well as I do now,
meaning that this effort to help users conserve battery life actually hurts
me (and 10,000 - 50,000 other users who have purchased Power Manager).

On Apr 24, 10:48 am, Tom Gibara m...@tomgibara.com wrote:
  ... The GPS hardware will only actually be powered up if someone is

 asking to get data from it Another way to look at this -- the GPS 
 setting is primarily there for
  privacy, to allow users to determine whether is okay -at
  all- for anyone to be getting the fine-grained information about 
  where they are.

 So it's really unfortunate that the explanation for the GPS setting reads:
 deselect to conserve battery, it gives every user I've discussed it 
 with the impression that enabling the setting will drain their battery 
 faster independently of what applications choose to do. This is 
 enforced the absence of similar indications for other settings.

 Tom.



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



[android-developers] Can't upload apps in android market!!!

2009-04-24 Thread Hw3699


When I uploaded an apk of new application, I was
told that Market requires the minSdkVersion to be set in
AndroidManifest.xml..

I already set this attribute in AndroidManifest.xml. What's wrong??

manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.innersocial.planner
  android:versionCode=1
  android:versionName=1.1.1
uses-sdk android:minSdkVersion=2/uses-sdk
.


Anyone have solution for this issure?

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



[android-developers] Re: 1.5 and bluetooth call button

2009-04-24 Thread Nick Pelly
Move to android-discuss please. This list is for people developing
applications.

On Fri, Apr 24, 2009 at 6:32 AM, bw ben.weisb...@gmail.com wrote:


 Hi,

 Does the 1.5 update fix/enable using bluetooth headsets' call button -
 (eg. hold the button down to start voice dialer, press to pick up a
 call, press to end call)?
 This doesn't seem to work in the current version of android.

 Thanks
 -Ben


 


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



[android-developers] Re: JPEG PixelFormat

2009-04-24 Thread Streets Of Boston

If any assumption has to be made, the JPEG data is likely to be in
sRGB colorspace, which is most widely used, especially for online
viewing.

Usually, if an RGB file (JPEG/PNG/TIFF) is read without ICC data, sRGB
is assumed.

I doubt the quality of G1's camera is good enough to warrant adobeRGB
or a colorspace with even a wider gamut.

But, you never know for future phones: I hope that future phones, that
do embed colorspace info, will do so by automatically embedding the
correct colorspace or colorprofile in the JPEG data (the byte[]).


On Apr 24, 2:20 am, Sheado chad...@gmail.com wrote:
 Hi,

 Is the JPEG image returned by Camera.takePicture(...) always going to
 be in the same color space, regardless of the phone Android is on?

 Thank 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] Next Focus and the Soft Keyboard

2009-04-24 Thread Brian Conrad

I have a form that is working fine with the Next flow order when using 
the computer keyboard with emulator (and probably with the keyboard on 
the G1) but not with the SoftKeyboard with 1.5.  Some fields indicate 
Next with this keyboard,  some go to the correct field and others 
don't.  Two of the fields are text and they only give a carriage return 
instead of Next.  My numeric fields give the proper Next key.   Use 
of the SoftKeyboard is a little underdocumented so far (if there is a 
hidden doc online somewhere please provide me a link to it).   There are 
also some added fields under 1.5 that I have asked about previously but 
received no answer.  These appear to have something to do with the 
SoftKeyboard.  Though these can be set programmatically I haven't seen 
the proper way to set these flags using XML.   This field is the one 
that replaces Numeric which deprecated.

- Brian




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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-24 Thread Tom Gibara
I don't want to single out any particular app, but conversely should a
developer sell an application that can't be supported in the future because
it uses an undocumented API?
Tom.

2009/4/24 Al Sutton a...@funkyandroid.com


 I wouldn't worry, you can always do a chargeback on your credit card for
 power manager and Google will approve it through and fine the developer $3
 all without asking them...

 Nice... Not.

 Al.

 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of nEx.Software
 Sent: 24 April 2009 20:01
 To: Android Developers
 Subject: [android-developers] Re: Android v. 1.5 = FAIL #2: Directly
 Manipulating Settings


 So, if I understand this all correctly... Those of us who have paid for an
 app to toggle settings for us, specifically - Power Manager (which, by the
 way, is currently the 2nd most popular Paid Application), have thrown away
 our money since we will be prompted to allow changes for some of the
 settings every time the application wants to change them? Man, I am glad
 this app was only $0.99, otherwise I'd be really ticked off. Not to mention
 that I will not be able to conserve battery life as well as I do now,
 meaning that this effort to help users conserve battery life actually hurts
 me (and 10,000 - 50,000 other users who have purchased Power Manager).

 On Apr 24, 10:48 am, Tom Gibara m...@tomgibara.com wrote:
   ... The GPS hardware will only actually be powered up if someone is
 
  asking to get data from it Another way to look at this -- the GPS
  setting is primarily there for
   privacy, to allow users to determine whether is okay -at
   all- for anyone to be getting the fine-grained information about
   where they are.
 
  So it's really unfortunate that the explanation for the GPS setting
 reads:
  deselect to conserve battery, it gives every user I've discussed it
  with the impression that enabling the setting will drain their battery
  faster independently of what applications choose to do. This is
  enforced the absence of similar indications for other settings.
 
  Tom.



 


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



[android-developers] Re: Accessing System Brightness

2009-04-24 Thread guruk

hmm but i also dont like that so much.

for example right now i was thinking to write a simple app just
changing the brightness
in a simple way. not just for a window, for the whole system.

Often I am out and just like a simple change brightness, without
searching through
the setup (imagine i am in the sun and already dont see anything) so
even 2 steps
are far away.

anyhow.. is there an intent how i can easily open the popup where i
can change the
system brightness?

thanks
chris


On Apr 16, 11:40 am, Dianne Hackborn hack...@android.com wrote:
         // Make the screen full bright for this activity.
         WindowManager.LayoutParams lp = getWindow().getAttributes();
         lp.screenBrightness = 1.0f;

         getWindow().setAttributes(lp);





 On Wed, Apr 15, 2009 at 10:21 PM, SR stan.r...@gmail.com wrote:

  Dianne,

  Would you mind sharing a snippet of code on how to do this in Cupcake
  using the new API?

  Thanks!

  Stan

  On Apr 8, 3:49 pm, Dianne Hackborn hack...@android.com wrote:
   There is a new API to be able to force the screen brightness while your
   window is on-screen.

   On Wed, Apr 8, 2009 at 12:08 PM, Todd Sjolander guyfantas...@gmail.com
  wrote:

 --
 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: Possible bug in parcelling of Uri instances

2009-04-24 Thread Tom Gibara
In the absence of any further information, I've simply filed a bug:
http://code.google.com/p/android/issues/detail?id=2509

I have found a workaround though which is to 'transform' any Uri of unknown
providence before parcelling it, like so:

Uri.parse(uri.toString())

(Still puzzled by why I seem to be the only person to have encountered this
issue.)

Tom.

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



[android-developers] Can't upload my app in the market ! Market requires the minSdkVersion to be set in AndroidManifest.xml.

2009-04-24 Thread 6real

Dear all,
since today I have the following clear message :

Market requires the minSdkVersion to be set in AndroidManifest.xml.

but my manifest has the line :
uses-sdk minSdkVersion=2 /

and I also tried even  uses-sdk minsdkversion=2 /...

I try to put this line :
as the first child of manifest, as the last child and also right after
application..

Can you please help me ? Is there a hidden rule I don't know ...

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



[android-developers] Re: Next Focus and the Soft Keyboard

2009-04-24 Thread Dianne Hackborn
You may not have seen the blog post:

http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html

On Fri, Apr 24, 2009 at 12:40 PM, Brian Conrad brianjto...@gmail.comwrote:


 I have a form that is working fine with the Next flow order when using
 the computer keyboard with emulator (and probably with the keyboard on
 the G1) but not with the SoftKeyboard with 1.5.  Some fields indicate
 Next with this keyboard,  some go to the correct field and others
 don't.  Two of the fields are text and they only give a carriage return
 instead of Next.  My numeric fields give the proper Next key.   Use
 of the SoftKeyboard is a little underdocumented so far (if there is a
 hidden doc online somewhere please provide me a link to it).   There are
 also some added fields under 1.5 that I have asked about previously but
 received no answer.  These appear to have something to do with the
 SoftKeyboard.  Though these can be set programmatically I haven't seen
 the proper way to set these flags using XML.   This field is the one
 that replaces Numeric which deprecated.

 - Brian




 



-- 
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: new object position after canvas.rotate()

2009-04-24 Thread Dianne Hackborn
You'll have to compute that yourself, it is the canvas applying the
transforamtion, the Drawable knows nothing about it.

(Btw, doing setBounds() every time you draw is not desired...  if you are
writing a game like thing with a moving pull I would generally recommend
dumping the Drawable abstraction and just directly drawing bitmaps.)

On Fri, Apr 24, 2009 at 11:50 AM, Andrea andrea.pai...@gmail.com wrote:


 Hi all,
 I need to know the coordinates of a drawable object after its
 rotation?
 Here the code (ball is Drawable):

  canvas.save();
  canvas.rotate(degree, pivot_x,pivot_y);
  ball.setBounds(...);
  ball.draw(canvas);
  canvas.restore();

 What are new coordinates of the ball? I tried with ball.getBounds()
 but it contains original coordinates.
 Thank you all

 Andrea
 



-- 
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: Android 1.5: How to get the BT state?

2009-04-24 Thread Nick Pelly
On Fri, Apr 24, 2009 at 7:09 AM, code_android_festival_way 
festival.s...@googlemail.com wrote:


 At the moment I am trying to update my application to Android 1.5.

 In Android 1.1 I was able to detect the BT state with catching the
 following broadcasts:

 action android:name=android.bluetooth.intent.action.ENABLED /
 action android:name=android.bluetooth.intent.action.DISABLED /
 action
 android:name=android.bluetooth.intent.action.REMOTE_DEVICE_FOUND /
 action
 android:name=android.bluetooth.intent.action.REMOTE_DEVICE_DISCONNECTED /
 
 action
 android:name=android.bluetooth.intent.action.REMOTE_DEVICE_CONNECTED /
 
 action
 android:name=android.bluetooth.intent.action.BONDING_CREATED /

 After testing with Android 1.5 I recognized that only:

 action
 android:name=android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED /
 


1) These are not part of the public API. If you use them it is at your own
risk, and your app will probably break again going forward beyond cupcake.

2) Your question is easily answered by looking at the source.

/** Broadcast when the local Bluetooth device state changes, for example
 *  when Bluetooth is enabled. Will contain int extra's BLUETOOTH_STATE
and
 *  BLUETOOTH_PREVIOUS_STATE. */
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String BLUETOOTH_STATE_CHANGED_ACTION =
android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED;





 is available.

 How can I detect the specific state of Bluetooth in 1.5? With the
 settings I can only differentiate between BT on and off.

 I'm looking forward reading your answer.

 


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

2009-04-24 Thread Dave Sparks

Is this on the emulator? If so, it may be a limitation of the
emulator.

On Apr 24, 3:25 am, szabolcs szabolcs.vr...@gmail.com wrote:
 Steven,

 Thank you for your reply.

 I know AudioRecord works with a sample frequency of 8000Hz. In my
 initial post I was asking why this frequency is the ONLY frequency
 that works?!

 BTW, there is no exception thrown when the initialization of
 AudioRecord fails. I figured you are supposed to check that yourself
 by something like:
 if(mRecord.getState()==AudioRecord.STATE_INITIALIZED), not a try-catch
 block.

 So again: the question is, why does the initialization fail, if I
 supply the constructor with AUDIO_SAMPLE_FREQ= 11025 || 22050 ||
 44100?

 Thank you,

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



  1   2   >