Advertisement

kotlin server的应用与发展

阅读量:

本文件为个人博客系统文档的备份版本,作者为小游,作者博客地址:点击访问。以下是关于服务启动方式的说明。

复制代码
     startService(Intent(this, AlarmService::class.java))
    
    
      
    

具体的服务方式如下所示

复制代码
    class AlarmService : Service() {
    override fun onBind(intent: Intent): IBinder {
        TODO("Return the communication channel to the service.")
    }
    
    override fun onCreate() {
        super.onCreate()
        Log.e("xiaoyou","服务已启动")
        // 这里我们获取数据库里面所有的闹钟信息
        AlarmDatabase.getAllAlarm()
    }
    
    }
    
    
      
      
      
      
      
      
      
      
      
      

全部评论 (0)

还没有任何评论哟~