Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am developing android native app with MFP Integrated. I have Implemented MFP push notification and it works fine. I get the notification. But when I click the notification my app restarts.

The actual issue was I have a splash activity which is launched on my app launch and where I am initializing all my MFP stuff and killing this activity taking the app to login activity.

And in My manifest file I am defining my receiver as below.

<activity
            android:name="SplashActivity"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
            <action android:name="com.mypackage.app_name.NOTIFICATION" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        </activity>

The receiver is defined in my splash activity but I am finishing this activity and going to login activity and then from login to other activities . Now splash activity is only called once in every app launch.

For this reason When I click on notification it is killing the other activities and launching splash activity again because it is asked to receive only in splash activity.

So can some body tell me how do I design my app so that I can receive the notification when I am on any activity of the app(It should not launch the splash activity but instead it should be on the same activity the app is open, and call the onrecieve message method)..

Please suggest.

I have asked a similar type of question before but could find the problem then, so I am posting this question with actual problem asking for solution. Mobilefirst PushNotification: On using wl_anonymousUserRealm at server, app is not calling onReceive method on clicking notification

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
143 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...