Android 70??????????????
???????????? ???????[ 2013/4/12 10:17:06 ] ????????????
????42. ???????Android?г????????????FrameLayout(??????)??LinearLayout (???????)??AbsoluteLayout(????)??RelativeLayout(??????)??TableLayout(?????)
????43. ???????Android??????洢??????.SharedPreferences???
??????. ????洢???
????44. ???????ContentProvider???????????????????????????????????Content provider???????????????????????????Contentprovider?У????????????????????????д??Content provider??????
????45. ???????Service????????Service??Android?е?service??????windows?е?service??service????????????????棬???????????в???????????????
????????????????????????????
???????????
??????????????Service??
????public class SMSService extends Service { }
?????????????AndroidManifest.xml????е????????????????:
????????Context.startService()??Context.bindService
????????????????У???????????Context.startService()??Context.bindService()?????????????????????????
?????????Service?????????????ó????????????
????1.???startService()???????÷???????????????????й??????????????????????????????С?
???????bindService()???????÷??????????????????????????????????????????????
????2.????Context.startService()????????????????δ?????????????????÷????onCreate()??????
???????????onStart()?????????????startService()??????????????????????ε???startService()??????
???????????δ??????????????ε???onStart()??????
????????startService()??????????????????Context.stopService()?????????????????????????
????onDestroy()??????
????3.????Context.bindService()????????????????δ?????????????????÷????onCreate()??????
???????????onBind()???????????????????????????????????????????????÷????onUnbind()??????
?????????????onDestroy()?????????????bindService()????????????????????ε???bindService()??????????
?????????δ?????????(????onCreate()??onBind()????????????ε???)??????????????????????????
??????????????????unbindService()??????????÷?????????????÷????onUnbind()-->onDestroy()??????
????????Service??????????
????1.Service?????????????????????£?
????onCreate() ?÷???????????????????÷????????????Σ????????????startService()??bindService()??????
??????????????????Ρ? onDestroy()?÷???????????????á?
????2. Context.startService()???Service?й?????????????
????onStart() ??в???Context.startService()??????????????????÷??????÷???????????????????á?
??????ε???startService()????????????δ?????????onStart()????????ε??á?
????3. Context.bindService()???Service?й?????????????
????onBind()??в???Context.bindService()??????????????????÷??????÷????????????????????????
??????????????????????????ε???Context.bindService()????????????÷???????ε??á?
????onUnbind()??в???Context.bindService()??????????????????÷??????÷?????????????????????????á?
?????????
????1. ????startService()???????
????Intent intent =new Intent(DemoActivity.this?? DemoService.class);
????startService(intent);
????2.Context.bindService()???
????Intent intent =new Intent(DemoActivity.this?? DemoService.class);
????bindService(intent?? conn?? Context.BIND_AUTO_CREATE);
????//unbindService(conn);//?????
??????

???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11