[android-developers] Re: Do the applications keep/manage their own SQLite databases (files)?

2009-08-25 Thread efan

You can create, update and delete your application database in your
application.
Follow http://developer.android.com/guide/topics/data/data-storage.html#db
to start.

On Aug 25, 2:08 am, mstu...@googlemail.com mstu...@googlemail.com
wrote:
 Hi All,

 Android includes a database engine (SQLite). In general, do the
 applications keep/manage their own databases (files) or is there a
 unifying database manager?

 Thanks,
 Matthias
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 show chinese type in english android system?

2009-08-25 Thread efan

Android is unicode based and support Chinese char display by default.
And in 1.5 (Cupcake) it even include an system app Google Pinyin IME
to input Chinese.

On Aug 25, 4:42 am, atul cd...@126.com wrote:
 How do I show chinese type in  english android system? 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: java question

2009-08-25 Thread efan

use java.lang.Process

Maybe it's better to ask pure Java questions in sun Java forum?

Good luck!

On Aug 23, 10:03 am, srinivasarao srinivasara...@gmail.com wrote:
 hi Sir,
           Take Class name as input (command line) and loads that class
 Dynamically and calls the main method in that class..how will we do
 that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 porting jarkata commons lib to android?

2009-08-25 Thread efan

http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary

On Aug 22, 8:56 am, Terry zju...@gmail.com wrote:
 hi, everyone.

 jarkata commons lib is very useful for our everyday development.

 is there any porting to android?

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



[android-developers] Re: error msg after run a thread

2009-08-19 Thread efan

The error msg pointed to the code problem clearly:
/***
CalledFromWrongThreadException: Only the original thread that created
a view hierarchy can touch its views.
***/

Such as the statement in the finally block does touch a view not
created in the new thread.

The same piece of code works in other place just by luck.

One suggestion is to use wait() and notify() mechanism to communicate
between different threads, and put any code need to touch a view in
the thread created the view.


On Aug 19, 8:24 pm, tstanly tsai.sta...@gmail.com wrote:
 hi all,

 I write a thread, and do show() after thread complete,
 but I always get the error msg bellow,
 and this show() function is ok, because I put it on other location of
 program,
 and it works fine.

 plz help me!
 thanks!

 error msg===
 E/AndroidRuntime(  746): Uncaught handler: thread Thread-8 exiting due
 to uncaug
 ht exception
 E/AndroidRuntime(  746): android.view.ViewRoot
 $CalledFromWrongThreadException: O
 nly the original thread that created a view hierarchy can touch its
 views.

 code===
 new Thread()
 {
 public void run()
  {
 try{
     } /* end of try */
 catch (Exception e)
  {
   Log.d(tsai_error1,e.getMessage());
  } /* end of catch */
 finally
  {
   mProgressDialog2.dismiss();

  } /* end of finally */
   }/* end of run */

 }.start();

 show();
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 apache commons in my android application

2009-08-19 Thread efan

http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary


On Aug 19, 5:24 pm, hap 497 hap...@gmail.com wrote:
 Thanks. But android sdk does come with apache commons, I don't think I
 should required to do that. I don't want to carry an apache commons jar if
 android has one.
 Do I need to modify my manifest file or something to use apache.commons?



 On Wed, Aug 19, 2009 at 5:04 PM, Dan Sherman impact...@gmail.com wrote:
  If you're using eclipse, add the jar to the libs folder, right click the
  project, and add it to the libraries required.

  On Wed, Aug 19, 2009 at 7:51 PM, hap 497 hap...@gmail.com wrote:

  HI,

  Can you please tell me how to use apache.commons in my android
  application.

  I put the right import, but when I compile it I get the following error:

  : package org.apache.commons.io does not exist
  import org.apache.commons.io.IOUtils;

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



[android-developers] Re: Problem with emulator

2009-08-19 Thread efan

The emulator is that slow...
Try turn off the android animation in the Eclipse run configuration.
That help a little bit in my machine.

Patient is important in Android development world - understand it this
way: the emulator is running a linux kernel in your existing OS! Once
it starts up, everything works normal. So the emulator slow is
tolerable as long as a real phone starts up quick.

On Aug 19, 1:57 pm, Ashwin Nath ashwin.nat...@gmail.com wrote:
 hello everyone i am new to android.
 i installed and configured sdk to run with my eclipse ide
 but when i started emulator it took arund 10 mins to execute my
 helloworld app??

 is this how things should be???
 or did i do something 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] Activity Lifecycle Cause Memory Leaking

2009-08-06 Thread efan

http://developer.android.com/reference/android/app/Activity.html

The Activity Lifecycle could have implementation and or design bug:
One case is to initialize a big image in onCreate(), try to reuse the
image during the whole lifecycle, and then recycle the image in
onDestroy().
Test showed that onCreate() is called every time one navigate away
from the activity and back again, but onDestroy() is not called at
all. This behavour causes memory leaking for the big image (size
960*1920). After 6+ times away and back to activity, the system runs
out of memory and has to kill the process.

One workaround is to initialize the big image in onResume() and
recycle in onPause(), but that's not so good reuse.

Could it be better to change the process (as shown in the diagram) a
little bit such as:
Call onDestroy() first when a process is killed?

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

2009-08-06 Thread efan

Tested on both 1.5-R2 and R3, same result.

On Aug 6, 10:22 pm, efan e...@efansoftware.com wrote:
 http://developer.android.com/reference/android/app/Activity.html

 The Activity Lifecycle could have implementation and or design bug:
 One case is to initialize a big image in onCreate(), try to reuse the
 image during the whole lifecycle, and then recycle the image in
 onDestroy().
 Test showed that onCreate() is called every time one navigate away
 from the activity and back again, but onDestroy() is not called at
 all. This behavour causes memory leaking for the big image (size
 960*1920). After 6+ times away and back to activity, the system runs
 out of memory and has to kill the process.

 One workaround is to initialize the big image in onResume() and
 recycle in onPause(), but that's not so good reuse.

 Could it be better to change the process (as shown in the diagram) a
 little bit such as:
 Call onDestroy() first when a process is killed?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 NOT Upgrade App in Market!

2009-06-10 Thread efan

Tried again and got error message The apk must be signed with at
least one certificate in common with the previous version.. This is
one step progress (better than no message at all) but still wrong
within the Android market app upgrade function, because,
1. I meant to try the old version apk file and got the same error
message as well.
2. I use jarsigner -verify -verbose -certs  command to verify both
the old version apk file and the new version, confirm that both signed
with the same certification key:
[certificate is valid from 5/5/09 5:26 AM to 4/29/34 5:26 AM]
The new version apk file can be found here: 
http://zz-doctor.googlecode.com/files/ZZ.apk

I can change  submit the new version as a new app, just not so
friendly to users installed old version. I like the votings I gained
but that's not so important compare to the existing users' feeling to
be ignored.

I would like to wait to the end of this week. If there was still no
any response from Android staff, I will have to say sorry to the
existing users.

On Jun 6, 6:48 pm, efan e...@efansoftware.com wrote:
 No error message after uploaded new version. But it still shows the
 old version (and old size). Tried several times, same problem.

 I managed to recover back my old key and signed the new version. (a
 little frustrated but I did make it recovered :))

 My app is Chinese Doctor Assistant (ZZ) [杏林書童(ZZ)] under Free --
 Applications -- Productivity.

 Thanks!

 P.S.-a. I have read this post but my case is different from it because
 I signed with old 
 key.http://groups.google.com/group/android-developers/browse_thread/threa...

 P.S.-b. Could Android / Google provide another better support way for
 registered developers beyond this forum? We were charged!

 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: Could NOT Upgrade App in Market!

2009-06-10 Thread efan

Mark, thanks for the information.
Yes I mean cannot be found in a search.
But the strange thing is that the search function still ok in Android
Market Help Forum. But same as here, no any Android staff response to
the post.
What happened/happening in Android/Goolge?

On Jun 8, 4:04 pm, Mark Murphy mmur...@commonsware.com wrote:
 e...@efansoftware.com wrote:
  Another post disappeared in the forum! Why???

  Could someone in Android/Google look into the problem?

 If by disappeared you mean can't be found in a search, Google
 Groups' search has been broken for a couple of weeks now. It's not just
 the Android groups.

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

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



[android-developers] RE: Could NOT Upgrade App in Market!

2009-06-08 Thread efan

Another post disappeared in the forum! Why???Could someone in Android/Google look into the problem?


 Original Message 
Subject: Could NOT Upgrade App in Market!
From: efan
Date: Sat, June 06, 2009 6:48 pm
To: Android Developers android-developers@googlegroups.com

No error message after uploaded new version. But it still shows the
old version (and old size). Tried several times, same problem.

I managed to recover back my old key and signed the new version. (a
little frustrated but I did make it recovered :))

My app is Chinese Doctor Assistant (ZZ) [杏林書童(ZZ)] under Free --
Applications -- Productivity.

Thanks!

P.S.-a. I have read this post but my case is different from it because
I signed with old key.
http://groups.google.com/group/android-developers/browse_thread/thread/d433b2ee4cb78c9c/54dbf2b526ecb411?lnk=gstq=market+upgrade+problem#54dbf2b526ecb411

P.S.-b. Could Android / Google provide another better support way for
registered developers beyond this forum? We were charged!

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] Could NOT Upgrade App in Market!

2009-06-06 Thread efan

No error message after uploaded new version. But it still shows the
old version (and old size). Tried several times, same problem.

I managed to recover back my old key and signed the new version. (a
little frustrated but I did make it recovered :))

My app is Chinese Doctor Assistant (ZZ) [杏林書童(ZZ)] under Free --
Applications -- Productivity.

Thanks!

P.S.-a. I have read this post but my case is different from it because
I signed with old key.
http://groups.google.com/group/android-developers/browse_thread/thread/d433b2ee4cb78c9c/54dbf2b526ecb411?lnk=gstq=market+upgrade+problem#54dbf2b526ecb411

P.S.-b. Could Android / Google provide another better support way for
registered developers beyond this forum? We were charged!

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: Help: 1.5 AutoCompleteTextView Problem

2009-06-06 Thread efan

The original post disappeared! (could not find in the forum!) Why?BTW, I solved part of the problem. Now it runs ok in 1.5 Emulator. Details please refer to the source changes.The NullPointException problem in eclipse visual layout still there!


 Original Message 
Subject: Help: 1.5 AutoCompleteTextView Problem
From: efan e...@efansoftware.com
Date: Thu, June 04, 2009 10:01 pm
To: Android Developers android-developers@googlegroups.com

This layout xml file contains an AutoCompleteTextView:
http://code.google.com/p/zz-doctor/source/browse/trunk/ZZ/res/layout/welcome.xml
does not show in 1.5 AVD. No error in either screen or console log.

It worked fine in 1.1, in both AVD and eclipse visual layout.

When try to open it in eclipse visual layout under android 1.5, shows
NullPointException, and following stack trace in console log:
   java.lang.NullPointerException
	at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:
458)
	at android.widget.AutoCompleteTextView.init
(AutoCompleteTextView.java:165)
	at android.widget.AutoCompleteTextView.init
(AutoCompleteTextView.java:131)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
	at android.view.LayoutInflater.createView(LayoutInflater.java:499)
	at android.view.BridgeInflater.onCreateView(BridgeInflater.java:77)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:
562)
	at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:
122)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:296)
	at com.android.layoutlib.bridge.Bridge.computeLayout(Bridge.java:371)
	at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
(Unknown Source)
	at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
(Unknown Source)
	at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.activated
(Unknown Source)
	at com.android.ide.eclipse.editors.layout.LayoutEditor.pageChange
(Unknown Source)
	at org.eclipse.ui.part.MultiPageEditorPart.setActivePage
(MultiPageEditorPart.java:973)
	at org.eclipse.ui.forms.editor.FormEditor.setActivePage
(FormEditor.java:627)
	at com.android.ide.eclipse.editors.AndroidEditor.selectDefaultPage
(Unknown Source)
	at com.android.ide.eclipse.editors.AndroidEditor.addPages(Unknown
Source)
	at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:
146)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl
(MultiPageEditorPart.java:310)
	at org.eclipse.ui.internal.EditorReference.createPartHelper
(EditorReference.java:661)
	at org.eclipse.ui.internal.EditorReference.createPart
(EditorReference.java:428)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart
(WorkbenchPartReference.java:594)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible
(PresentablePart.java:180)
	at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select
(PresentablePartFolder.java:270)
	at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select
(LeftToRightTabOrder.java:65)
	at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart
(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection
(PartStack.java:1256)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:
1209)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor
(EditorSashContainer.java:63)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout
(EditorAreaHelper.java:217)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor
(EditorAreaHelper.java:207)
	at org.eclipse.ui.internal.EditorManager.createEditorTab
(EditorManager.java:779)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor
(EditorManager.java:678)
	at org.eclipse.ui.internal.EditorManager.openEditor
(EditorManager.java:639)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched
(WorkbenchPage.java:2817)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor
(WorkbenchPage.java:2729)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:
2721)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:
2673

[android-developers] Re: Help: View Not Shown After TableLayout

2009-05-17 Thread efan

Yes, it works fine now after changed to height=wrap_content.

Thanks to all replied.

On May 16, 8:59 pm, Romain Guy romain...@google.com wrote:
 YourTableLayouthas height=fill_parent, it's therefore as tall as its
 parent, so there's no more room left on screen to show the TextView.



 On Sat, May 16, 2009 at 2:58 PM, efan e...@efansoftware.com wrote:

  I need show some text descriptionafteraTableLayoutbut it isnot
 shown.

  Layout xml file like this (the complete code is here:
 http://code.google.com/p/zz-doctor/source/browse/trunk/ZZ/res/layout/...

  LinearLayout
     ...
     TableLayout
          ...
     /TableLayout

     TextView
         android:id=@+id/rxFormulaDesc /
  /LinearLayout

  It works fine when the rxFormulaDescViewis before theTableLayout.
  But requirements want theTableLayoutshownfirst. It just doesnot
 shownup when the rxFormulaDescViewis putaftertheTableLayout. No
  error message in either screen or log. Same Java code.

  TheTableLayoutitself shows up fine - no matter hard-coded content or
  dynamic content, and anyviewbefore it also shows fine.

  I tried other type ofViewaftertheTableLayout, same result.

  Thanks for your attention!

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

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