ติดตั้ง APK บน Android

ก่อนอื่นต้องติดตั้งโปรแกรม AppInstaller จาก Market place ก่อน
จากนั้นไปหาไฟล์ .apk มาทำการติดตั้ง อาจจะหาจาก https://slideme.org หรือ http://www.4shared.com
ที่มา thaiandroidclub.com/, zayyes.com/

วิธีแก้ไข Error: Your project contains error(s), please fix them before running your application

1) ตรวจสอบว่าได้ทำการติดตั้ง AVD แล้วหรือยัง
2) Set a target for your project (i.e.: Google APIs 1.6) โดยคลิกขวา ที่โปรเจ็กส์ของเรา แล้วเลือก Properties -> Android -> Project Build Target ให้เลือกเป็น Google APIs
 

ที่มา: http://stackoverflow.com/questions/2262294/android-application-development-oreilly-mjanddroid-example-code

วิธีแก้ไข Error: Debug certificate expired

แก้ไข ให้เป็น English

จากนั้นไปที่ "C:\Documents and Settings\<user>\.android" หรือ "C:\Documents and Settings\<user>\Local Settings\Application Data\Android" แล้วทำการลบไฟล์ debug.keystore

เสร็จแล้วให้ rebuild โปรเจ็กส์ใหม่ โดยไปที่เมนู Project>Clean ... จากนั้นก็รันตามปกติ

ติดตั้ง Android SDK บน Eclipse ด้วย Android Development Tools (ADT) Plugin

ก่อนอื่น ทำการดาวน์โหลดและติดตั้ง Eclipse เวอร์ชั่น 3.4 หรือใหม่กว่า

http://www.eclipse.org/downloads/

ดาวน์โหลด SDK (SDK download page

เซ็ต path ของ Windows ไปที่ tools/ directory

ติดตั้ง ADT Plugin

เปิด Eclipse แล้วเลือกเมนู Help > Install New Software.

Download the Android SDK

Android SDK สามารถ Download ได้ที่ http://developer.android.com

ใช้งาน External command ด้วย Python

import os
os.system("dir c:")

อ่าน-เขียนไฟล์ด้วย Python

เชียนไฟล์
f = open('/tmp/workfile', 'w')
อ่านไฟล์
f.read()
อ่านไฟล์เป็นบรรทัด
f.readline()

ตัวอย่างการใช้ pickle
http://docs.python.org/library/pickle.html

 
ที่มา: daimi.au.dk/~besen/TBiB2007/lecture-notes/persistence.html, docs.python.org/tutorial/inputoutput.html
 
 

Run a system command automatically at startup

กำหนดคำสั่งที่จะเรียกใช้ (ในที่นี้คือ /home/user/command) ไว้ใน crontab ดังนี้

sudo crontab -e
@reboot /home/user/command

หรือจะพิมพ์คำสั่งไว้ใน text ไฟล์ แล้วใช้คำสั่ง crontab textfile ก็ได้
ที่มา: help.ubuntu.com/6.10/ubuntu/desktopguide/C/ch10s04.html

Syndicate content