免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2203 | 回复: 0
打印 上一主题 下一主题

Google Android TroubleShooting [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-18 17:04 |只看该作者 |倒序浏览
Installa SDK:
1) on
http://code.google.com/android/intro/installing.html, The URL of
Android software update site for Eclipse is error, it shoule be
http://dl-ssl.google.com/android/eclipse/
1, USB mass storage path is /sdcard
2, Run telnet
1) Reboot device
2) Open terminal
3) run 'cd /; cd system; cd bin; telnet' on device
4) telnet  on remove computer.
3, The popup windows can't get response once USB is connected to PC, just kill process f-spot.exe
4, After installed,
1) .apk will be copied to /data/app
2) An empty directory with the same name as package name of .apk will be created in /data/data
3) /data/system/packages.xml will be updated
(More details please refer to Android Package Installation http://blog.csdn.net/loughsky/archive/2008/11/14/3298868.aspx )
5, Root privilege
1) Telnet as root, and Add busybox:
  http://android-dls.com/wiki/index.php?title=Rooting_Android
2) Source code:
  http://www.koushikdutta.com/2008/11/fixing-su-security-hole-on-modified.html
6, G1 flash (rest)
1) Manual flash:  http://www.5dpda.com/bbs/viewthread.php?tid=20058
2) Factory reset: http://gphone.tgbus.com/jc/syjc/200811/167589.shtml
7, G1 SIM card crack
http://www.juluren.com/bbs/thread-3634-1-1.html
8, Java
1) Java regular expression
http://code.google.com/android/reference/java/util/regex/package-descr.html
http://code.google.com/android/reference/java/util/regex/Matcher.html
http://code.google.com/android/reference/java/util/regex/Pattern.html
9, Launch application
1) From shell
  usage: am [start|instrument]
       am start [-a ] [-d ] [-t ]
                [-c  [-c ] ...]
                [-e   [-e   ...]
                [-n ] [-D] []
       am instrument [-e  ] [-p ]
                [-w]
        
For example, launch an application whose manifest are:
        

   
   
         
            
               
           
         
   
        
Command is: #am start -n net.xiashou.android/net.xiashou.android.HelloAndroid      
Other usage:
a) Launch browser to open an URI: #am start -a android.intent.action.VIEW -d http://www.xiashou.net
b) Call out: #am start -a android.intent.action.CALL -d tel:10086
c) Launch google map to locate TianJing: #am start -a android.intent.action.VIEW
geo:0,0?q=tianjin
2) From on activate:
Use Intent.
For example, launch an activate whose manifest is:
   
   
        
            
               
               
            
        
        
            
               
               
            
        
   

Launch code is:
Intent intent = new Intent("android.intent.action.superuser");
startActivityForResult(intent, SUPERUSER_REQUEST);
10, Multiple activities
http://www.apkcn.com/android-80860-1-1.html
http://blog.csdn.net/Class_Raito/archive/2008/11/27/3390737.aspx
11, Handler & Runnable  & Thread
1)
Handler
:
Provide a type of message process policy, each Handler instance is
bound to a single thread and that thread's message queue. A Handler
instance just like HWnd of Microsoft Windows, but different from
Windows, both Message and the specified object -- Runnable can be send
to destination thread's message queue. If Message will be send, Handler
must be extended to overload member function
handleMessage(Message)
; If Runnable will be send, Runnable must be extended to overload member function
run
().
2)
Runnable
: Just declare a uniform interface.
3)
Thread
:
A Thread is a unit of concurrent execution. Througn Thread, we can
avoid performing long-running operations directly in the UI thread —
the main thread of an application where the UI is run — or your
application may be blocked and become unresponsive
4) Example:
Handling Expensive Operations in the UI Thread
12, Send Http Request
http://blog.atrexis.com/index.cfm/2008/6/20/Sending-HTTP-requests-in-Android
http://dotphone.org/redirect.php?tid=33&goto=lastpost
http://dev.shufou.com/?p=28
URL url = new URL("www.baidu.com");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoInput(true);
conn.setConnectTimeout(10000);
conn.setRequestMethod(HttpURLConnection.GET);
conn.setRequestProperty("accept", "*/*");
String location = conn.getRequestProperty("location");
int resCode = conn.getResponseCode();
InputStream stream = conn.getInputStream();
13, Convert resource string id to String in Activity sub-class
String str = getResources().getString(R.string.str_id);
14, Java Net Excpetion
1)
When establish network connection using socket, SocketException is
throwed, and exception readable string is:
java.net.SocketException:Connection reset.
Solution: add android.permission.INTERNET to application manifest
2) Android java.net.SocketException: The connection was reset
Reason: The time out value is too long, try 10 seconds.
15, Define language(International) and screen orientation(Portrait/Landscape) dependent resource
http://code.google.com/intl/zh-CN/android/devel/resources-i18n.html
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/9577/showart_1728185.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP