Android Question Google Play is reporting "Missing foreground service type"

nyinyi

Member
Please Help me.

Google Play is reporting "Missing foreground service type" to me

Problem 👇
Your app or a library it uses tried to start a foreground service without declaring a service type

Recommendation 👇
Declare the foreground service type in the manifest file and include it in the startForeground() call

Starter:
#Region  Service Attributes   #StartAtBoot: False #ExcludeFromLibrary: True
#End Region

Sub Process_Globals

End Sub

Sub Service_Create
 
End Sub

Sub Service_Start (StartingIntent As Intent)
Service.StopAutomaticForeground
End Sub

Sub Service_TaskRemoved
 
End Sub

Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub

Sub Service_Destroy

End Sub

Sub JobDone(Request As HttpJob)
Try  

If Request.Success Then

Select Request.JobName  
  
Case "app"     
 
If IsPaused(Main)=False Then CallSubDelayed2(Main,"Check_Update",Request.GetString)                

Case "live"       

 If IsPaused(Home)=False Then

       Dim parser As JSONParser
       parser.Initialize(Request.GetString)
       Dim m As Map=parser.NextObject
File.WriteMap(File.DirInternal,"alldata",m)


  End If      

Case "twod"                  

If IsPaused(History_2D)=False Then CallSub2(History_2D,"Progress_Hide",Request.GetString)              

Case "Search"                  

If IsPaused(History_2D)=False Then CallSub2(History_2D,"CompleteDate",Request.GetString)                

Case "threed"                  

If IsPaused(History_3D)=False Then CallSub2(History_3D,"Progress_Hide",Request.GetString)                

Case "lucky"                  

If IsPaused(Tips)=False Then CallSub2(Tips,"ProgressHide",Request.GetString)                

Case "holidays"                  

If IsPaused(SET_Holidays)=False Then CallSub2(SET_Holidays,"ProgressHide",Request.GetString)              

End Select      

Else          

Select Request.JobName              

Case "app"        

If IsPaused(Main)=False Then CallSubDelayed(Main,"Error_Reload")     

Case "Search"                  

If IsPaused(History_2D)=False Then CallSub(History_2D,"ErrorDate")
        
End Select     
 
End If

Catch  

Log(LastException)

End Try

Request.Release

End Sub
 
Last edited:

mcqueccu

Well-Known Member
Licensed User
Longtime User
 
Upvote 0

nyinyi

Member
which one is better 👇

Sub Service_Start (StartingIntent As Intent)
Service.StopAutomaticForeground
End Sub

Or

Private Sub Service_Timeout(Params As Map)
Service.StopForeground(51042) 'this is the id of the automatic foreground notification
End Sub
 
Upvote 0
Top