Not allowed to bind to service Intent

前端 未结 6 2011
时光说笑
时光说笑 2020-12-31 10:42

I write an android service of get weather, and the AndroidManifest.xml is:




        
6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 11:14

    Add an intent-filter with an action to your WeatherService:

    
        
            
        
    
    

    Then, when you go to bind with bindService() in your other app, use this intent:

    new Intent("this.is.my.custom.ACTION")
    

提交回复
热议问题