[android-developers] What does "AndroidRuntime onExit calling exit(-5)" means?

2010-07-12 Thread Wang He
What does "AndroidRuntime onExit calling exit(-5)" means?
--
current my phone work in low memory status, even adj 0 has been killed
by android low memory killer.

Also I noticed, AndroidRuntime is always exit and restart,
it's log report it is exit with code -5.

Is there anybody knows what does -5 mean?
Thanks!

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


[android-developers] Is phone low memory could lead to Browser SIGSEGV in libwebcore.so?

2010-05-23 Thread Wang He
I got many cases that browser has auto exited when user is use as
normal.

After check the logs, all code has SIGSEGVed inside libwebcore.so, it
always hard to address the issue code as it is happened inside native
C code.

But on the other hand, I notice this kind of browser crash always
happened in phone low memory status, and Browser also always print log
as E/memlog etc.

So, my question is:
Is phone low memory could lead to Browser SIGSEGV in libwebcore.so?

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: How to handle phone low memory situation more efficiently?

2010-05-16 Thread Wang He
No one care about android performance or No one ever encounter
performance issue?
Could Google guys give me some ideas?

On 5月14日, 下午12时28分, Wang He  wrote:
> By default, android use low memory killer to try to get out of phone
> low memory situation.
>
> But sometimes, the killer killed process that should not killed. That
> happened as the killer cannot understand what is "should not killed"
> from application layer.
>
> For example:
> 1) a persistent process hosting a service (like mp3 background
> playing, or a phone local search engine with DB hooks) has been
> killed, and the process itself will startup again. that sometimes drop
> into the process kill-restart-died cycle. User cannot feel that
> directly from UI, but that waste CPU and electric. or user will
> curious about why the mp3 playing in background always lost.
>
> 2) a process hosting a provider has been killed, but unfortunately a
> application is just calling the provider for data. user will see the
> application exception happened.
>
> Do you ever face a similar issue?
> And besides low memory killer, do you have any practice way to handle
> phone low memory situation more efficiently?
>
> Thanks a lot!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] How to handle phone low memory situation more efficiently?

2010-05-13 Thread Wang He
By default, android use low memory killer to try to get out of phone
low memory situation.

But sometimes, the killer killed process that should not killed. That
happened as the killer cannot understand what is "should not killed"
from application layer.

For example:
1) a persistent process hosting a service (like mp3 background
playing, or a phone local search engine with DB hooks) has been
killed, and the process itself will startup again. that sometimes drop
into the process kill-restart-died cycle. User cannot feel that
directly from UI, but that waste CPU and electric. or user will
curious about why the mp3 playing in background always lost.

2) a process hosting a provider has been killed, but unfortunately a
application is just calling the provider for data. user will see the
application exception happened.

Do you ever face a similar issue?
And besides low memory killer, do you have any practice way to handle
phone low memory situation more efficiently?

Thanks a lot!

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


[android-developers] Is adb opened on android products?

2009-11-30 Thread Wang He
Dear all

Is ADB opened on Android Products?
any details from HTC series, Moto Droid/CLIQ, Sumsung, LG etc.?

Also, from Google's perspective,  what is your recommendation to phone
manufacturers?

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: How Tab Pages switch when User Flick left/right?

2009-11-05 Thread Wang He
Anybody knows ..

On 11月2日, 下午7时05分, Wang He  wrote:
> When User flick left/right (at tab page area), Tab page will switch to
> next tab page. I want to disable this feature in my case.
>
> But I searched the source code of TabHost, TabWidget, ViewGroup,
> View
> I haven't figured out which part of code respond this feature...
> Could anyone help me?
>
> Thanks in advance!

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


[android-developers] How Tab Pages switch when User Flick left/right?

2009-11-02 Thread Wang He
When User flick left/right (at tab page area), Tab page will switch to
next tab page. I want to disable this feature in my case.

But I searched the source code of TabHost, TabWidget, ViewGroup,
View
I haven't figured out which part of code respond this feature...
Could anyone help me?

Thanks in advance!

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


[android-developers] Re: Could I read call_log by Intent?

2009-07-28 Thread Wang He

Up!

On 7月28日, 下午6时00分, Wang He  wrote:
> Ps.
>
> 1. content://call_log/calls starts
> 07-28 17:58:35.930: INFO/ActivityManager(498): Starting activity:
> Intent { action=android.intent.action.MAIN flags=0x1020 comp=
> {com.android.phone/com.android.phone.DialtactsActivity} }
>
> 2. content://call_log/calls/XXX suppose to start
> 07-28 17:59:23.549: INFO/ActivityManager(498): Starting activity:
> Intent { action=com.android.phone.action.RECENT_CALLS_DETAIL_VIEW comp=
> {com.android.phone/com.android.phone.RecentCallsDetailViewActivity}
> (has extras) }
>
> On 7月28日, 下午5时42分, Wang He  wrote:
>
>
>
> > Dear all
>
> > Here in my activity I set a call_log Uri as:
> > uri = Uri.parse("content://call_log/calls/4");
>
> > I wrote code as:
> > Intent intent = new Intent(Intent.ACTION_VIEW);
> > intent.setDataAndType(uri, getContentResolver().getType
> > (uri));
> > intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
> > startActivity(intent);
>
> > I hope I could read this call_log by auto starting activity "Dialer",
> > but got "stopped unexpectedly!"
>
> > BUT, uri string "content://call_log/calls" could work!
> > So, my question is: Is call log content provider/Resolver cannnot
> > support content://call_log/calls/XXX?
>
> > Thanks!
> > He- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Could I read call_log by Intent?

2009-07-28 Thread Wang He

Ps.

1. content://call_log/calls starts
07-28 17:58:35.930: INFO/ActivityManager(498): Starting activity:
Intent { action=android.intent.action.MAIN flags=0x1020 comp=
{com.android.phone/com.android.phone.DialtactsActivity} }

2. content://call_log/calls/XXX suppose to start
07-28 17:59:23.549: INFO/ActivityManager(498): Starting activity:
Intent { action=com.android.phone.action.RECENT_CALLS_DETAIL_VIEW comp=
{com.android.phone/com.android.phone.RecentCallsDetailViewActivity}
(has extras) }


On 7月28日, 下午5时42分, Wang He  wrote:
> Dear all
>
> Here in my activity I set a call_log Uri as:
> uri = Uri.parse("content://call_log/calls/4");
>
> I wrote code as:
> Intent intent = new Intent(Intent.ACTION_VIEW);
> intent.setDataAndType(uri, getContentResolver().getType
> (uri));
> intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
> startActivity(intent);
>
> I hope I could read this call_log by auto starting activity "Dialer",
> but got "stopped unexpectedly!"
>
> BUT, uri string "content://call_log/calls" could work!
> So, my question is: Is call log content provider/Resolver cannnot
> support content://call_log/calls/XXX?
>
> Thanks!
> He
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Could I read call_log by Intent?

2009-07-28 Thread Wang He

Dear all

Here in my activity I set a call_log Uri as:
uri = Uri.parse("content://call_log/calls/4");

I wrote code as:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, getContentResolver().getType
(uri));
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(intent);

I hope I could read this call_log by auto starting activity "Dialer",
but got "stopped unexpectedly!"

BUT, uri string "content://call_log/calls" could work!
So, my question is: Is call log content provider/Resolver cannnot
support content://call_log/calls/XXX?

Thanks!
He

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



[android-developers] How could I run a Uri based Intent in a Tab Page?

2009-06-30 Thread Wang He

Dear all

I added following code inside ApiDemos' Tabs3.java
--
Intent i=new Intent(Intent.ACTION_PICK,
Uri.parse("content://contacts/people"));

tabHost.addTab(tabHost.newTabSpec("tab4")
.setIndicator("contact list")
.setContent(i));
--
Could I do this? (No documents describe any restrictions)
OR, the

.setContent(new Intent(this, some_activity_inside_this_package.CLASS))

is the only intent type that TabHost supports?

BTW, the error msg I got is:
1. java.lang.SecurityException: Requesting code from
com.android.contacts (with uid 10006) to be run in process
com.example.android.apis (with uid 10052)

2. The exception path inside Android framework code:
TabHost.setCurrentTab() : 397
TabHost$IntentContentStrategy.getCotentView() : 730
LocalActivityManager.startActivity() : 335
LocalActivityManager.moveToState() : 122
ActivityThread.startActivityNow() : 1988
ActivityThread.performLaunchActivity() : 2041
ActivityThread.getPackageInfo() :1807

Could I understand as:
We cannot leverage ContentResolver's running object into our Tab page?

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



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

2009-04-27 Thread Wang He

1. I don't want to  recreate the activity when switching at Land &
Port, many runtime data I don't want to save and reload;
2. So I use onConfigurationChanged() facility, but I have UI for Land
& Port, What I do now is:
public void onConfigurationChanged(Configuration newConfig) {
   setContentView() again as onCreate();
  run findViewById()s as handlers will lost after
setContentView();
  setListeners for UI widgets as they will lost also;
  }

3. Is the way right I did in 2?

BRs
He

On Apr 27, 11:14 am, Dianne Hackborn  wrote:
> If you actually have resources that change due to these states, you really
> should consider letting the normal destroy/recreate behavior execute.
> Otherwise, you will just need to poke through your UI, reloading and
> resetting resources that may have changed.  There is no simple answer that
> can be given about what to do, because it depends entirely on what you need
> to have change (and you haven't said anything here about what you actually
> need to change).
>
>
>
> On Sun, Apr 26, 2009 at 7:56 PM, Wang He  wrote:
>
> > Is here anybody knows the right way?
> > Still waiting ...
>
> > BRs
> > He
>
> > On Apr 24, 4:53 pm, Wang He  wrote:
> > > Hi all
>
> > > when I use android:configChanges="keyboardHidden|orientation" in my
> > > code, the activity will not destroy and recreate when I change from
> > > portrait to landscape, only onConfigurationChanged(newConfig) will be
> > > called by framework.
>
> > > The issue is:
> > > My UI cannot refresh by default, what is the correct way in
> > > onConfigurationChanged() to refresh my UI?
>
> > > BTW, my UI is write with mylayout.xml and added to my Widget by addView
> > > (inflator(mylayout.xml),null).
>
> > > Thanks in advance!!
> > > BRs
> > > Wang He
>
> --
> 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: What is the correct way to refresh UI when I use android:configChanges="keyboardHidden|orientation"

2009-04-26 Thread Wang He

Is here anybody knows the right way?
Still waiting ...

BRs
He

On Apr 24, 4:53 pm, Wang He  wrote:
> Hi all
>
> when I use android:configChanges="keyboardHidden|orientation" in my
> code, the activity will not destroy and recreate when I change from
> portrait to landscape, only onConfigurationChanged(newConfig) will be
> called by framework.
>
> The issue is:
> My UI cannot refresh by default, what is the correct way in
> onConfigurationChanged() to refresh my UI?
>
> BTW, my UI is write with mylayout.xml and added to my Widget by addView
> (inflator(mylayout.xml),null).
>
> Thanks in advance!!
> BRs
> Wang He
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



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

2009-04-24 Thread Wang He

Hi all

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

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

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

Thanks in advance!!
BRs
Wang He

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



[android-developers] Do I using GregorianCalendar in the right way?

2009-03-06 Thread Wang He

0. I setup my Android emulator time zone to: Australia/Adelaide GMT
+10:30
1. My code snippet:

mtz = new SimpleTimeZone(8 * 60 * 60 * 1000, "Asia/Shanghai");
GregorianCalendar gc1 = new GregorianCalendar(); //using default,
that is Adelaide
GregorianCalendar gc2 = new GregorianCalendar(mtz); //using my
customized time zone

Date d1 = gc1.getTime();
Log.v(TAG, "testCalendar2: d1.toString: "+d1.toString());
Log.v(TAG, "testCalendar2: d1.toGMTString: "+d1.toGMTString());

Date d2 = gc2.getTime();
Log.v(TAG, "testCalendar2: d2.toString: "+d2.toString());
Log.v(TAG, "testCalendar2: d2.toGMTString: "+d2.toGMTString());

2. My Log.v
20:11:04.807: VERBOSE/worldclock(669): testCalendar2: d1.toString: Fri
Mar 06 20:10:55 GMT+10:30 2009
20:11:04.927: VERBOSE/worldclock(669): testCalendar2: d1.toGMTString:
6 Mar 2009 09:40:55 GMT
20:11:13.967: VERBOSE/worldclock(669): testCalendar2: d2.toString: Fri
Mar 06 20:10:55 GMT+10:30 2009
20:11:14.277: VERBOSE/worldclock(669): testCalendar2: d2.toGMTString:
6 Mar 2009 09:40:55 GMT

3. I supposed to think d2 should be the Asia/Shanghai datetime, but
GregorianCalendar.getTime always returns the default time zone based
datetime. So:

Do I using the GregorianCalendar in the right way?
Why will GregorianCalendar provides a timezone based constructor?

BRs
He

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



[android-developers] Re: How could I know the detailed capability of one content provider?

2009-02-19 Thread Wang He

Thanks, by reading the source code, I got what I want ~~

On Feb 19, 12:17 pm, Dianne Hackborn  wrote:
> The calendar provider is not currently part of the SDK, so unfortunately
> there aren't any capabilities you can use.  If you are working on platform
> code, you can look at the source code and private API to see what it can do.
>
> On Wed, Feb 18, 2009 at 7:00 PM, Wang He  wrote:
>
> > More specific, I wan to figure out all the Calendar Provider's
> > capabilty I could use.
>
> > BRs
> > He
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How could I know the detailed capability of one content provider?

2009-02-18 Thread Wang He

More specific, I wan to figure out all the Calendar Provider's
capabilty I could use.

BRs
He


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



[android-developers] How translucent works?

2008-12-26 Thread Wang He

I want my activity works with translucent effect. I did as android sdk
Apidemo - TranslucentBLurActivity did in my code. But it doesn't work.

For my code, what difference with the Apidemo is, my layout is more
complex than a simple  in Apidemo.

So, could I think as: Android's translucent API and theme only simply
works with ?

Any help?
THanks!


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



[android-developers] onSaveInstanceState() & onConfigurationChanged()

2008-12-26 Thread Wang He

When to use onSaveInstanceState() & When to use onConfigurationChanged
() ?

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