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