Android Question Msgbox2 not allowed in Starter service?

Discussion in 'Android Questions' started by hatzisn, Jan 31, 2018.

  1. hatzisn

    hatzisn Active Member Licensed User

    Hi everybody,

    I recently faced an error trying to ask the user if he likes to send an e-mail from the Application_Error sub in starter service. Isn't it allowed in the starter service to use MsgBox and MsgBox2 dialogues? Any advice will be highly appreciated...

    Thanks
     
  2. Emme Developer

    Emme Developer Well-Known Member Licensed User

    You cannot use Msgbox and Msgbox2 in a service (not only starter service), as them are UI element. You can start an intent to send the email, or you can send a notification or start an activity and then the msgbox. I don't recommend to ask the user if wants to send an error report by the way, you should handle it internally
     
  3. hatzisn

    hatzisn Active Member Licensed User

    Thanks a lot Emme!
     
  4. eurojam

    eurojam Well-Known Member Licensed User

    I think in general dialogs from services are not allowed. May be a notification will be possible...or start an activity
     
  5. udg

    udg Expert Licensed User

    Another way, if you want the user to choose whether or not email you about an eventual app error.
    Let the user flag an option in your Settings activity.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice