[android-developers] 3.1 release note is wrong about FLAG_EXCLUDE_STOPPED_PACKAGES or it is a bug?

2011-06-30 Thread James Wang
Hi,
There are such words about FLAG_EXCLUDE_STOPPED_PACKAGES in 3.1's
release note:http://developer.android.com/sdk/android-3.1.html.

When neither or both of these flags is defined in an intent, the
default behavior is to include filters of stopped applications in the
list of potential targets.
In another word, if there are some Intents created in my app and are
used to start some my services in my another apk, I think it should be
ok with 3.1.
But we found it was not true. We have to change our code from new
Intent(action string) into new Intent(package,component) to
start service when it is stopped by user.

I wonder which is right?

James

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

2011-06-29 Thread James Wang
Android 3.1 introduced two new Intent flag
FLAG_EXCLUDE_STOPPED_PACKAGESFLAG_INCLUDE_STOPPED_PACKAGES.

If user stopped my app by settings app and my app was expected to be
started by BOOT_COMPLETED Intent. BOOM!
My app will not start untill user click my app's shortcut.

So if my app include only services and there is no shortcut for it in
launcher, user have no way to let it back, right?
How can I to resolve such problem?




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


[android-developers] Re: Logs not appearing in 3.1?

2011-06-29 Thread James Wang
I do not see this problem. r u sure your app is up?

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

2010-12-23 Thread James Wang
We noticed Samsung has released one addon for Nexus S but it is only
240 hdpi.

There is no way to test xhdpi with emulator?

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


[android-developers] 2.3 emulator and xhdpi support

2010-12-22 Thread James Wang
Hi,
We want test our app for xhdpi device and found no way to let emulator
to support xhdpi even by setting desnsity of avd to 320.

Have anybody had successful experience about it

Please share it.

Thanks.

James

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

2010-11-22 Thread James Wang
Hi,
Do anybody know how to keep DDMS from capturing screen on App side?

We are developing an ebook reader and don't want anybody copy our book
as images.

James

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

2010-11-22 Thread James Wang
Hi,
We are developing e-book reader app and we do not like bad-people
capture screen by ddms to pirate our books.
We wonder whether there is a way to keep DDMS from capturing screen on
app side.

Thanks.

James

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

2010-11-22 Thread James Wang
Hi,
Do anybody know how to keep DDMS from capturing screen on App side?

We are developing an ebook reader and don't want anybody copy our book
as images.

James

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


[android-developers] Re: No underline for texts candidates in html before committing

2010-08-22 Thread James Wang
We just found there is no such problem on 1.6. This bug was introduced
since 2.0.

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


[android-developers] Re: No underline for texts candidates in html before committing

2010-08-14 Thread James Wang
After digging farther, I found this is a bug of WebTextView which is
used as a specialized version of EditText used by WebView. And it is
transparent and  only redrawing when input is password  according to
WebTextView.setInPassword.

Any google UI SE can shed some light on this problem?

James

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


[android-developers] No underline for texts candidates in html before committing

2010-08-12 Thread James Wang
Hi,
When input something in EditText by softkeyboard, the

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


[android-developers] No underline for texts candidates in html before committing

2010-08-12 Thread James Wang
Hi,

When input something in EditText of app, we can differ the inputted
and inputting text by underline before committing from softkeyboard.
But it is not true in html.

Is this a bug? And is there any work arround?

Best Regards

James

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: use-library causes java.lang.ClassCastException when both apks loaded in one process

2010-07-31 Thread James Wang
Hi Dianne, thanks for your answer.
Can you tell us how to avoid this error if we have to put A and B in
the same process?

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

2010-07-31 Thread James Wang
@TreKing
Thanks for your replies. We do have some reasons to call finish
because Android did not finish one when another is shown before it.
Probably, but with your code, not Android.
Document does not say finish is not allowed to be called at onStop.
How to explain there is no problem with calling finish just after
startActivity.

@Dianne
Thanks for your replies. We do believe it is a problem with framework.
WindowManagerService.java:

private int dispatchPointer(QueuedEvent qev, MotionEvent ev, int
pid, int uid) {
if (DEBUG_INPUT || WindowManagerPolicy.WATCH_POINTER)
Log.v(TAG,
dispatchPointer  + ev);

if (MEASURE_LATENCY) {
lt.sample(3 Wait for last dispatch , System.nanoTime() -
qev.whenNano);
}

Object targetObj = mKeyWaiter.waitForNextEventTarget(null,
qev,
ev, true, false, pid, uid);

When calling finish() after startActivity,
mKeyWaiter.waitForNextEventTarge returns activity A. And after
checking A.isVisibleLW(), the key up event is discarded successfully.

When calling finish() at onStop, ANR happens in
mKeyWaiter.waitForNextEventTarge and it is seems never get out.

James

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

2010-07-29 Thread James Wang
Platform library is a choice but I do not think it can be distributed
by Market.

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


[android-developers] use-library causes java.lang.ClassCastException when both apks loaded in one process

2010-07-29 Thread James Wang
We have two apks A and B which both import one platform library by use-
library in AndroidManifest.
And they have the same android:process so they run in the same
process.

When A is finished and B is started, we got ClassCastException which
happens like codes below:

CustomedView view = (CustomedView)findViewById(R.id.customedView);

We logged findViewById(R.id.customedView).getClass() ==
CustomedView.class out  and found it was false.
So we believe Android loads the same class twice by different
classloader.

Does anyone know how to get it right although it seems to be a bug of
Android.

BTW, we found one solution like below but which seems not to be good
one.

protected void onPause() {
super.onPause();
Logger.d(TAG, kill myself);
Process.killProcess(Process.myPid());
}

Best Regards

James

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


[android-developers] finish() at onStop causes ANR

2010-07-29 Thread James Wang
We have two apks A and B.
A starts B at onBackPressed.

Doing as steps below can make ANR:
1)starts emulator and A;
2)put one finger on A and hold on it;
3)press ESC to do back key action and B is started;
4)release finger on B

ANR will happens if we call finish() at onStop. And if we call
finish() after startActivity and everything is all right.

Below is log when ANR happens:
07-28 07:08:31.586 V/WindowManager(   52): Waiting for key dispatch:
5000

07-28 07:08:36.591 V/WindowManager(   52): Finished waiting @5174450
startTime=5169441 switchTime=0 target=Window{43e68d70
com.neusoft.test.FakeFinishOnStop/
com.neusoft.test.FakeFinishOnStop.First paused=true} mLW=null mLB=null
fin=true mCurrentFocus=Window{43ce5d28
com.neusoft.test.FakeFinishOnStop/
com.neusoft.test.FakeFinishOnStop.Second paused=false}

07-28 07:08:36.591 W/WindowManager(   52): Key dispatching timed out
sending to com.neusoft.test.FakeFinishOnStop/
com.neusoft.test.FakeFinishOnStop.First

07-28 07:08:36.614 W/WindowManager(   52): Dispatch state:
{{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to
Window{43ce5d28 com.neusoft.test.FakeFinishOnStop/
com.neusoft.test.FakeFinishOnStop.Second paused=false} @ 1280300903391
lw=Window{43ce5d28 com.neusoft.test.FakeFinishOnStop/
com.neusoft.test.FakeFinishOnStop.Second paused=false}
lb=android.os.binderpr...@43e6ed18 fin=false gfw=true ed=true tts=0
wf=false fp=false mcf=Window{43ce5d28
com.neusoft.test.FakeFinishOnStop/
com.neusoft.test.FakeFinishOnStop.Second paused=false}}}

07-28 07:08:36.614 W/WindowManager(   52): Current state:  {{null to
Window{43e68d70 com.neusoft.test.FakeFinishOnStop/
com.neusoft.test.FakeFinishOnStop.First paused=true} @ 1280300916617
lw=null lb=null fin=true gfw=true ed=true tts=0 wf=false fp=true
mcf=Window{43ce5d28 com.neusoft.test.FakeFinishOnStop/
com.neusoft.test.FakeFinishOnStop.Second paused=false}}}

07-28 07:08:36.632 I/ActivityManager(   52): ANR in process:
com.neusoft.test.FakeFinishOnStop (last in
com.neusoft.test.FakeFinishOnStop)

Is this a bug?

James

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: use-library causes java.lang.ClassCastException when both apks loaded in one process

2010-07-29 Thread James Wang
Hi Dianne,

Thanks for your response.
I can understand two different classloader for different apks even who
are in the same process.

But check the codes below:
this.setContentView(R.layout.main);
CustomedView view = (CustomedView)findViewById(R.id.customedView);

I think there is nothing wrong there but the second line gives me
ClassCastException.
Why Android uses one CustomedView.class to create view in
setContentView and use another CustomedView.class to cast?

However, is there any workaround for this issue?

James

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: use-library causes java.lang.ClassCastException when both apks loaded in one process

2010-07-29 Thread James Wang
I found call System.exit(0) at A's onPause also can solve this problem.

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


[android-developers] Is onDetachedFromWindow more reliable than onStop

2010-07-02 Thread James Wang
Hi,
We developed two heavy apps, A,B.
A startActivity B and B comes back to A by startActivity too.
We record one flag in A's onStop to remember going to background and
restore that flag in onStart.
After switching between A and B rapidly, we found A's onStop often get
called by system later than B's onResume.
Sometimes even later than A's second onResume.

So we have to find the other way to tell foreground and backgroud.
We got two proposals:
1) onDetachedFromWindow
2) ActivityManager.getRunningTasks

Any words about it will be appreciated.

James

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

2010-06-25 Thread James Wang
So what Thread's ContextClassLoader for?

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

2010-06-25 Thread James Wang
Hi,
I newed a DexClassLoader to load one jar file dynamicly:

DexClassLoader cl = new DexClassLoader(my.jar,
getFilesDir().getAbsolutePath(),
null,
this.getClassLoader());

It is OK to loadClass and execute method with reflection like below:

Class? handler = Class.forName(handlerClassName);
 Method m = handler.getDeclaredMethod(
addMyPreferences,
Class.forName(android.content.Context),
 
Class.forName(android.preference.PreferenceCategory),
Class.forName(java.lang.String));
 m.invoke(handler.newInstance(), this, mExtraSettingsCategory,
defaultValue);

I want the new classloader to be the one of my activity so I can new
instance and execute method more easily like below:

HandlerClass hc = new HandlerClass();
hc.addMyPreferences(activity,category,test);

I think I have to set my cl to be default ClassLoader of Activity.
After googling web, some google guy suggest to use
Thread.currentThread().setContextClassLoader(cl) to achieve similar
thing.

However, it does not work.
I found Thread.currentThread().getContextClassLoader() is different
from Activity.class.getClassLoader().
So event I changed Thread's context classloader, Activity's
classloader is not my cl.

My question is how to change Activity's ClassLoader?

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

2010-06-25 Thread James Wang
Here is a similar discussion before.
http://groups.google.com.hk/group/android-developers/browse_thread/thread/3c12a6fb1a46e910/55f76d394266d675?q=#55f76d394266d675

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


[android-developers] Re: application's persistent not work

2010-06-23 Thread James Wang
Thanks, Dianne. We have confirmed what you said.

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


[android-developers] Re: application's persistent not work

2010-06-16 Thread James Wang
We did more research on it.
Based on Pone app, we changed our app's AndroidManifest.xml with two
platform certificate and system shareuserid.
But our app is still killed when in background.

Can anybody tell me how to make our app persisitent really?

Thanks.

James

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


[android-developers] Re: application's persistent not work

2010-06-16 Thread James Wang
Hi Dianne,
Would you shed some light on this topic?
Thanks.

James

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


[android-developers] application's persistent not work

2010-06-15 Thread James Wang
Hi,
We set our application's persistent true to make our app run forever.
(We are making new device product)
However, we found our app was still got killed during background in
emulator.
Our apps are big mem consumers and I think system maybe kill any app
without checking persistent prop when system resouce get low.
Is that true?

How can we keep our app from killing by system.

Best Regards

James

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


[android-developers] Re: application's persistent not work

2010-06-15 Thread James Wang
Hi Frank,

What you said sounds reasonable. But sdk reference tells us another
story.
Is the reference to persistent wrong?

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

2010-06-13 Thread James Wang
Thanks, YangJian.

What we want is to put all activities started by L stay in the same
task as L. So we have to set all activities`s taskAffinity the same
one.
For that reason, Single Task is not for what we want, because it is
goint to make A as root of that task which is L in fact.

Thanks, Dianne.
We just want all activities developed by as in the same task.

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


[android-developers] Re: TaskAffinity causes new instance being created when startActivity

2010-06-10 Thread James Wang
Dianne, You are right.
We did want to make an activity like launcher.

In fact, our product is more complicated than what I said above.

Below is the real plan:
1)We made an activity as the launcher L;
2)A tells L to start B;
3)B does something and tells L starts A again.

L,A,B have the same taskAffinity. And L starts B and A with NEW_TASK.

BTW, I noticed such words in SDK reference:
Similarly, a new instance of a singleTop activity may also be
created to handle a new intent. However, if the target task already
has an existing instance of the activity at the top of its stack, that
instance will receive the new intent (in an onNewIntent() call); a new
instance is not created. In other circumstances — for example, if an
existing instance of the singleTop activity is in the target task,
but not at the top of the stack, or if it's at the top of a stack, but
not in the target task — a new instance would be created and pushed on
the stack.

It says if A is singleTop, A gets created twice is supposed to be true
because A is not on the top of task.
But we did not set A as singleTop.

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


[android-developers] TaskAffinity causes new instance being created when startActivity

2010-06-09 Thread James Wang
Hi,
I have a problem about taskAffinity of Activity.
Activities A and B with the same taskAffinity.

A starts B with FLAG_ACTIVITY_NEW_TASK and the B starts A with
FLAG_ACTIVITY_NEW_TASK again.
Dumpsys activity of system gives us task stack like below:

TOP- A
  B
  A

According to SDK's reference to FLAG_ACTIVITY_NEW_TASK, the result is
supposed to be like below:
TOP - A
   B

If we did not set taskAffinity, A will not be created again but in
different task stack from B. (A and B are in different Apps)

After a little more research, we found FLAG_ACTIVITY_REORDER_TO_FRONT
is what we want.

My question is whether SDK' reference to FLAG_ACTIVITY_NEW_TASK is
wrong?

Thanks,

James

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

2010-06-09 Thread James Wang
Can anybody help me?

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


[android-developers] how browser decides html size on 2.1

2010-05-20 Thread James Wang
We have one html page whose backgroud is an image(1024px*600px) with
no-repeat.
We displayed it in Browser rightly on 1.6 HVGA(160) and WVGA(240)
emulator and scrollbar displaed on both sides.
But we got different result when testing on 2.1 HVGA(160) and
WVGA(240) emulator.
On 2.1 HVGA(160), the background image is scaled smaller and we saw
large wide margin on the right.
On 2.1WVGA (240), There are two margins on right and bottom sides.
There is no scrollbar displayed on 2.1. And we put few small element
in our html page.

Is this Browser's bug?

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

2010-05-20 Thread James Wang
Hi Dianne, would you be kind to take a look at my problem?
Thanks.

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


[android-developers] Re: Application installed twice - may be key pwd change

2010-05-06 Thread James Wang
First, If you did sign your app twice with differect key, the second
time installation is supposed to be failed.
But the fact is not. Have you tested with key password changing back?
If you found the first installed app was replaced, I think you get
cause.

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

2010-04-12 Thread James Wang
Thanks, Murphy.

This can not make our customer happy.
1. They want only footer is invisible, not half screen.
2. when scrolling to the EditText at bottom, not all of it is visible.

We wonder if there is any event that notifies IME coming out.

James

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

2010-04-09 Thread James Wang
Hi,
My customer want soft keyboard can overlap the footer(menu bar) of
window when showing up.
We noticed soft keyboard squeeze the foreground window to smaller size
when showing up. So we overrided onSizeChanged and set footer which is
in linearlayout and below one webview to be GONE.
But we got a black square where footer is and webview above was kept
the same size as before.

We guess onSizeChanged is not right place to do it and wonder if
anybody has the resolution.

Best Regards.

James

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

To unsubscribe, reply using remove me as the subject.


[android-developers] How to add activity rotation animation in 2.1 when orientation changed

2010-04-07 Thread James Wang
Hi,
I wonder whether developer can customize activity rotation animation
in 2.1 when orientation changed.
Can SDK do such thing?

Best Regards

James

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

To unsubscribe, reply using remove me as the subject.


[android-developers] How integrate my Settings Activity into Settings apk

2010-04-06 Thread James Wang
I know ime developer can create his own setting activity which will be
displayed in Settings apk.

I wonder whether there is a common way to interate any settings
activity into Settings apk.

Best Regards

James

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: How integrate my Settings Activity into Settings apk

2010-04-06 Thread James Wang
3ks.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: including my .so files in sdk.

2010-04-01 Thread James Wang
add commands like below in build/target/product/sdk:
PRODUCT_COPY_FILES += \
   $(proprietary)/libaudioeq.so:system/lib/libaudioeq.so

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: multiple user feature in android

2010-03-13 Thread James Wang
You should ask this question on android-porting because multiple user
is not supported by sdk.

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


[android-developers] Re: How do i check app close gracefully during shutdown scenario

2010-03-13 Thread James Wang
I think Not unregisterReceiver is no harm to system because power
down.
I believe the foreground activity's onDestroy will be called. As for
others, there seems be no assurance.

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

2010-03-11 Thread James Wang
Sorry, how about SQLiteDatabase.rowQuery?

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

2010-03-11 Thread James Wang
Please download android source and study packages/apps/Launcher

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

2010-03-11 Thread James Wang
I this it is there on purpose. Because you have made one IME and it
can record user inputs.
However, I did not take look at the android source.

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

2010-03-11 Thread James Wang
I do not believe Android  call BroadcastReceiver.onReceive
synchronously.

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


[android-developers] Re: How do i check app close gracefully during shutdown scenario

2010-03-10 Thread James Wang
For what?

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

2010-03-10 Thread James Wang
You mean supporting more than one user account like windows?

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

2010-03-10 Thread James Wang
AFAIK, you can not do it without making your own firmware. Because
Phone App has deep connection with framework.
You should ask this question on android-porting.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: General question: Can't we have 2 projects(same) in 2 different locations and import them in eclipse?

2010-03-10 Thread James Wang
I believe you have to change the value of /projectDescription/name
of .project file to make your two projects have different names.

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

2010-03-10 Thread James Wang
You should take a look at SQLiteDatabase.execSQL.

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

2010-03-10 Thread James Wang
I am not much sure gclog.py is only available for linux.
Maybe you can try installing python on withows and playing with it.
However, linux is recommended.

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

2010-03-09 Thread James Wang
I do not think you can do it with SDK and you should ask this question
on android-porting

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


[android-developers] Re: Unit Test Build Problems

2010-03-09 Thread James Wang
First, r u sure your Android project is runnable?
Second, r u sure you have add instrument permission in
AndroidManifest.xml?

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

2010-03-09 Thread James Wang
gclog.py (http://bigflake.com/gclog.py.txt) is recommended by
fadden( Google engineer) many times for android developers.
You can not find the same function in DDMS.

By gclog.py, you will know what exactly native heap size, vm heap size
and when memory leak happens.

Please read this thread
https://groups.google.com/group/android-developers/browse_thread/thread/52fd78125ae862a3/2a3eb8a6a993e71%3Fq%3Dandroid%2Bgclog%2302a3eb8a6a993e71ei=3KxzS-OVAqP2sALJ2IGDAwsa=tct=rescd=1source=groupsusg=AFQjCNF4o78oafegAzr-uc2FnyO4qp_1GQ

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

2010-03-08 Thread James Wang
I think you should ask this one on android-porting.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Scheduling restart of crashed service, but no call to onStart() follows

2010-03-08 Thread James Wang
No. It is depend on system.

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

2010-03-08 Thread James Wang
My suggestion is to use gclog.py to monitor vm heap and native heap.
Then analysis hprof with MAT to find the leak point.

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


[android-developers] Re: Is it possible to set minimum heap size for each application.?

2010-03-05 Thread James Wang
@mycall
#1.

The below code mean that every applications on VM start with 2Mb heap
size. correct.?
=Yes
And If I want to change initial heap size for every application, I can
do it directly. correct.?
=Yes
And according to comment, we can pass argument for heap size but in
fact there is no way to pass the parameter
because the VM is embedded in the Android runtime, not launched on the
command line.  correct.?
=AFAIK, Yes.

#2.

I searched for CUSTOM_RUNTIME_HEAP_MAX in frameworks/base/core/jni/
AndroidRuntime.cpp but I can't find at all.  ( My platform code is
ecliar. )
Now I just found below code and then I think it means max heap size,
16MB. correct.?
=Yes
16m - mega byte or mega bit .??
=B means byte

property_get(dalvik.vm.heapsize, heapsizeOptsBuf+4, 16m);

In my project, I also found below code in android make( *.mk ) file.

ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.heapsize=32m

Two codes cause same action.correct.? and 32m - mega byte or mega
bit .?
=Yes

#3. ( last )
Actually, I don't understand below sentence.
Is it possible to resize heap size in which case there is only one
tread running.?

The less-easy but better approach would be to resize the various heap
structures, which is a bit awkward but
probably doable since there's only thread running at that point where
the zygote forks.
= I do not believe heap size has something to do with thread number.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Supress the native In Call Screen and replace with 3rd party?

2010-03-05 Thread James Wang
You can do nothing on this subject with sdk.
I think you should go for some help on android porting.

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

2010-03-05 Thread James Wang
Have you read this one 
http://developer.android.com/resources/articles/avoiding-memory-leaks.html?

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


[android-developers] Re: Is it possible to set minimum heap size for each application.?

2010-03-04 Thread James Wang
Please read
https://groups.google.com/group/android-porting/browse_thread/thread/a22a9bf2d67013ac/6ffc46ab049a45a4?lnk=gstq=heap+limit#6ffc46ab049a45a4

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

2010-03-04 Thread James Wang
how did you do?

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

2010-03-04 Thread James Wang
you have been 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: How to implement answer function programmetically?

2010-03-04 Thread James Wang
I do not think you can make it with SDK, even Hint2.

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

2010-03-04 Thread James Wang
use ViewGroup.bringChildToFront and invalide please.

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

2010-03-03 Thread James Wang
you can find all kinds android os rom and install reference on
forum.xda-developers.com.
Or you can read this http://developer.htc.com/google-io-device.html.
Be careful about your magic, it is very easy to be bricked if you do
not know much about burn rom!

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


[android-developers] Re: Is it possible to set minimum heap size for each application.?

2010-03-03 Thread James Wang
What r u going to do?
To limit your app's heap size?
if so, I think you can not get it done without building android
source.
You can find what you want on android-porting.

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

2010-03-03 Thread James Wang
What kind of BroadcastReceiver?

I think you have to do it by creating, registering and unregister your
broadcastreceiver in your activity. And define your activity as member
of broadcastreceiver.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 do hide and activity when there is an activity on top redirecting me to home screen

2010-03-03 Thread James Wang

startActivity(HOME) when clicking hide button.

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

2010-02-28 Thread James Wang
My suggestion is to do as what Supporting multiple screens -
Resource directory qualifiers for screen size and density of dev
guards says.
If you sure to support WQVGA400, you should make specific layout and
drawable resource for 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] Timer cause memory leak

2010-02-26 Thread James Wang
I have three activities:MyFirstActivity(click)-MyActivity(timer)-
MyNextActivity.
And I noticed Timer cause MyActivity memory leak when digging through
hprof in Eclipse.
Below is my codes:
public class MyActivity extends Activity {

private Timer timer = new Timer();

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TimerTask task = new TimerTask() {
public void run() {
Intent intent = new Intent();

intent.setClassName(getPackageName(),
MyNextActivity.class.getName());
startActivity(intent);
finish();
}
};
timer.schedule(task, INTERVAL_TIME);
}

public void onDestroy() {
super.onDestroy();
//memory leaking happens if there is not below.
//timer = null;
}
}

If I did set timer to null in onDestroy, MyActivity will always exist
in heap. I did the flow four times and found four timers and four
MyActivity instances in heap.

Who can tell me why?

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


[android-developers] Re: Layout problems: AbsoluteLayout deprecated, how to do it now?

2010-02-26 Thread James Wang
I think you can do anything with Framelayout like absolutelayout.

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

2010-02-26 Thread James Wang
Pre-scale resource should be depend on density of screen, not
resolution.

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

2010-02-26 Thread James Wang
My suggestion is create your own content provider for this and open db
in onCreate and hold it as static.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SQLiteDiskIOException happens when querying 4000 rows data with order by japanese kanji

2010-02-21 Thread James Wang
I found another resolution for my problem.

If I create an index for orderbyed column, my problem will get gone.

After reading some docs about sqlite, it seems that using index to
order by will remove the necessary of creating journal file.

So I think creating index is a better solution.

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


[android-developers] about setting WindowManager.LayoutParams.screenBrightness

2010-02-21 Thread James Wang
We noticed some devices(not android's) support such feature:black out
screen and turn bright when someone touches it.
Our custom want us to simulate such function with android.
We trid to set WindowManager.LayoutParams.screenBrightness to make
screen dark enough but still knowing touch motion but failed.

 lp.screenBrightness = 0.039f;  //dark enough and looks dead

 lp.screenBrightness = 0.04f;  //not dark enough but knowing touch
motion

It turns out that there is no way to make our customer happy.

I think Android has nothing to do with our problem and it should be
the problem of LED screen maker. If they can make such LED, Android
will support it also. Am I right?

Best Regards.

James

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

2010-02-21 Thread James Wang
According to http://developer.android.com/intl/fr/guide/topics/ui/themes.html
you should do it after super.onCreate.

 protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
setTheme(android.R.style.Theme_Light);
setContentView(R.layout.linear_layout_3);
}

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

2010-02-21 Thread James Wang
I think your design can not deal with phone rotation.
When phone got rotated, the input can not be reserved.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SQLiteDiskIOException happens when querying 4000 rows data with order by japanese kanji

2010-02-11 Thread James Wang
After digging further, I got it.

This disk I/O error is caused because the default size(4m) of
sqlite_stmt_journals partition is too small for our query.
If I changed init.rc to make big size partition(8m), 4000 rows data
can be selected without any error.

So I wonder what is the best solution for such problem. we can not
modify user's device's firmware and impose any limition on our app,
neither.
Here is what I have thought:
1) Not get all 4000 rows data out of sqllite at one time. Do it little
by little.

Is there any other resolution?

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


[android-developers] Re: system hangs while giving Android build

2010-02-10 Thread James Wang
I did have the same experience before. I think 1G is not enough and
your disk should be good enough.

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


[android-developers] Re: Why setting TextView.Ellipsize as Marquee cause its sibling view in linearlayout redraw

2010-02-10 Thread James Wang
Thanks Romain!

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

2010-02-09 Thread James Wang
Thanks Murphy, Jens!
We are using one contentprovider two share all data amount many apps.
In fact, we are developing contentprovider as the bridge between apps
and database, sound like JDBC. Switching to a remote service sounds
like a option but we don't think it is good design that exposing one
service and one contentprovider to other apps which need process with
database.

I have to agree with Jens. In real world, content provider seems not
enough for every one.

Now we think about another option - to refactor our db design. Hope we
can get something at the end of this road.

James

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


[android-developers] Re: Why setting TextView.Ellipsize as Marquee cause its sibling view in linearlayout redraw

2010-02-09 Thread James Wang
Thanks Romain!
We are developing apps on Donut.
Next time, I will search android's bugs before asking 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: Why setting TextView.Ellipsize as Marquee cause its sibling view in linearlayout redraw

2010-02-09 Thread James Wang
Hi, Romain.

I searched http://code.google.com/p/android and found nothing about
this bug. So I guess this bug is not reported by external people.

BTW, Dev Tool -show screen update should be not reliable if what we
found is a bug. And Dev Tool-show screen has been fixed, too?
If not, I guess I need fire a bug for it.

James

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


[android-developers] SQLiteDiskIOException happens when querying 4000 rows data with order by japanese kanji

2010-02-09 Thread James Wang
This topic is moved from plateform.

Below is stack trace:

E/DatabaseUtils(  260): Writing exception to parcel
E/DatabaseUtils(  260): android.database.sqlite.SQLiteDiskIOException:
disk I/O error
E/DatabaseUtils(  260): at
android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
E/DatabaseUtils(  260): at
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
E/DatabaseUtils(  260): at
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
E/DatabaseUtils(  260): at
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
E/DatabaseUtils(  260): at
android.database.CursorToBulkCursorAdaptor.count(CursorToBulkCursorAdaptor.java:
132)
E/DatabaseUtils(  260): at
android.database.BulkCursorNative.onTransact(BulkCursorNative.java:79)
E/DatabaseUtils(  260): at android.os.Binder.execTransact(Binder.java:
287)
E/DatabaseUtils(  260): at dalvik.system.NativeStart.run(Native
Method)
D/AndroidRuntime(  253): Shutting down VM
W/dalvikvm(  253): threadid=3: thread exiting with uncaught exception
(group=0x4001aa38)
E/AndroidRuntime(  253): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  253):
android.database.sqlite.SQLiteDiskIOException: disk I/O error
E/AndroidRuntime(  253):at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
141)
E/AndroidRuntime(  253):at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
111)
E/AndroidRuntime(  253):at
android.database.BulkCursorProxy.count(BulkCursorNative.java:255)
E/AndroidRuntime(  253):at
android.database.BulkCursorToCursorAdaptor.set(BulkCursorToCursorAdaptor.java:
44)
E/AndroidRuntime(  253):at
android.content.ContentProviderProxy.query(ContentProviderNative.java:
304)
E/AndroidRuntime(  253):at
android.content.ContentResolver.query(ContentResolver.java:152)
E/AndroidRuntime(  253):at com.mycompany.test.MainActivity
$1.onClick(MainActivity.java:39)
E/AndroidRuntime(  253):at android.view.View.performClick(View.java:
2344)
E/AndroidRuntime(  253):at android.view.View.onTouchEvent(View.java:
4133)
E/AndroidRuntime(  253):at
android.widget.TextView.onTouchEvent(TextView.java:6504)
E/AndroidRuntime(  253):at
android.view.View.dispatchTouchEvent(View.java:3672)
E/AndroidRuntime(  253):at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime(  253):at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime(  253):at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime(  253):at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime(  253):at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1712)
E/AndroidRuntime(  253):at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:
1202)
E/AndroidRuntime(  253):at
android.app.Activity.dispatchTouchEvent(Activity.java:2018)
E/AndroidRuntime(  253):at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1696)
E/AndroidRuntime(  253):at
android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
E/AndroidRuntime(  253):at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  253):at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  253):at
android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime(  253):at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  253):at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  253):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(  253):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime(  253):at dalvik.system.NativeStart.main(Native
Method)

we are using such sql select column1,column2 from table order by
kanji asc to select 4000 rows data from our table and got above
error.

we did reproduce this error by executing above sql by command adb
shell sqlite3.

If we select only one column, no error happens.

I guess android imposes size limit on sqlite3's cache or something
else.

I have two question:
1. Is this a android's bug?
2. How can we avoid 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: Why setting TextView.Ellipsize as Marquee cause its sibling view in linearlayout redraw

2010-02-08 Thread James Wang
Hi, Dianne

Can you shed some light on this topic?

Any words will be appreciated.

James

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

2010-02-08 Thread James Wang
Hi,
We want to add below update sql into our contentprovider:
update tableName
   set column1 = column1 + 1
   where column1 = 50

We found current update of contentprovider does not support it, which
would not recognize the column1 of column1 + 1 as column name.

So we have to add execSQL method into ContentProvider and I think it
is dirt.

So I wonder if anyone know how to do such thing with ContentProvider
or any more elegant way to achieve it.

Best Regards

James

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

2010-02-04 Thread James Wang
I recommend you develop your app in Eclipse and build it under android
source.

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

2010-02-04 Thread James Wang

 but i find out
 if my app(a simple HelloWorld) is built by mydroid (i.e. using
 Android.mk)
 it always complains permission denied
=what's mean built by mydroid? you mean build under android source?
can you paste some logcat?

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


[android-developers] Why setting TextView.Ellipsize as Marquee cause its sibling view in linearlayout redraw

2010-02-03 Thread James Wang
Hi
We are using TextView's Ellipsize function to scrolling text in it and
there many other controls in our window.
We noticed CPU would go up to 50% if text started scrolling. After
digging deeper, we found all controls in our layout kept drawing when
texts scrolling. We wonder why? And how to avoid all controls
redrawing?

Best Regards

James

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


[android-developers] Re: Why setting TextView.Ellipsize as Marquee cause its sibling view in linearlayout redraw

2010-02-03 Thread James Wang
Below is our test project:

public class AndroidTest extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

LinearLayout ll = new LinearLayout(this);
final TextView tv = new TextView(this);
 
tv.setText(XXXkl;dfjasjkldfjksdhfjksdfhasdasdasdasdasdasdasdasdksjdf);
tv.setFocusable(true);
tv.setClickable(true);
tv.setSingleLine();
tv.setEllipsize(TruncateAt.MARQUEE);
tv.setTextColor(Color.WHITE);
tv.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
tv.setSelected(true);
}

});
ll.addView(tv, new
LinearLayout.LayoutParams(100,LayoutParams.WRAP_CONTENT));
ll.addView(new TempView(this));
setContentView(ll);
}



private class TempView extends ImageView {

public TempView(Context context) {
super(context);
setBackgroundResource(R.drawable.icon);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
Log.i(ImageView,
ImageViewImageViewImageViewImageViewImageView);
}

}

}

It's very strait and when clicking textview to start scrolling text,
TempView's onDrawing is keeping to be called!
However, we used Dev Tool -show screen update to check redraw area
and saw only textview flashing!

Who can tell me why!

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

2010-01-08 Thread James Wang
Hi

We do junit test with emma coverage report successfully but with only
one annoying problem.
R file was included in coverage report and make the report statics
less than our expected.
I find out that emmrun of emma seems be the solution but do not know
how to be used with Android.
So can anybody help me?

Best Regards

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

2009-12-28 Thread James Wang
Hi,
SDK reference says If this attribute is set to true,
onSaveInstanceState() may not be called and onCreate() will be passed
null instead of the Bundle — just as it was when the activity started
for the first time.
I verified it is not true. No matter what value I set stateNotNeeded,
onSaveInstanceState() always gets called!

Is this a bug?

James

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

2009-12-28 Thread James Wang
install it and you also need a file browser app.

Open pdf in file browser app and apdfviewer will be brought out.

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

2009-12-28 Thread James Wang
we wonder when this **may** will happen?

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

2009-12-23 Thread James Wang
How can we change the created z-order on-the-fly?
setting WindowManager.LayoutParams.type works when creating window but
not works after creating.

James

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


[android-developers] Re: Why RIL.java implements CommandInterface twice

2009-12-18 Thread James Wang
Maybe I should post it to porting group.

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

2009-12-17 Thread James Wang
We are developing a ContentProvider which is supposed to serve for
specified packages. So we want to get the caller package name. Is
there any way to achieve that?

Thanks in advanced.

James

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


  1   2   >