[android-developers] [Android-Java] Why String \0 is converted to [65533,65533]

2009-11-14 Thread Joes
All,
While I'm programming the Android SMTP code,I met a confused problem
with code similar as the following:
String str= \0 username \0 passwrd;
After executed the code, I found \0 is intepreted as two
undisplayable char.
Then I executed the folloing debug code:
String sZero = \0;
int iLen = sZero.length();
int iValue1 = (int)sZero.charAt(0);
int iValue2 = (int)sZero.charAt(1);
Log.w(ZERO, Zero String, Lenth=, iLen,  value1=, iValue1, 
value2=, iValue2);
What I get in screen is :
Zero String, Length=2 value1=65533 value2=65533.

Really confuse me, why \0 become [65533,65533] in my program?

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: Why String \0 is converted to [65533,65533]

2009-11-14 Thread Joes
I just wanna know, with what condition can cause this issue.  I think
it's probably because of the charset setup which is controlled by
makefile or something else. I need a direction to look into.

Thanks


On Nov 14, 9:18 am, Andrei gml...@gmail.com wrote:
 just a guess that u want to do this instead \\0

 On Nov 14, 8:58 am, Joes joyj...@gmail.com wrote:



  All,
  While I'm programming the Android SMTP code,I met a confused problem
  with code similar as the following:
      String str= \0 username \0 passwrd;
  After executed the code, I found \0 is intepreted as two
  undisplayable char.
  Then I executed the folloing debug code:
      String sZero = \0;
      int iLen = sZero.length();
      int iValue1 = (int)sZero.charAt(0);
      int iValue2 = (int)sZero.charAt(1);
      Log.w(ZERO, Zero String, Lenth=, iLen,  value1=, iValue1, 
  value2=, iValue2);
  What I get in screen is :
      Zero String, Length=2 value1=65533 value2=65533.

  Really confuse me, why \0 become [65533,65533] in my program?

  Thanks- Hide quoted text -

 - Show quoted text -

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


[android-developers] How does GoogleLoginService store user's account/passwd?

2009-11-05 Thread Joes
In my G1 phone, Once I setup the gmail account, after some time, maybe
one hour. Reboot the phone, then I will never be able to login gmail
again, I always get the log:


11-05 11:22:31.935: DEBUG/gmail-ls(257): Authentication error, token
invalidated, retrying
11-05 11:22:31.935: VERBOSE/WindowManager(104): Status bar:
mDockBottom=320 mContentBottom=320 mCurBottom=320
11-05 11:22:31.945: DEBUG/GoogleLoginService(257): no password stored
for [x...@gmail.com]
11-05 11:22:31.945: VERBOSE/WindowManager(104): Compute frame
com.google.android.gm/com.google.android.gm.ConversationListActivity:
sim=#110 pf=[0,0][480,320] df=[0,0][480,320] cf=[0,25][480,320] vf=
[0,25][480,320]


I just wonder who know the mechanism of googleloginservice to store
the account/passwd?

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


[android-developers] Question on MMS-supported media types

2009-06-12 Thread Joes

  I found some media types are not supported by MMS evenif they are
alreday supported by platform. For example, user can not attach bmp
file to MMS.
  The MMS supported mediatypes are listed in frame/base/core/java/com/
google/android/mms/ContentType.java , I modied this file ,added the
bmp mediatype to the support list, then the bmp file can be attached
to MMS and the Message is sent successfully.
   I think probably ContentType.java is just a mediatype filter for
phone maker,  it can be modifed at will based on the carrier's
requirment.  Otherwise, why does there exist a  difference between MMS
supported mediatypes and platform supported mediatypes.

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