[android-developers] Re: phone number of outgoing call.

2009-10-24 Thread Nemat

Hey Honest.

I m looking for the same thing.
I want the dialled outgoing call number.Have u got it done?
pl help me..
Thanx in advance
Nemat


On Oct 21, 5:20 pm, Honest honestsucc...@gmail.com wrote:
 Hello,

 I used phoneStateListener and telephonyManager togetthe state ofoutgoingand 
 incoming call but duringoutgoingcall it is not passingnumberin public void  
 onCallStateChanged (int state, String
 incomingNumber). Is there any work around of it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: updatePeriodMillis not working for widget on 1.6

2009-10-24 Thread Beth

Here is a related question.  Are there other reasons to say the Alarm
service is unreliable?
My app uses repeating alarms.  It was great with 1.5, very reliable.
Since the upgrade to 1.6, the phone seems to be dropping some of my
repeating broadcasts.  I do not have any task killer programs, or at
least I did not knowingly install any.

Notice that I use unique requestCodes in the creation of my
PendingIntent (children.getInt(0) in the code snippet below) to insure
that the correct number of distinct alarms is created and to cancel
any of those alarms at a later point in time, should that become
necessary.  Has the use of the requestCode parameter changed with the
1.6 SDK?

almMgr.setRepeating (AlarmManager.RTC_WAKEUP,
 cal.getTimeInMillis(),
 SchedulerActivity.WEEKINMILLIS,
 PendingIntent.getBroadcast(ctxt,
children.getInt(0), new Intent(ctxt, SoundOffTimer.class),
 PendingIntent.FLAG_UPDATE_CURRENT));
children.moveToNext();

The dropped broadcast behavior is intermittent.  When the timer is a
one shot, it seems to work correctly.  I am wondering if others on the
list have seen issues with the setRepeating method.  I am also looking
for suggestions for troubleshooting this problem.  How can I determine
if the problem is the broadcast, if it is the repeating alarm
creation, or if there is some other issue like low memory coming in to
play.  Any ideas?

Thanks and regards,
Beth


On Oct 23, 6:15 pm, Dianne Hackborn hack...@android.com wrote:
 On Fri, Oct 23, 2009 at 6:16 AM, String sterling.ud...@googlemail.comwrote:

  I'm already using alarms to drive my widget updates. Problem is,
  alarms are unreliable, especially with the proliferation of task
  killer apps which abuse the API (see

 http://groups.google.com/group/android-developers/browse_thread/threa...
  ).
  People have these running in the background, then I get complaints
  that my clock has stopped.

 Well the underlying problem there is these #$#$#!! apps abusing that API.

 I so regret having made that available.  I should have realized it was a bad
 idea, because it violates a very basic tenant: one application should not be
 able to disrupt the behavior of another.

 Anyway, if possible it would be great if you chould tell your users that
 their task killer app is causing their problems.  And it's not going to just
 cause problems with alarms: it will unpost any notifications you have, stop
 services you have running, etc.

 --
 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: White screen in my OpenGL application

2009-10-24 Thread Steff

Hi

Well I use my own GLSurfaceView:
public class GLSurfaceView extends SurfaceView implements
SurfaceHolder.Callback

I did not know that a GLSurfaceView was added to the SDK. I will
consider starting to use that, but I am pretty sure that it is not the
problem right now. Or do you think it is? Remember that my own
GLSurfaceView used to work, and it still works without
PixelFormat.RGBA_.

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



[android-developers] Re: Context Menu

2009-10-24 Thread Neilz


 if you want your context menu to popup on single item selection then
how would you scroll very long list?

Having thought about it, I Don't agree with this... It's perfectly
usual for android to behave in this way. Think about when you are
scrolling through the apps how easy it is to open one of them by
mistake. You just have to get used to the touch sensitivity of the
screen and get better at scrolling, or selecting.

So, back to my original problem. If you can't adjust the sensitivity
required (I don't believe you can't!) to activate a ContextMenu, what
other options are there to pop up a menu?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 to calculate yaw,pitch,roll from x,y,z magnetic field values alone?

2009-10-24 Thread DD

Thanks Scott. Yes, you are right. the Android API is calculating the
orientation by using the mag and gravity(acceleration), and this is
why the orientation is affected (strongly affected) by the
acceleration. So just wondering if you have any idea to get the pure
acceleration data without gravity involved?meaning at any time the
phone only shows the net moving acceleration of the phone without G
added on. Thank you!

On Oct 19, 5:46 am, Scott snietf...@gmail.com wrote:
 I'm afraid it's not mathematically possible to generate a full
 attitude solution from a single vector observation (mag vector,
 gravity vector, etc..). There simply isn't enough information there.
 It doesn't matter if you're not pointed along the mag field, you will
 still only get a partial attitude solution in the shape of a cone
 centered around the mag field. This has been an issue in the aerospace
 industry for a while now, and usually the problem is solved by
 combining information from two or more sensors. In this case, the
 Android API is probably using the mag field and what it assumes is a
 gravity vector from the accelerometer (that's why the solution is
 affected by external accelerations).

 If you're interested in how to generate an attitude solution from two
 vector observations, you should look up the TRIAD algorithm for
 attitude determination.

 Cheers,
 Scott

 On Oct 12, 4:25 am, DD daviddiaofri...@gmail.com wrote:



  Hi, is it possible to calculate yaw,pitch,roll solely from x,y,z
  magnetic field values obtained from the magnetometer, for example,
  according to physics? How? Thanks a lot!- 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: Gracefully destroying Dialog box

2009-10-24 Thread Neilz

Oh well. Maybe I should raise it as a bug, as this is a problem to me,
and it seems there should be a standard method to the effect of
alert.close();

On Oct 23, 1:02 pm, Neilz neilhorn...@googlemail.com wrote:
 Hi. I have an activity which pops up a Dialog box, to get some text
 input from the user. The problem arises when you switch orientation.
 The Dialog disappears, so I have added code to set and check flags in
 the savedInstanceState, meaning that the Dialog is displayed again in
 these circumstances.

 However, the dialog isn't being closedgracefullywhen the orientation
 is switched. I get the following error:

 10-23 12:53:54.385: ERROR/WindowManager(2852): Activity
 com.bla.bla.Bla has leaked window
 com.android.internal.policy.impl.phonewindow$decorv...@435ceda0 that
 was originally added here
 10-23 12:53:54.385: ERROR/WindowManager(2852):
 android.view.WindowLeaked: Activity com.bla.bla.Bla has leaked window
 com.android.internal.policy.impl.phonewindow$decorv...@435ceda0 that
 was originally added here

 I know when the window is going to be closed, but can't find a way of
 closing it manually. I open it with alert.show();  ...but there
 doesn't seem to be any corresponding alert.destroy() method or
 similar.

 Any ideas how I can manually close the dialog box without user input?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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.6: GPS location provider stop unexpectedly (exceeded MIN_FIX_COUNT), bouncing back and forth

2009-10-24 Thread Lance Nanek

multiple listeners for a location provider with different minTime intervals - 
which value should be used

Looks like the current implementation uses the shortest value for that
situation:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/LocationManagerService.java;h=3f268c933f14fabc0950657b43d7e4df1e463cf8;hb=63abad7ed389aea8eef75786d3628cfb288988dd#l806

Seems like an OK decision there from some quick tests. I called
requestLocationUpdates for two listeners. One with a power conserving
hint argument of 30 seconds. The other with 60 seconds. Both listeners
got the same update frequency. In number of seconds between
onLocationChanged calls:
1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
37, ...

Corresponding to occasional ~30 second shutdowns. Once I called
removeUpdates for the listener that was registered for 30 seconds,
then the listener registered for 60 seconds started getting what it
would normally get:
2, 1, 69, 1, 1, 3, 1, 2, 1, 2, 1, 2, 1, 70, 1, 1, 2, 1, 2, 1, 2,
1, ...

~60 second shutdowns. End result, the listener that was registered
saying it is OK with ~60 second shutdowns never actually has to wait
that long if there is another listener registered that wants more
frequent updates. Meanwhile the one that wants the most frequent
updates gets what it normally would.

On Oct 23, 10:30 am, JP joachim.pfeif...@gmail.com wrote:
 (Refers to the logs) This occurs every 3s, although minTime is much
 higher, just as you've found. I will venture to say that this is
 harder on the battery than to just let GPS stand.
 BTW, resting a location provider this way is also mis-spec'ed. If an
 app registers multiple listeners for a location provider with
 different minTime intervals - which value should be used to control
 the location provider?
 It certainly isn't in line with 1.5 behavior, or with anything I've
 seen on any device.

 I suppose I can't be sold on this being a feature, not a bug.

 On Oct 22, 11:40 pm, Lance Nanek lna...@gmail.com wrote:

  Is this behavior hurting an app you use/wrote in some way? It seems
  within spec.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Gracefully destroying Dialog box

2009-10-24 Thread Lance Nanek

You can close a dialog using its dismiss() method :
http://developer.android.com/intl/fr/reference/android/app/Dialog.html#dismiss%28%29

You might want to consider having the activity manage restoring your
dialog for you as well:
http://developer.android.com/intl/fr/reference/android/app/Activity.html#onCreateDialog%28int%29

On Oct 24, 4:45 am, Neilz neilhorn...@googlemail.com wrote:
 Oh well. Maybe I should raise it as a bug, as this is a problem to me,
 and it seems there should be a standard method to the effect of
 alert.close();

 On Oct 23, 1:02 pm, Neilz neilhorn...@googlemail.com wrote:

  Hi. I have an activity which pops up a Dialog box, to get some text
  input from the user. The problem arises when you switch orientation.
  The Dialog disappears, so I have added code to set and check flags in
  the savedInstanceState, meaning that the Dialog is displayed again in
  these circumstances.

  However, the dialog isn't being closedgracefullywhen the orientation
  is switched. I get the following error:

  10-23 12:53:54.385: ERROR/WindowManager(2852): Activity
  com.bla.bla.Bla has leaked window
  com.android.internal.policy.impl.phonewindow$decorv...@435ceda0 that
  was originally added here
  10-23 12:53:54.385: ERROR/WindowManager(2852):
  android.view.WindowLeaked: Activity com.bla.bla.Bla has leaked window
  com.android.internal.policy.impl.phonewindow$decorv...@435ceda0 that
  was originally added here

  I know when the window is going to be closed, but can't find a way of
  closing it manually. I open it with alert.show();  ...but there
  doesn't seem to be any corresponding alert.destroy() method or
  similar.

  Any ideas how I can manually close the dialog box without user input?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 i specially forbids switching orientation when rotating phone on my app?

2009-10-24 Thread Philip

When i chick a button on my app , the method below will be happened.

if(android.provider.Settings.System.getInt(getContentResolver
(),Settings.System.ACCELEROMETER_ROTATION, 0) == 1) {
android.provider.Settings.System.putInt(getContentResolver
(),Settings.System.ACCELEROMETER_ROTATION, 0);
}

Here i want to forbids switching orientation when rotating phone.
Also i hope the screen orientation will not be changed.
But when here is horizontal screen mode, the screen orientation will
be changed to vertical mode automatically .
That's not what i want.
Any suggestions?

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



[android-developers] The file extension and read per mission issue Hi, I am in the problem about reading data fr om some new file extensions, the problem is fis.read() gets -1 from the first run wit

2009-10-24 Thread 100town

Hi,

I am in the problem about reading data from some new file extensions,
the problem is fis.read() gets -1 from the first run without and
exceptions being thrown. Check the code below:
String path = “/sdcard/wanshuiqianshan.lrc”;
java.io.FileInputStream fis = null;
try{
fis= new java.io.FileInputStream(path);
int c=0;
StringBuffer sb=new StringBuffer();
while(((c=fis.read())!=-1)){
sb.append((char)c);
}
Log.e(INFO, Here 1”);
return sb.toString();
}catch(Exception ioe){
Log.e(EROOR, file: +path, ioe);
return null;
}finally{
try{
fis.close();
}catch(Exception e){
}
}
If I change the file extension to “txt”, everything is all right. I
debugged into the android source then the code running into the native
C code so not any clue was found.

I searched in the group. Only some discuss leads to the cycle about
mime-type and file extensions which cannot help me.
I guess it is a build-in security mechanism about the undefined file
extension types. Can anybody 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: The file extension and read permission issue Hi, I am in the problem about reading dat a from some new file extensions, the problem is fis.read() g ets -1 from the first run

2009-10-24 Thread Mark Murphy

100town wrote:
 Hi,
 
 I am in the problem about reading data from some new file extensions,
 the problem is fis.read() gets -1 from the first run without and
 exceptions being thrown. Check the code below:
 String path = “/sdcard/wanshuiqianshan.lrc”;
 java.io.FileInputStream fis = null;
   try{
   fis= new java.io.FileInputStream(path);
   int c=0;
   StringBuffer sb=new StringBuffer();
   while(((c=fis.read())!=-1)){
   sb.append((char)c);
   }
   Log.e(INFO, Here 1”);
   return sb.toString();
   }catch(Exception ioe){
   Log.e(EROOR, file: +path, ioe);
   return null;
   }finally{
   try{
   fis.close();
   }catch(Exception e){
   }
   }
 If I change the file extension to “txt”, everything is all right. I
 debugged into the android source then the code running into the native
 C code so not any clue was found.
 
 I searched in the group. Only some discuss leads to the cycle about
 mime-type and file extensions which cannot help me.
 I guess it is a build-in security mechanism about the undefined file
 extension types. Can anybody help? Thanks.

The lrc-txt file extension change makes no sense to me.

That being said, try a better file-reading algorithm and see if it helps:

http://exampledepot.com/egs/java.io/ReadLinesFromFile.html

-- 
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: The file extension and read permission issue

2009-10-24 Thread 100town

I did it. The same problem.

 The lrc-txt file extension change makes no sense to me.

 That being said, try a better file-reading algorithm and see if it helps:

 http://exampledepot.com/egs/java.io/ReadLinesFromFile.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] how to get the postal addressed in Contacts

2009-10-24 Thread sam

Hi guys,

Does anybody have any sample code to access/get the postal addressed
of a contact using Contact API?
I searched the sdk doc but did not find enough info to do this.

Thanks for any help you can provide.

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



[android-developers] Re: The file extension and read permission issue

2009-10-24 Thread Mark Murphy

100town wrote:
 I did it. The same problem.

I just tried modifying one of my book samples to read and write .lrc
files, and I ran into no trouble, using the same algorithm that I linked
to in my previous reply. I tested this on an Android 1.6 emulator and a
T-Mobile G1 running Android 1.6.

The only difference is that I store my file in app-private local storage
(openFileInput(), openFileOutput()) rather than on the SD card.

Since .lrc files have meaning to media players, perhaps there is
something in your device or emulator that is watching for .lrc files in
the SD card and has some sort of write lock on it.

You might consider putting your file not in the root of the SD card, but
in a dot-prefixed directory (e.g., /sdcard/.something/your.lrc). That is
standard trick on Linux to lightly hide things. In particular, I know
that the media scanner in Android does not scan inside such directories.

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

_Android Programming Tutorials_ Version 1.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] help! Odd behavior with a search activity

2009-10-24 Thread Satya Komatineni

I have a package with two activities

1. A main activity
2. A search activity

The search activity is invoked by a search suggestion provider in two
possible ways

1. By clicking directly on a suggestion invoking the search activity
through a VIEW action
2. By clicking on the explicit search icon invoking the activity
through SEARCH action

If it is invoked through SEARCH I stay on the search activity and show
some text to the user. Now when I click the back button I go back
CORRECTLY to the home page.

ODD Behaviour:
However if I came to the search activity through the VIEW, I invoke a
browser activity and call finish() on the search activity. Now I have
the browser in my view. If I now go back I would expect to go back to
teh device home page. But from now where the main activity is
showing up.

I see in the logcat a message from ActivityManager indicating

moveTaskToBack: 8

I have tried various flags to invoke the browser activity
the tried flags include

new task
previous is top

and I have also tried both a singleTop and otherwise with the
SearchActivity as well.

Same end result.

Thanks for your insight on this one
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: The file extension and read permission issue

2009-10-24 Thread 100town

Sorry everybody.
It turn out the file I push into sdcard is an empty file. I don't know
why. But I use another lrc file so it is allright now.
So administrator please remove this topic to save other people's time
if possible.


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



[android-developers] Slow time zone name loading

2009-10-24 Thread Wouter

Hey,

I am using the twitter4j api to get tweets but it takes to long to get
the result.
When I see at the log files i see this:

10-24 16:29:19.300: INFO/Resources(12924): Loaded time zone names for
en_US in 2265ms.

And that per tweet. So it takes a long time before it loads this.

I have tested this on my Htc Hero (1.5) and it takes long and on the
emulator with 1.6 it goes fast and normal.
How can this be fixed for 1.5? It takes too long to load this all.

Thank you,

Wouter

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



[android-developers] Re: Slow time zone name loading

2009-10-24 Thread Mark Murphy

Wouter wrote:
 I am using the twitter4j api to get tweets but it takes to long to get
 the result.
 When I see at the log files i see this:
 
 10-24 16:29:19.300: INFO/Resources(12924): Loaded time zone names for
 en_US in 2265ms.
 
 And that per tweet. So it takes a long time before it loads this.

AFAIK, it should only do this once per process in Android 1.5.

 How can this be fixed for 1.5?

Directly, it can't. The underlying problem is that you are trying to
format (or perhaps parse) a date and using stuff like SimpleDateFormat.
That is what triggers the time-zone data load.

Read more here:

http://code.google.com/p/android/issues/detail?id=3147

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

Android Training in Germany, 18-22 January 2010: http://bignerdranch.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: Slow time zone name loading

2009-10-24 Thread Wouter

I am only using the twitter4j api and I never use SimpleDateFormat
myself.

And I have this problem also when I use another api for twitter
(jtwitter).

This is my code (a part of):
client=new Twitter(user, password);

Query query = new Query(surrogates);
QueryResult result;
try {
result = client.search(query);

for (Tweet tweet : result.getTweets()) {
model.add(new 
TimelineEntry(tweet.getFromUser(),
tweet.getCreatedAt().toString(), tweet.getText(),
tweet.getProfileImageUrl()));
}
} catch (TwitterException e) {
e.printStackTrace();
}

What is the problem for 1.5 and why does this works for 1.6?

Are do you have another API for twitter I can use or some examples? I
have used your thumbnailadapter (as example for Twitter).

Wouter

On Oct 24, 4:46 pm, Mark Murphy mmur...@commonsware.com wrote:
 Wouter wrote:
  I am using the twitter4j api to get tweets but it takes to long to get
  the result.
  When I see at the log files i see this:

  10-24 16:29:19.300: INFO/Resources(12924): Loaded time zone names for
  en_US in 2265ms.

  And that per tweet. So it takes a long time before it loads this.

 AFAIK, it should only do this once per process in Android 1.5.

  How can this be fixed for 1.5?

 Directly, it can't. The underlying problem is that you are trying to
 format (or perhaps parse) a date and using stuff like SimpleDateFormat.
 That is what triggers the time-zone data load.

 Read more here:

 http://code.google.com/p/android/issues/detail?id=3147

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

 Android Training in Germany, 18-22 January 2010:http://bignerdranch.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] 1.6 vs setPictureSize

2009-10-24 Thread enervatron

Before 1.6:

Camera.Parameters parameters = mCamera.getParameters();
parameters.setPictureSize(640, 480);

Would deliver me a 640 by 480 image from the Camera.

As of the 1.6 OS upgrade on my G1 (it doesn't matter whether the
SDK is 1.5 or 1.6) is sends me 2048x1536 pixel images.

This is extremely painful especially in light of the fact that there is no
way to scale images this big (BitmapFactory pukes on images that
large) that I know of.

I imagine that Camera users that upload their pictures to the net with
5 megapixel cameras are going to be even more unhappy, but I'm pretty
unhappy as it is.

Mike

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



[android-developers] Re: Slow time zone name loading

2009-10-24 Thread Mark Murphy

Wouter wrote:
 What is the problem for 1.5 and why does this works for 1.6?

See the issue I linked to in the previous message.

 Are do you have another API for twitter I can use or some examples? I
 have used your thumbnailadapter (as example for Twitter).

Well, I use JTwitter in my books.

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

Android Training in Germany, 18-22 January 2010: http://bignerdranch.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] Out of surface memory in WVGA

2009-10-24 Thread a1

I'm testing my application on WVGA854 emulator. I use two activities
with GL surface one is a menu and second is game itself. While
launching game in logcat there is a message about out of memory error
and application is killed:

10-24 12:42:49.860: DEBUG/Blockx.GameController(900): Surface created
10-24 12:42:49.890: ERROR/SurfaceFlinger(577): not enough memory for
layer bitmap size=1642496 (w=480, h=854, stride=480, format=1)
10-24 12:42:49.890: DEBUG/MemoryDealer(577):   LayerBitmap (0x2e9350,
size=8388608)
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 0: 002e9388 |
0x | 0x0003E000 | F
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 1: 00373ab0 |
0x0003E000 | 0x00191000 | A
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 2: 00373b78 |
0x001CF000 | 0x00191000 | A
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 3: 0028bd40 |
0x0036 | 0x0003E000 | F
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 4: 002ce748 |
0x0039E000 | 0x00059000 | A
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 5: 002ce7c0 |
0x003F7000 | 0x00059000 | A
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 6: 00374bb0 |
0x0045 | 0x00191000 | A
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 7: 00375ec8 |
0x005E1000 | 0x00059000 | A
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 8: 00377c30 |
0x0063A000 | 0x00059000 | A
10-24 12:42:49.890: DEBUG/MemoryDealer(577): 9: 00377d50 |
0x00693000 | 0x0016D000 | F
10-24 12:42:49.890: DEBUG/MemoryDealer(577):   size allocated: 6385664
(6236 KB)
10-24 12:42:49.900: ERROR/SurfaceFlinger(577): resizing buffer 1 to
(480,854) failed [fff4] Unknown error: -12
10-24 12:42:49.930: ERROR/SurfaceComposerClient(577): surface (id=0,
identity=12) is invalid, err=-12 (Out of memory)
10-24 12:42:49.940: WARN/WindowManager(577): Failure showing surface
Surface(native-token=3635864) in Window{43886518
com.beepstreet.blockx_trial/com.beepstreet.blockx_trial.GameActivity
paused=false}
10-24 12:42:49.940: INFO/WindowManager(577): Out of memory for
surface!  Looking for leaks...
10-24 12:42:49.960: WARN/WindowManager(577): No leaked surfaces;
killing applicatons!
10-24 12:42:49.960: WARN/ActivityManager(577): Killing processes for
memory at adjustment 0
10-24 12:42:49.960: WARN/ActivityManager(577): Killing for memory:
ProcessRecord{438d9618 900:com.beepstreet.blockx_trial/10023} (adj 0)
10-24 12:42:49.980: INFO/Process(577): Sending signal. PID: 900 SIG: 9
10-24 12:42:50.020: WARN/WindowManager(577): Looks like we have
reclaimed some memory, clearing surface for retry.
10-24 12:42:50.020: WARN/SurfaceComposerClient(577): Destroying
surface while a transaction is open. Client 0x2cc7a8: destroying
surface 0, mTransactionOpen=1

As I understand MemoryDealer debug dumps surface allocator structure
and indeed largest free block is smaller than requested 1642496 bytes.
My question is if same limit will be on real devices?

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



[android-developers] Re: Slow time zone name loading

2009-10-24 Thread Wouter



On Oct 24, 4:59 pm, Mark Murphy mmur...@commonsware.com wrote:
 Wouter wrote:
  What is the problem for 1.5 and why does this works for 1.6?

 See the issue I linked to in the previous message.

So it is only fixed in 1.6 and users with 1.5 have to wait longer? :(


  Are do you have another API for twitter I can use or some examples? I
  have used your thumbnailadapter (as example for Twitter).

 Well, I use JTwitter in my books.

I had used this first, but had this issue and I tried another API. But
with the same result. Don't you have this problem with 1.5?

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

 Android Training in Germany, 18-22 January 2010:http://bignerdranch.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: White screen in my OpenGL application

2009-10-24 Thread Steff

I have tried to install the application on my HTC magic with
mGLSurfaceView.getHolder().setFormat(PixelFormat.RGBA_);. I
works perfectly. When I comment out the line the graphics looks very
strange on my HTC magic, but that is where it looks fine in the
emulator. If the emulator cannot be trusted to work as real devices,
then it is not worth 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: Slow time zone name loading

2009-10-24 Thread Mark Murphy

Wouter wrote:
 I had used this first, but had this issue and I tried another API. But
 with the same result. Don't you have this problem with 1.5?

I have had no complaints related to this, if that's what you mean. I
have run into the time zone load issue before, but if it's affecting
JTwitter, I had not noticed, and nobody commented.

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

_Android Programming Tutorials_ Version 1.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: Slow time zone name loading

2009-10-24 Thread Wouter

Here is a new log file:

10-24 17:21:58.300: INFO/Resources(14467): Loaded time zone names for
en_US in 2167ms.
10-24 17:21:58.310: INFO/System.out(14467): MNM Redactie:Een nieuwe #1
in de MNM50! RT @jaspererkens: op 1 in de MNM50! // Om preciezer te
zijn: 3. Ke$ha 2. David Guetta
10-24 17:22:00.260: INFO/Resources(14467): Loaded time zone names for
en_US in 1932ms.
10-24 17:22:00.260: INFO/System.out(14467): MNM Redactie:Fanny is
vroeg wakker, en haar honden ook... http://www.mnm.be/artikel/159592
10-24 17:22:02.030: INFO/Resources(14467): Loaded time zone names for
en_US in 1758ms.
10-24 17:22:02.040: INFO/System.out(14467): appletips.nl:Nieuwe post:
10.6 Het “iPhone” label in OS X Adresboek http://bit.ly/4sjL0
10-24 17:22:03.930: INFO/Resources(14467): Loaded time zone names for
en_US in 1866ms.
10-24 17:22:03.930: INFO/System.out(14467): appletips.nl:Nieuwe post:
“Half-star rating” activeren in iTunes http://bit.ly/1Py6g7

So for every post it loads the time zones.

Same with JTwitter or Twitter4j

Really hate this.. Don't know what I am doing wrong..

On 24 okt, 17:14, Mark Murphy mmur...@commonsware.com wrote:
 Wouter wrote:
  I had used this first, but had this issue and I tried another API. But
  with the same result. Don't you have this problem with 1.5?

 I have had no complaints related to this, if that's what you mean. I
 have run into the time zone load issue before, but if it's affecting
 JTwitter, I had not noticed, and nobody commented.

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

 _Android Programming Tutorials_ Version 1.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: Can i specially forbids switching orientation when rotating phone on my app?

2009-10-24 Thread RichardC

The activity element in your AndroidManifest.xml supports the
android:screenOrientation property see:

http://developer.android.com/guide/topics/manifest/activity-element.html

--
RichardC



On Oct 24, 10:22 am, Philip phwang...@gmail.com wrote:
 When i chick a button on my app , the method below will be happened.
 
 if(android.provider.Settings.System.getInt(getContentResolver
 (),Settings.System.ACCELEROMETER_ROTATION, 0) == 1) {
 android.provider.Settings.System.putInt(getContentResolver
 (),Settings.System.ACCELEROMETER_ROTATION, 0);}

 
 Here i want to forbids switching orientation when rotating phone.
 Also i hope the screen orientation will not be changed.
 But when here is horizontal screen mode, the screen orientation will
 be changed to vertical mode automatically .
 That's not what i want.
 Any suggestions?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Service stops?

2009-10-24 Thread Christine

I have a service that is waiting for input from an Activity. I noticed
that if the service has a task scheduled via a handler, an Activity
can bind and unbind repeatedly to make the service do stuff. However,
if the service doesn't have a task scheduled and really doesn't do
anything while waiting, it kind of disappears. An activity binds to
the service and makes it work, but after unbind it can't bind again.
This is not an issue for me because I do need a task scheduled, if
only a task that stops the service after n minutes of inactivity. I
was just wondering if this is intended behavior of a service.

dagdag
Christine
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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.6: GPS location provider stop unexpectedly (exceeded MIN_FIX_COUNT), bouncing back and forth

2009-10-24 Thread JP

Hmm, ok thanks - which value should be used  was intended as a
rhetoric question, pointing out that in it's current form, this
feature is not usable. It has the potential to cause non-deterministic
behavior when the different values of minTime are set as result to
(asynchronous) events. By mapping multiple objects (listeners) with
different attribute values to a single one (location provider), you
never know what you will get.

The real kicker (as far as I can see, I haven't tried this out): Now
you can build an app that interferes with other apps running at the
same time. Say, your app has a service running in the background that
calls .requestLocationUpdates() with a minTime value that's different
from an app running in the foreground. In the extreme, you can choke
off the foreground app's location provider, no?



On Oct 24, 2:00 am, Lance Nanek lna...@gmail.com wrote:
 multiple listeners for a location provider with different minTime intervals 
 - which value should be used

 Looks like the current implementation uses the shortest value for that
 situation:http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...

 Seems like an OK decision there from some quick tests. I called
 requestLocationUpdates for two listeners. One with a power conserving
 hint argument of 30 seconds. The other with 60 seconds. Both listeners
 got the same update frequency. In number of seconds between
 onLocationChanged calls:
 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
 37, ...

 Corresponding to occasional ~30 second shutdowns. Once I called
 removeUpdates for the listener that was registered for 30 seconds,
 then the listener registered for 60 seconds started getting what it
 would normally get:
 2, 1, 69, 1, 1, 3, 1, 2, 1, 2, 1, 2, 1, 70, 1, 1, 2, 1, 2, 1, 2,
 1, ...

 ~60 second shutdowns. End result, the listener that was registered
 saying it is OK with ~60 second shutdowns never actually has to wait
 that long if there is another listener registered that wants more
 frequent updates. Meanwhile the one that wants the most frequent
 updates gets what it normally would.

 On Oct 23, 10:30 am, JP joachim.pfeif...@gmail.com wrote:

  (Refers to the logs) This occurs every 3s, although minTime is much
  higher, just as you've found. I will venture to say that this is
  harder on the battery than to just let GPS stand.
  BTW, resting a location provider this way is also mis-spec'ed. If an
  app registers multiple listeners for a location provider with
  different minTime intervals - which value should be used to control
  the location provider?
  It certainly isn't in line with 1.5 behavior, or with anything I've
  seen on any device.

  I suppose I can't be sold on this being a feature, not a bug.

  On Oct 22, 11:40 pm, Lance Nanek lna...@gmail.com wrote:

   Is this behavior hurting an app you use/wrote in some way? It seems
   within spec.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Service stops?

2009-10-24 Thread Mark Murphy

Christine wrote:
 I have a service that is waiting for input from an Activity. I noticed
 that if the service has a task scheduled via a handler, an Activity
 can bind and unbind repeatedly to make the service do stuff. 

What is a task scheduled via a handler?

 An activity binds to
 the service and makes it work, but after unbind it can't bind again.

Why unbind before the activity is going away?

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

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

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



[android-developers] Re: WebView + Cookie Problem

2009-10-24 Thread Randall

that's correct.  The server rejects the session cookie and I have to
login, but the same session cookie works fine when used with other
messages to the server.  The odd thing is that this doesn't happen all
the time.  The cookie will occassionally work in the given code
snippet so I thought it might be a timing issue with how I'm calling
sync()

On Oct 23, 1:21 pm, Jason Proctor jason.android.li...@gmail.com
wrote:
 i use this mechanism and it works for me.

 do you log out what's going on in this section and see if anything
 untoward is happening?





 I have a server that sends my android app a session cookie used for
 authenticated communication.  I am trying to load a WebView with a URL
 pointing to that same server and I'm trying to pass in the session
 cookie for authentication.  I am observing that it works
 intermittently but I have no idea why.  Below is the code that I'm
 using to do this.  Any help will be greatly appreciated.

             String myUrl = http://mydomain.com/;;
             CookieSyncManager.createInstance(this);
             CookieManager cookieManager = CookieManager.getInstance();
             Cookie sessionCookie =  getCookie();
             if(sessionCookie != null){
                     String cookieString = sessionCookie.getName()
 +=+sessionCookie.getValue()+; domain=+sessionCookie.getDomain();
                     cookieManager.setCookie(myUrl, cookieString);
                     CookieSyncManager.getInstance().sync();
             }

             WebView webView = (WebView) findViewById(R.id.webview);
             webView.getSettings().setBuiltInZoomControls(true);
             webView.getSettings().setJavaScriptEnabled(true);
             webView.setWebViewClient(new MyWebViewClient());
             webView.loadUrl(myUrl);

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



[android-developers] Rotating in content gets clipped

2009-10-24 Thread BrianS

Hi-- I'm trying to draw some large circles on the canvas which are
partly offscreen, then use animation to rotate them in be fully
visible. My circles successfully rotate in, but when they come into
view they're clipped at the place that was the screen edge when they
were originally drawn. Is there any way to prevent this? I guess my
larger question is how can you draw elements beyond the edges of the
screen and then animate them into view?

Thanks 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: Service stops?

2009-10-24 Thread Christine



On Oct 24, 6:13 pm, Mark Murphy mmur...@commonsware.com wrote:

 What is a task scheduled via a handler?

new Handler().postDelayed(someTask, someTime);


  An activity binds to
  the service and makes it work, but after unbind it can't bind again.

 Why unbind before the activity is going away?

Well, I suppose that if an activity gets destroyed by the os, you have
to unbind in onStop() or onDestroy(), don't you? Also, maybe the
activity never needs the service again, so why keep the connection
open and keep the service running unnecessarily?


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

 Android App Developer Training:http://commonsware.com/training
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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.6: GPS location provider stop unexpectedly (exceeded MIN_FIX_COUNT), bouncing back and forth

2009-10-24 Thread Christine

On Oct 24, 6:11 pm, JP joachim.pfeif...@gmail.com wrote:
 By mapping multiple objects (listeners) with
 different attribute values to a single one (location provider), you
 never know what you will get.

The documentation says that you can't be sure what you'll get. You
will probably get location updates at least as often as specified by
the time parameter, but there's no guarantee. Maybe you'll get the
updates more often than you specified because some other app needs
them more often? I don't know.

 In the extreme, you can choke
 off the foreground app's location provider, no?

You can choke the foreground app anyway, if you want to. But you don't
- I guess.


 On Oct 24, 2:00 am, Lance Nanek lna...@gmail.com wrote:

  multiple listeners for a location provider with different minTime 
  intervals - which value should be used

  Looks like the current implementation uses the shortest value for that
  situation:http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...

  Seems like an OK decision there from some quick tests. I called
  requestLocationUpdates for two listeners. One with a power conserving
  hint argument of 30 seconds. The other with 60 seconds. Both listeners
  got the same update frequency. In number of seconds between
  onLocationChanged calls:
  1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
  37, ...

  Corresponding to occasional ~30 second shutdowns. Once I called
  removeUpdates for the listener that was registered for 30 seconds,
  then the listener registered for 60 seconds started getting what it
  would normally get:
  2, 1, 69, 1, 1, 3, 1, 2, 1, 2, 1, 2, 1, 70, 1, 1, 2, 1, 2, 1, 2,
  1, ...

  ~60 second shutdowns. End result, the listener that was registered
  saying it is OK with ~60 second shutdowns never actually has to wait
  that long if there is another listener registered that wants more
  frequent updates. Meanwhile the one that wants the most frequent
  updates gets what it normally would.

  On Oct 23, 10:30 am, JP joachim.pfeif...@gmail.com wrote:

   (Refers to the logs) This occurs every 3s, although minTime is much
   higher, just as you've found. I will venture to say that this is
   harder on the battery than to just let GPS stand.
   BTW, resting a location provider this way is also mis-spec'ed. If an
   app registers multiple listeners for a location provider with
   different minTime intervals - which value should be used to control
   the location provider?
   It certainly isn't in line with 1.5 behavior, or with anything I've
   seen on any device.

   I suppose I can't be sold on this being a feature, not a bug.

   On Oct 22, 11:40 pm, Lance Nanek lna...@gmail.com wrote:

    Is this behavior hurting an app you use/wrote in some way? It seems
    within spec.


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



[android-developers] Re: Service stops?

2009-10-24 Thread Mark Murphy

Christine wrote:
 What is a task scheduled via a handler?
 
 new Handler().postDelayed(someTask, someTime);

I have not used Handler inside a Service, and so I have no idea whether
or not that's a good idea.

Why aren't you scheduling this in the Activity, and just calling to the
Service when the time has elapsed? If the answer is I want it to fire
even if the Activity is gone, AlarmManager may be a better choice.

 Well, I suppose that if an activity gets destroyed by the os, you have
 to unbind in onStop() or onDestroy(), don't you?

Correct. I was referring to:

An activity binds to the service and makes it work, but after unbind it
can't bind again.

That implies the activity is not being destroyed, otherwise it no
longer exists and can't do anything, let alone bind again. Perhaps I
misunderstood, in which case I apologize.

When after unbind it can't bind again, what are you actually seeing?
Exceptions? other log messages? false returned by bindService()?
something else?

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

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

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



[android-developers] Trying to turn off candidates view in EditText with on-screen keyboard

2009-10-24 Thread Bamsen

Hi,

My application uses an EditText box to input information that is not
English words.
When I do this i get the candidates view (which I normally love :)
with suggestions for known words.
I do not want to pollute my word list by saving what I typed so I want
to turn off candidates view for this text box.

I have searched the documentation and  WEB but could not find the
answer.

I have tried two methods:

1. Set the XML property input type to various values.
With this I can't find one that lets me input 'raw' text without a
candidates view.

2. Use InputMethodService
  static InputMethodService mInputService;
  mInputService=new InputMethodService();
  mInputService.setCandidatesViewShown(false);
Whenever i try the last line my app 'has stopped unexpectedly'

I would prefer to understand the second method, but would be happy
for
the first one to work, for now. :)

Any and all help is greatly appreciated.

--
Morten

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



[android-developers] Re: Missing timezone

2009-10-24 Thread Simon

Yes - very annoying!

On Oct 23, 10:24 am, Lox laurent.dincl...@gmail.com wrote:
 So no one has an indication, it is really anoying for some people in
 some countries.

 On 28 sep, 19:14, Simon simon.raw...@gmail.com wrote:



  I have a similar problem.  I am in Pakistan where thetimezoneis
  normally GMT + 5.  However at the moment we are in + 1 DST, i.e. GMT +
  6.  Android thinks that Pakistan is GMT + 5 throughout the year.  I
  have the same problems as you with text message and google calendar
  times.  I too would appreciate any advice or suggestions to manually
  correct this.

  Thanks

  Simon

  On Sep 28, 6:07 am, Lox laurent.dincl...@gmail.com wrote:

   Hello,

   Thetimezonefor New Caledonia ismissingfrom android.

   It is GMT +11 with  NO daylight saving time.

   Android auto-detects me in NewCaledonia on my Hero but automatically
   uses Magadan (GMT+11) and applies +1 hour of daylight saving time to
   it, so, it shows the wrong time...

   If I manually set the time back one hour, incoming SMS time is wrong
   and I have a problem of time with google calendar sync too.

   I had a look to Donut using SDK 1.6: it still has a problem with
  missingNewCaledoniatimezone.

   So I went to android 1.6-rc1 source folder in /development/tools/
   zoneinfo and found what seems to be a 2008h version. I ran the
   generate script and got the two files: zoneinfo.dat and zoneinfo.idx.

   I pushed both on the emulated android (donut). If I go to change
   timezones in parameters, all places are showing GMT+0:00...

   Any advice really appreciated.

   Regards.

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



[android-developers] UNCOMPRESS_DATA_MAX problem

2009-10-24 Thread Sunil Mishra

Hi All,

I am trying to load a file using resource. my file size is more than
1mb.

res/raw : contains a file named abc_fb2 .
but i am getting UNCOMPRESS_DATA_MAX error in catlog.

as per my google, i found that there might be asset.h file , which we
need to change. with some more value like 3*1024*1024

so kindly if any body suggest me that how to download the source  code
of android1.5 sdk.
in i will be able to change.

thanks in advanced.

Regards
Sunil

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

2009-10-24 Thread Shone

Hello All,

I know this is not the right place to ask this question, but I don't
know where to go neither.

The site developer.android.com could not be accessed inside main land
China. No doubt it's blocked by the great fire wall, but I can not
figure out why they(The Chinese gov) did this. Isn't it just a tech
site without any political/religious contents?

As an Android developer, it's very annoying not be able to get those
helpful docs on that site.

Could anyone here or inside Google report this problem to Google China
and ask the Chinese gov to remove the block? I myself don't know or
can't find anyone to contact.

Sorry to bother you if I did. And thank any help.

-Shone

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

2009-10-24 Thread TwoMinuteHate

How easy is it to make an application that's just a wrapper around the
browser?

Can the Android OS boot directly into that application so that only a
certain
application launches after boot.

I'm building a client some custom software and I'd prefer to use one
of those Archos 5 MIDs than a Linux netbook.

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



[android-developers] Re: Can Android boot into a single application on boot?

2009-10-24 Thread Mark Murphy

TwoMinuteHate wrote:
 How easy is it to make an application that's just a wrapper around the
 browser?

That depends on what you want to do. Embedding a WebView widget in an
application is very simple, but forms, navigation, and such make things
much more complicated.

 Can the Android OS boot directly into that application so that only a
 certain
 application launches after boot.

At the SDK level, only if you somehow set up this application to be a
replacement home screen, and then the user still will have the ability
to bring up the system home screen if desired.

If you are willing to roll your own firmware, you can probably do what
you want.

-- 
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: 1.6: GPS location provider stop unexpectedly (exceeded MIN_FIX_COUNT), bouncing back and forth

2009-10-24 Thread JP


Intentionally, sure. But this is a *side effect*.


On Oct 24, 9:41 am, Christine christine.kar...@gmail.com wrote:
 You can choke the foreground app anyway, if you want to. But you don't
 - I guess.

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



[android-developers] Re: phone reboot breaks app

2009-10-24 Thread Greg Donald

On Wed, Oct 21, 2009 at 11:22 AM, Greg Donald gdon...@gmail.com wrote:
 In my project, in the res/drawable directory I have:

 icon.png
 go_bg.png
 go_bg2.png
 go.xml

 The contents of the go.xml:

 ?xml version=1.0 encoding=UTF-8?
 selector xmlns:android=http://schemas.android.com/apk/res/android;
  item android:state_pressed=true android:drawable=@drawable/go_bg /
  item android:drawable=@drawable/go_bg2 /
 /selector

 When I put the app on my HTC Hero, it works fine.  But if I reboot the
 phone, the application icon stops using the icon.png, and instead
 begins to use the go_bg.png.  The button that uses the go.xml no
 longer works either.  Rebooting the phone basically breaks the app.  I
 can reinstall the app and it again works fine all up until I reboot.

 I know of two ways to get the app on the phone, first using Eclipse
 and second using the HTC Sync software that came with the phone.
 Installing the app either way produces the same issues in the end.

 I've tried renaming the button image names and the xml file.  Nothing
 helps there.

 My phone is the HTC Hero.  In Eclipse I'm building using the 1.5 SDK.

 Any idea why rebooting my phone breaks my app?

 Thanks,


Anyone?   TIA.



-- 
Greg Donald
http://destiney.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: phone reboot breaks app

2009-10-24 Thread Mark Murphy

Greg Donald wrote:
 On Wed, Oct 21, 2009 at 11:22 AM, Greg Donald gdon...@gmail.com wrote:
 In my project, in the res/drawable directory I have:

 icon.png
 go_bg.png
 go_bg2.png
 go.xml

 The contents of the go.xml:

 ?xml version=1.0 encoding=UTF-8?
 selector xmlns:android=http://schemas.android.com/apk/res/android;
  item android:state_pressed=true android:drawable=@drawable/go_bg /
  item android:drawable=@drawable/go_bg2 /
 /selector

 When I put the app on my HTC Hero, it works fine.  But if I reboot the
 phone, the application icon stops using the icon.png, and instead
 begins to use the go_bg.png.  The button that uses the go.xml no
 longer works either.  Rebooting the phone basically breaks the app.  I
 can reinstall the app and it again works fine all up until I reboot.

 I know of two ways to get the app on the phone, first using Eclipse
 and second using the HTC Sync software that came with the phone.
 Installing the app either way produces the same issues in the end.

 I've tried renaming the button image names and the xml file.  Nothing
 helps there.

 My phone is the HTC Hero.  In Eclipse I'm building using the 1.5 SDK.

 Any idea why rebooting my phone breaks my app?

 Thanks,
 
 
 Anyone?   TIA.

Try doing Project  Clean or otherwise nuke your bin/ and gen/
directories. Then, fully uninstall the app off the Hero (e.g., use
Manage Applications). Then, try installing it again and see if the
problem recurs.

Do you get the same behavior in an Android emulator?

-- 
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: Out of surface memory in WVGA

2009-10-24 Thread a1


 10-24 12:42:49.860: DEBUG/Blockx.GameController(900): Surface created
 10-24 12:42:49.890: ERROR/SurfaceFlinger(577): not enough memory for
 layer bitmap size=1642496 (w=480, h=854, stride=480, format=1)
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):   LayerBitmap (0x2e9350,
 size=8388608)
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     0: 002e9388 | 0x | 
 0x0003E000 | F
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     1: 00373ab0 | 0x0003E000 | 
 0x00191000 | A
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     2: 00373b78 | 0x001CF000 | 
 0x00191000 | A
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     3: 0028bd40 | 0x0036 | 
 0x0003E000 | F
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     4: 002ce748 | 0x0039E000 | 
 0x00059000 | A
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     5: 002ce7c0 | 0x003F7000 | 
 0x00059000 | A
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     6: 00374bb0 | 0x0045 | 
 0x00191000 | A
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     7: 00375ec8 | 0x005E1000 | 
 0x00059000 | A
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     8: 00377c30 | 0x0063A000 | 
 0x00059000 | A
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):     9: 00377d50 | 0x00693000 | 
 0x0016D000 | F
 10-24 12:42:49.890: DEBUG/MemoryDealer(577):   size allocated: 6385664

One more thing, I wonder what may cause such big memory consumption,
there are already 3 full scree buffers allocated (block 1, 2 and 6),
which seems odd as I destroy menu egl surface before staring game
activity.

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



[android-developers] Video recording results in corrupted files

2009-10-24 Thread bestpriv...@googlemail.com

I finally got it to record videos. The preview surfcae works fine and
the audio stream of the audio resulting file is also okay. But the
video stream is a complete messup because you cannot figure out what
it is. The main part of the screen is filled with green colours.
Any idea what could be the reason? I tried all codec/container,
resolution and framerate variations, without success.

here is the code:

public class CamcorderPreview extends SurfaceView implements
SurfaceHolder.Callback {
private MediaRecorder recorder;
private SurfaceHolder holder;

public CamcorderPreview(Context context, AttributeSet attrs) {
super(context, attrs);
holder = getHolder();
holder.addCallback(this);
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

recorder = new MediaRecorder();

//recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
  recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
  recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
  //recorder.setAudioEncoder
(MediaRecorder.AudioEncoder.AMR_NB);
  recorder.setVideoEncoder
(MediaRecorder.VideoEncoder.MPEG_4_SP);
  recorder.setVideoSize(480, 320);
  recorder.setVideoFrameRate(15);
  //recorder.setMaxDuration(5000);
  recorder.setOutputFile(/sdcard/dcim/100ANDRO/test.mp4);
}

@Override
public void surfaceChanged(SurfaceHolder holder, int format, int
width, int height){

}

@Override
public void surfaceCreated(SurfaceHolder holder) {
recorder.setPreviewDisplay(holder.getSurface());
try {
recorder.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

@Override
public void surfaceDestroyed(SurfaceHolder holder) {

}

public void startRecording(){
if(recorder != null){
recorder.start();
}
}

public void stopRecording(){
if(recorder != null){
recorder.stop();
recorder.release();
}
}

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



[android-developers] Overlay vs ItemizedOverlay, your thoughts?

2009-10-24 Thread Mark Wyszomierski

Hi,

I want to draw 20 pins on a MapActivity. Each pin has a small pin
image, but I have to dynamically overlay a small bit of text over each
pin at runtime. Looks like I have two options:

#1) Itemized Overlay
This is the suggested method. I put all my pins in one ItemizedOverlay
object, and that counts as a single Overlay object for my MapView.

#2) One Overlay per pin
Create a separate Overlay instance for each pin I need to render.


The problem I see with using method #1 is that you need to set a
drawable for the item. This would mean that I need to create 20+20
(one for focused/non-focused state each) bitmaps and keep them in
memory for the duration of my app. On the other hand, Overlay lets you
override the draw method so I can do the simple compositing at
runtime.

The other issue with Itemized Overlay - although it handles focus for
you - does it move the focused item to the front of the z-order when
selected?

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: phone reboot breaks app

2009-10-24 Thread Greg Donald

On Sat, Oct 24, 2009 at 12:15 PM, Mark Murphy mmur...@commonsware.com wrote:
 Try doing Project  Clean or otherwise nuke your bin/ and gen/
 directories. Then, fully uninstall the app off the Hero (e.g., use
 Manage Applications). Then, try installing it again and see if the
 problem recurs.

Same problem.  Cleaning, rebuilding and reinstalling doesn't help.
Putting the app on the phone using Eclipse or HTC Sync makes no
difference.  One phone reboot and the app is broken until I reinstall
it.

 Do you get the same behavior in an Android emulator?

No, the app works reliably in the emulator.


-- 
Greg Donald
http://destiney.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: Service stops?

2009-10-24 Thread Dianne Hackborn
On Sat, Oct 24, 2009 at 9:47 AM, Mark Murphy mmur...@commonsware.comwrote:

  new Handler().postDelayed(someTask, someTime);
 I have not used Handler inside a Service, and so I have no idea whether
 or not that's a good idea.


Handler and the related message loop APIs are much much lower-level than
Service, Activity, etc, so it doesn't matter where you do this stuff from,
it is completely unaware of that.

The only thing that the above code does is create a new Handler (associated
with the main thread/looper of the process since presumably this is being
done in one of the Service callbacks like onCreate()), and placing
someTask on the message list of that main thread/looper with the created
Handler as the destination for it.

Now one thing that may be happening here is that someTask is some inner
class of the service, which would mean that as a side-effect you are
creating a reference on the service (because the message is on the thread's
message queue, so it has a reference on it until it is dispatched, and it
has a reference on someTask, and someTask being an inner class of the
service has a reference on the service).  This would prevent the Service
from being garbage collected, even though it is technically no longer used
(its onDestroy() has been called) nor valid.

From what I have heard so far, my suspicion is that whatever the original
code is, it is really not using these things correctly at all.

-- 
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: updatePeriodMillis not working for widget on 1.6

2009-10-24 Thread String

On Oct 24, 12:58 am, Mark Murphy mmur...@commonsware.com wrote:

 Disretrospect wrote:
  Mark Murphy wrote:
  You cannot get TIME_TICK via a manifest-registered receiver. It has to
  be a receiver registered via Java code.

  Still possible though, register your receiver from your config
  activity or through a service started from onEnabled?

 Not from the config activity, since the activity will go away as soon as
 the configuration is done.

And not from onEnabled either, because the app widget provider is a
BroadcastReceiver, and that's not allowed:
http://developer.android.com/reference/android/content/Context.html#registerReceiver(android.content.BroadcastReceiver,
android.content.IntentFilter)

 And keeping a service around to receive a once-per-minute TIMER_TICK is
 bad for business. You want to not keep processes around any more than
 necessary.

Also very true, but less applicable in my case because the widget in
question is a clock, which the user wants to update once a minute.

 Frankly, IMHO, any user who installs a task killer app deserves
 whatever instabilities they get.

I absolutely agree in principle, but unfortunately it's the widget
devs who take the heat. The user sees the widget stop updating, and
immediately trash-talks it in Market comments.

 Is there an issue inhttp://b.android.comabout the AlarmManager/task
 killer problem?

There is now: http://code.google.com/p/android/issues/detail?id=4354

Please star if you agree that this is a problem, and add additional
comments if you feel my description could use clarification - I'm not
qualified to describe the issue at a platform level.

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



[android-developers] Re: phone reboot breaks app

2009-10-24 Thread Mark Murphy

Greg Donald wrote:
 On Sat, Oct 24, 2009 at 12:15 PM, Mark Murphy mmur...@commonsware.com wrote:
 Try doing Project  Clean or otherwise nuke your bin/ and gen/
 directories. Then, fully uninstall the app off the Hero (e.g., use
 Manage Applications). Then, try installing it again and see if the
 problem recurs.
 
 Same problem.  Cleaning, rebuilding and reinstalling doesn't help.
 Putting the app on the phone using Eclipse or HTC Sync makes no
 difference.  One phone reboot and the app is broken until I reinstall
 it.
 
 Do you get the same behavior in an Android emulator?
 
 No, the app works reliably in the emulator.

*shrug*

Got me stumped. Usually, the problems I encounter where the app gets the
wrong resources are due to problems with out-of-date artifacts in the
build, and they show up immediately (not after a reboot).

From your earlier email:

 The button that uses the go.xml no longer works either.

When you say no longer works, what do you mean?

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

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

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



[android-developers] Re: Can i specially forbids switching orientation when rotating phone on my app?

2009-10-24 Thread Wayne Wenthin
You might want to do this during onCreate

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

or landscape whichever it is that you want


On Sat, Oct 24, 2009 at 2:22 AM, Philip phwang...@gmail.com wrote:


 When i chick a button on my app , the method below will be happened.
 
 if(android.provider.Settings.System.getInt(getContentResolver
 (),Settings.System.ACCELEROMETER_ROTATION, 0) == 1) {
 android.provider.Settings.System.putInt(getContentResolver
 (),Settings.System.ACCELEROMETER_ROTATION, 0);
 }
 
 Here i want to forbids switching orientation when rotating phone.
 Also i hope the screen orientation will not be changed.
 But when here is horizontal screen mode, the screen orientation will
 be changed to vertical mode automatically .
 That's not what i want.
 Any suggestions?

 



-- 
Writing code is one of few things
that teaches me I don't know everything.

http://www.fuligin.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: phone reboot breaks app

2009-10-24 Thread Greg Donald

On Sat, Oct 24, 2009 at 1:34 PM, Mark Murphy mmur...@commonsware.com wrote:
 The button that uses the go.xml no longer works either.

 When you say no longer works, what do you mean?

None of the code in the button's onclick handler runs.  The button
clicks and nothing happens.


-- 
Greg Donald
http://destiney.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] Any word on a dev phone for motorola droid?

2009-10-24 Thread sherifffruitfly

And what about dev tools, code upgrade from gen1, etc.?


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



[android-developers] Re: phone reboot breaks app

2009-10-24 Thread Mark Murphy

Greg Donald wrote:
 On Sat, Oct 24, 2009 at 1:34 PM, Mark Murphy mmur...@commonsware.com wrote:
 The button that uses the go.xml no longer works either.
 When you say no longer works, what do you mean?
 
 None of the code in the button's onclick handler runs.  The button
 clicks and nothing happens.

Now that's even stranger.

Have you used the debugger (or Log statements) to see if the click
handler is being registered or being called?

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

_Beginning Android_ from Apress Now 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] synchronized SurfaceHolder hanging on my market app

2009-10-24 Thread LouisB

Would appreciate some help here, my app (Apple2 Emulator) runs great
on the emulator, but when I put it up on my G1 it becomes extremely
flakey.  Force quit / hang like crazy.  I uploaded to the market and
everyone is force quitting the app.  Not good!  The code is based on
the old lunar lander example.  The problem I’m seeing is that the app
hangs up on the “synchronized (mSurfaceHolder) {“ block (see code
snippets below.)
Question is: Why would it hang up on the “synchronized
(mSurfaceHolder) {“check and what can I do to troubleshoot / debug?  I
can’t pinpoint exactly what started it, but I will tell you I added
some native JNI calls and it seems to have started after that?  It
generally hangs in the beginning when I give control to the “view”
thread.

MANY THANKS
Bart

Code:
public class view extends SurfaceView implements
SurfaceHolder.Callback {
…
public thread(SurfaceHolder surfaceHolder, Context context, Handler
handler) {
mSurfaceHolder = surfaceHolder;
…
private void doDraw(Canvas c) {
synchronized (mSurfaceHolder) {  HANGING HERE


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



[android-developers] Re: Service stops?

2009-10-24 Thread Christine

On Oct 24, 6:47 pm, Mark Murphy mmur...@commonsware.com wrote:

 Why aren't you scheduling this in the Activity, and just calling to the
 Service when the time has elapsed? If the answer is I want it to fire
 even if the Activity is gone, AlarmManager may be a better choice.

Actually, the activity hands some data to the service to process,
triggered by a user action. Typically, a user would do this several
times in a row, so I figured it would be nice if the service wouldn't
stop immediately, but just wait for a couple of minutes. I don't want
the service to keep running indefinitely. The main reason I use a
service is that uploading the user data can take a while and I want it
to continue even if the app gets destroyed. The activity stops after
handing data to the service, and it may get started again for a new
action involving the service.

 When after unbind it can't bind again, what are you actually seeing?
 Exceptions? other log messages? false returned by bindService()?
 something else?

Actually if there were log messages or anything, I would know where to
look for the problem. The activity doesn't throw an exception, but the
bindService() doesn't cause onBind() in the service to get called.
But I'll keep looking, I know I'll find it :-)

dagdag
Christine


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

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



[android-developers] Re: Service stops?

2009-10-24 Thread Christine


On Oct 24, 7:52 pm, Dianne Hackborn hack...@android.com wrote:

 From what I have heard so far, my suspicion is that whatever the original
 code is, it is really not using these things correctly at all.

If you mean that I shouldn't rely on side effects, you're totally
right. I'm now looking for a more proper solution to my issue.


 --
 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: Service stops?

2009-10-24 Thread Dianne Hackborn
For that kind of thing there should be no need to use bindService at all --
just call startService() for each of the things to download, and have the
service use stopSelf(id) so that it is stopped once the last one is done.
 And there is no reason to delay stopping the service -- starting a service
is quite cheap.

On Sat, Oct 24, 2009 at 2:08 PM, Christine christine.kar...@gmail.comwrote:


 On Oct 24, 6:47 pm, Mark Murphy mmur...@commonsware.com wrote:

  Why aren't you scheduling this in the Activity, and just calling to the
  Service when the time has elapsed? If the answer is I want it to fire
  even if the Activity is gone, AlarmManager may be a better choice.

 Actually, the activity hands some data to the service to process,
 triggered by a user action. Typically, a user would do this several
 times in a row, so I figured it would be nice if the service wouldn't
 stop immediately, but just wait for a couple of minutes. I don't want
 the service to keep running indefinitely. The main reason I use a
 service is that uploading the user data can take a while and I want it
 to continue even if the app gets destroyed. The activity stops after
 handing data to the service, and it may get started again for a new
 action involving the service.

  When after unbind it can't bind again, what are you actually seeing?
  Exceptions? other log messages? false returned by bindService()?
  something else?

 Actually if there were log messages or anything, I would know where to
 look for the problem. The activity doesn't throw an exception, but the
 bindService() doesn't cause onBind() in the service to get called.
 But I'll keep looking, I know I'll find it :-)

 dagdag
 Christine

 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://twitter.com/commonsguy
 
  Android App Developer Training:http://commonsware.com/training
 



-- 
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: Any word on a dev phone for motorola droid?

2009-10-24 Thread Dianne Hackborn
What do you mean by dev phone?  Every Android phone is a development phone
-- it has all of the facilities to develop applications against it.  The
ADP1 is a special thing for people working on the platform, and I certainly
wouldn't assume there is going to be a special product based on -any-
particular Android phone.

On Sat, Oct 24, 2009 at 1:14 PM, sherifffruitfly
sherifffruit...@gmail.comwrote:


 And what about dev tools, code upgrade from gen1, etc.?


 



-- 
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: 1.6: GPS location provider stop unexpectedly (exceeded MIN_FIX_COUNT), bouncing back and forth

2009-10-24 Thread Lance Nanek

non-deterministic behavior when the different values of minTime are set as 
result to (asynchronous) events

The requestLocationUpdates methods use a synchronized block to avoid
that potential problem:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/LocationManagerService.java;h=3f268c933f14fabc0950657b43d7e4df1e463cf8;hb=63abad7ed389aea8eef75786d3628cfb288988dd#l933

Synchronized blocks aren't guaranteed to be fair, however. I suppose a
malicious app could try to register repeatedly in an attempt to starve
other threads trying to get into the synchronized block.

On Oct 24, 12:11 pm, JP joachim.pfeif...@gmail.com wrote:
 Hmm, ok thanks - which value should be used  was intended as a
 rhetoric question, pointing out that in it's current form, this
 feature is not usable. It has the potential to cause non-deterministic
 behavior when the different values of minTime are set as result to
 (asynchronous) events. By mapping multiple objects (listeners) with
 different attribute values to a single one (location provider), you
 never know what you will get.

 The real kicker (as far as I can see, I haven't tried this out): Now
 you can build an app that interferes with other apps running at the
 same time. Say, your app has a service running in the background that
 calls .requestLocationUpdates() with a minTime value that's different
 from an app running in the foreground. In the extreme, you can choke
 off the foreground app's location provider, no?

 On Oct 24, 2:00 am, Lance Nanek lna...@gmail.com wrote:

  multiple listeners for a location provider with different minTime 
  intervals - which value should be used

  Looks like the current implementation uses the shortest value for that
  situation:http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...

  Seems like an OK decision there from some quick tests. I called
  requestLocationUpdates for two listeners. One with a power conserving
  hint argument of 30 seconds. The other with 60 seconds. Both listeners
  got the same update frequency. In number of seconds between
  onLocationChanged calls:
  1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
  37, ...

  Corresponding to occasional ~30 second shutdowns. Once I called
  removeUpdates for the listener that was registered for 30 seconds,
  then the listener registered for 60 seconds started getting what it
  would normally get:
  2, 1, 69, 1, 1, 3, 1, 2, 1, 2, 1, 2, 1, 70, 1, 1, 2, 1, 2, 1, 2,
  1, ...

  ~60 second shutdowns. End result, the listener that was registered
  saying it is OK with ~60 second shutdowns never actually has to wait
  that long if there is another listener registered that wants more
  frequent updates. Meanwhile the one that wants the most frequent
  updates gets what it normally would.

  On Oct 23, 10:30 am, JP joachim.pfeif...@gmail.com wrote:

   (Refers to the logs) This occurs every 3s, although minTime is much
   higher, just as you've found. I will venture to say that this is
   harder on the battery than to just let GPS stand.
   BTW, resting a location provider this way is also mis-spec'ed. If an
   app registers multiple listeners for a location provider with
   different minTime intervals - which value should be used to control
   the location provider?
   It certainly isn't in line with 1.5 behavior, or with anything I've
   seen on any device.

   I suppose I can't be sold on this being a feature, not a bug.

   On Oct 22, 11:40 pm, Lance Nanek lna...@gmail.com wrote:

    Is this behavior hurting an app you use/wrote in some way? It seems
    within spec.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Any word on a dev phone for motorola droid?

2009-10-24 Thread sherifffruitfly

Uh... I didn't *assume* anything. I asked.

There's a new android phone coming out with a new android os. I
thought it therefore made sense to wonder if there was a dev version
of it to be made available, exactly as they did with the g1/dream.

Not sure what's out of order about that wonder. (shrug)

On Oct 24, 3:41 pm, Dianne Hackborn hack...@android.com wrote:
 What do you mean by dev phone?  Every Android phone is a development phone
 -- it has all of the facilities to develop applications against it.  The
 ADP1 is a special thing for people working on the platform, and I certainly
 wouldn't assume there is going to be a special product based on -any-
 particular Android phone.

 On Sat, Oct 24, 2009 at 1:14 PM, sherifffruitfly
 sherifffruit...@gmail.comwrote:



  And what about dev tools, code upgrade from gen1, etc.?

 --
 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: Sharing code between activities

2009-10-24 Thread James Wang



On Oct 9, 7:04 am, jotobjects jotobje...@gmail.com wrote:
 Understood - addinig android.jar would hugely increase the size of
 your app (by about 3MB)!
I think you can elimit jar from your apk by ant.
I have done it before.

 I was just suggesting that you could place android.jar in your
 classpath for building your coolfunctions.jar as an alternative to
 creating an empty project.  You would build this coolfunctions.jar
 outside any of your android projects. The coolfunctions.jar is then
 placed in the lib directory of each android application where you want
 to use it (which might be a single app if you only want to share it
 among activities as the first poster in this thread did).

 On Oct 8, 3:36 pm, Agus agus.sant...@gmail.com wrote:



  Yes, but that will increase your APK size.
  you don't need to include android.jar.

  On Thu, Oct 8, 2009 at 10:49 AM, jotobjects jotobje...@gmail.com wrote:

   Does adding the platform android.jar to the build classpath for the
   jar also make all the Android APIs accessbile?

   On Oct 7, 7:58 am, Mark Murphy mmur...@commonsware.com wrote:

By using an Android project to hold your JAR development, you
automatically get access to the Android APIs to use from your common
   code.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: help! Odd behavior with a search activity

2009-10-24 Thread Satya Komatineni

Here is some more research on this:

quick summary once again: I have two activities

1. main
2. search activity

Nature of search activity

1. invoke a browser
2. finish after that
3. As a result browser will be showing when this search activity is invoked

When does it work

If I have never invoked the MAIN activity of this application then the
back button on the invoked browser activity will take me back to where
I came from. (home)

when does it NOT work
**
If I invoked the MAIN activity at any time prior to the global search,
then the back button on the browser will take me quite disconcertingly
I should say to the MAIN activity irrespective of how far back in the
history it is.

The behavior seem un changed even if I set the

  android:allowTaskReparenting=false

What alternative I have

In my case the MAIN activity happens to be spurious and unnecessary
and I had it just for debugging. I had to remove this activity from
the application to make this work reliably

Hope these notes would be of some help if you were to stray this way.

well anyways if you have some ideas I would love to hear them

Thanks
Satya

On Sat, Oct 24, 2009 at 9:10 AM, Satya Komatineni
satya.komatin...@gmail.com wrote:
 I have a package with two activities

 1. A main activity
 2. A search activity

 The search activity is invoked by a search suggestion provider in two
 possible ways

 1. By clicking directly on a suggestion invoking the search activity
 through a VIEW action
 2. By clicking on the explicit search icon invoking the activity
 through SEARCH action

 If it is invoked through SEARCH I stay on the search activity and show
 some text to the user. Now when I click the back button I go back
 CORRECTLY to the home page.

 ODD Behaviour:
 However if I came to the search activity through the VIEW, I invoke a
 browser activity and call finish() on the search activity. Now I have
 the browser in my view. If I now go back I would expect to go back to
 teh device home page. But from now where the main activity is
 showing up.

 I see in the logcat a message from ActivityManager indicating

 moveTaskToBack: 8

 I have tried various flags to invoke the browser activity
 the tried flags include

 new task
 previous is top

 and I have also tried both a singleTop and otherwise with the
 SearchActivity as well.

 Same end result.

 Thanks for your insight on this one
 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] Android Market Question

2009-10-24 Thread Thomas

I compiled my apk and uploaded it to android market I think?  There
was not any indication of success or failure.  How can anyone check if
the app has uploaded or not?  Searching via an Android browser is
bizarre.  I really want to email my users there is an app they should
try.  How else can an app be uploaded so that some one might be able
to find it.  All I want to do is have an app on line and have some of
my users be able to find.  Why is this so hard?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 Market Question

2009-10-24 Thread Mark Murphy

Thomas wrote:
 I compiled my apk and uploaded it to android market I think?  There
 was not any indication of success or failure.  How can anyone check if
 the app has uploaded or not? 

Your app should show up in the Android Market on your phone minutes
after uploading. When I published an app earlier this year, it showed up
almost instantly.

Also, in your desktop's Web browser, on your Android Market Developer
Console page (http://market.android.com/publish/Home), in the section
labeled All Android Market listings, you should see your app listed as
published.

 How else can an app be uploaded so that some one might be able
 to find it.

You can distribute via AndAppStore, or SlideME, or Handango, or any
number of other independent markets, or upload it to your own Web site,
or upload it to any other Web site. In the latter two cases, make sure
the .apk file gets served as the appropriate MIME type
(application/vnd.android.package-archive), so the Android Web browser
can be used to install the app after downloading.

You can also distribute your APK by email, micro SD card, or other
means, for the user to put on their SD card, then install via any one of
a number of file managers available on the Market.

You can also create a QR code to display on your Web site that users
with Barcode Scanner or similar software can scan to kick off a download
and install, either via a Market URL (I think) or via a download off of
a Web site.

 Why is this so hard?

Over 10,000 apps are in the Market, by some published accounts. That
would suggest that the process is not particularly hard.

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

Android 1.6 Programming Books: http://commonsware.com/books

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



[android-developers] Re: Any word on a dev phone for motorola droid?

2009-10-24 Thread Marco Nelissen

On Sat, Oct 24, 2009 at 5:24 PM, sherifffruitfly
sherifffruit...@gmail.com wrote:

 Uh... I didn't *assume* anything. I asked.

 There's a new android phone coming out with a new android os. I
 thought it therefore made sense to wonder if there was a dev version
 of it to be made available, exactly as they did with the g1/dream.

The G1 was special because it was the first Android phone. There have
been a dozen or so other phones since then.

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



[android-developers] Re: 1.6 vs setPictureSize

2009-10-24 Thread gjs

Hi,

I have a camera app which creates large 2048x, medium 1024x and small
512x images by setting the camera parameters and it is still working
OK in 1.6 on G1.

My guess is that 640 is not a binary integer multiple of 2048 ???, so
maybe try 1024 and then rescale to 640.

Does 5mp pictures ( eg HTC Hero ) actually work, can anyone confirm ?

Regards

On Oct 25, 1:55 am, enervat...@gmail.com wrote:
 Before 1.6:

         Camera.Parameters parameters = mCamera.getParameters();
         parameters.setPictureSize(640, 480);

 Would deliver me a 640 by 480 image from the Camera.

 As of the 1.6 OS upgrade on my G1 (it doesn't matter whether the
 SDK is 1.5 or 1.6) is sends me 2048x1536 pixel images.

 This is extremely painful especially in light of the fact that there is no
 way to scale images this big (BitmapFactory pukes on images that
 large) that I know of.

 I imagine that Camera users that upload their pictures to the net with
 5 megapixel cameras are going to be even more unhappy, but I'm pretty
 unhappy as it is.

 Mike
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 prevent orientation change on keyboard flip until thread execution completes

2009-10-24 Thread loril...@gmail.com

When I flip the keyboard, the layout changes from portrait to
landscape, activity is recreated but any background thread keeps
running.

How can I prevent orientation change/activity from being recreated
until my background thread finishes.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: USSD

2009-10-24 Thread Nandy

Hi,

Do you want to keep the screen on for the complete duration of USSD
session? Or do you want the screen to be on for normal user setting
timeout value, and not timeout while typing user response as is done
today?

Thanks,
Satirtha Nandy

On Oct 23, 8:53 am, neil reuel.j...@gmail.com wrote:
 - Im a developer creating a USSD client app, I have a problem on USSD
 phone session which my android phone turns screen off during my
 session. Is there a way i can disable screen off when im in USSD
 mode.

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