Android四大組件之Service

第一種方式: 通過start方式開啓服務 使用service的步驟: 定義一個類繼承Service; manifest.xml文件中配置Service; 使用context.startService(Intent)啓動Service; 不使用時,調用context.stopService(Intent)停止服務; 使用start方式啓動的生命週期: onCreate() -> onStartCom
相關文章
相關標籤/搜索