Professional Documents
Culture Documents
</intent-filter>
</activity>
<activity android:name=".WorkEnter">
</activity>
<receiver android:name=".AlarmReceiver">
</receiver>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission
android:name="android.permission.VIBRATE"/>
</manifest>
Main Activity ca chng trnh Too Do ny l activity TooDo. Ngoi ra mnh cn
c 1 Activity khc c tn l WorkEnter cho php nhp vo thi gian v ni
dung cng vic. 1 Broadcast Receiver c tn l AlarmReceiver nhn alarm gi
ti trong intent.
Khi alarm c nhn s c m thanh v rung (vibration). Tt c cng vic s c
vit trong code, nhng bt buc bn phi khai bo cc thnh phn c trong ng
dng vo AndroidManifest nu mun chng trnh hot ng.
Tng t, set permission truy nhp camera, internet, c contact... cng u
phi khai bo trong AM. T kha screenOrientation cho php thit lp giao din
khi vo ng dng theo chiu dc (portrait - mc nh) hay ngang (landscape),
theme cho php s dng style c sn ca android l full-screen (ko c thanh status
bar na).
Intent filter l b lc dng gii hn cc intent c s dng trong activity hay
receiver...
M:
<intent-filter>
<action
android:name="android.intent.action.VIEW"/>
<category
android:name="android.intent.category.DEFAULT"/>
<category
android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"
android:host="www.google.com"
android:path="/m/products/scan"/>
</intent-filter>
B lc trn ch cho php intent m internet vi ng dn nh ngha sn
(http://www.google.com/m/products/scan)
Ok, hi vng mi ngi nm c chc nng c bn cng nh cch s dng
Android Manifest
cha. y mnh dng "center" ngha l thnh phn con nm trung tm. Hy th
thm vo 1 Edit Text:
M:
android:gravity="center"