Search in sources :

Example 1 with ActorIntentActivity

use of im.actor.sdk.intents.ActorIntentActivity in project actor-platform by actorapp.

the class ActorSDK method returnToRoot.

public static void returnToRoot(Context context) {
    Intent i;
    ActorIntent startIntent = ActorSDK.sharedActor().getDelegate().getStartIntent();
    if (startIntent != null && startIntent instanceof ActorIntentActivity) {
        i = ((ActorIntentActivity) startIntent).getIntent();
    } else {
        i = new Intent(context, RootActivity.class);
    }
    i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    context.startActivity(i);
}
Also used : RootActivity(im.actor.sdk.controllers.root.RootActivity) ActorIntentActivity(im.actor.sdk.intents.ActorIntentActivity) ActorIntent(im.actor.sdk.intents.ActorIntent) Intent(android.content.Intent) PendingIntent(android.app.PendingIntent) ActorIntent(im.actor.sdk.intents.ActorIntent)

Aggregations

PendingIntent (android.app.PendingIntent)1 Intent (android.content.Intent)1 RootActivity (im.actor.sdk.controllers.root.RootActivity)1 ActorIntent (im.actor.sdk.intents.ActorIntent)1 ActorIntentActivity (im.actor.sdk.intents.ActorIntentActivity)1