Android Question Static SMS intent filter

Discussion in 'Android Questions' started by b4auser1, Mar 2, 2015.

  1. b4auser1

    b4auser1 Well-Known Member Licensed User

    AddReceiverText(svcSMSReceiver,
    <intent-filter android:priority="-1000">
    <action android:name="android.provider.Telephony.SMS_RECEIVED" />
    </intent-filter>)

    I have used Static SMS intent filter as it described in Tutorial,
    because: Static receivers always work. If the process is not running then it will be created.
    but if I kill my application thru applications in Android settings, then my service is not started automtically after SMS received. What is wrong ?

    P.S. Except the case with killing, service in my application receives and processes all the incoming SMS correctly.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    This is how Android works (starting from Android 4 I think). If the user explicitly kills your app it will not be started again until the user has explicitly started it.
     
  3. b4auser1

    b4auser1 Well-Known Member Licensed User

    Is there a workaround to force starting service after application being killed by user ?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    No. StartServiceAt will not work as well as it also uses an intent filter.
     
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