18739b58f7860d8d03916b9a529d1fd5950937626Adam Powell/*
28739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * Copyright (C) 2012 The Android Open Source Project
38739b58f7860d8d03916b9a529d1fd5950937626Adam Powell *
48739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * Licensed under the Apache License, Version 2.0 (the "License");
58739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * you may not use this file except in compliance with the License.
68739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * You may obtain a copy of the License at
78739b58f7860d8d03916b9a529d1fd5950937626Adam Powell *
88739b58f7860d8d03916b9a529d1fd5950937626Adam Powell *      http://www.apache.org/licenses/LICENSE-2.0
98739b58f7860d8d03916b9a529d1fd5950937626Adam Powell *
108739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * Unless required by applicable law or agreed to in writing, software
118739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * distributed under the License is distributed on an "AS IS" BASIS,
128739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * See the License for the specific language governing permissions and
148739b58f7860d8d03916b9a529d1fd5950937626Adam Powell * limitations under the License.
158739b58f7860d8d03916b9a529d1fd5950937626Adam Powell */
168739b58f7860d8d03916b9a529d1fd5950937626Adam Powell
178739b58f7860d8d03916b9a529d1fd5950937626Adam Powellpackage com.example.android.support.appnavigation.app;
188739b58f7860d8d03916b9a529d1fd5950937626Adam Powell
198739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport android.app.Activity;
208739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport android.content.Intent;
218739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport android.os.Bundle;
228739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport android.view.View;
238739b58f7860d8d03916b9a529d1fd5950937626Adam Powell
24def582a5836579a3fadabfdbe4413cb1652bf098Aurimas Liutikasimport androidx.core.app.TaskStackBuilder;
25def582a5836579a3fadabfdbe4413cb1652bf098Aurimas Liutikas
26def582a5836579a3fadabfdbe4413cb1652bf098Aurimas Liutikasimport com.example.android.support.appnavigation.R;
27def582a5836579a3fadabfdbe4413cb1652bf098Aurimas Liutikas
288739b58f7860d8d03916b9a529d1fd5950937626Adam Powellpublic class InterstitialMessageActivity extends Activity {
298739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    @Override
308739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    protected void onCreate(Bundle savedInstanceState) {
318739b58f7860d8d03916b9a529d1fd5950937626Adam Powell        super.onCreate(savedInstanceState);
328739b58f7860d8d03916b9a529d1fd5950937626Adam Powell        setContentView(R.layout.interstitial_message);
338739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    }
348739b58f7860d8d03916b9a529d1fd5950937626Adam Powell
358739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    public void onViewContent(View v) {
368739b58f7860d8d03916b9a529d1fd5950937626Adam Powell        TaskStackBuilder.from(this)
378739b58f7860d8d03916b9a529d1fd5950937626Adam Powell                .addParentStack(ContentViewActivity.class)
388739b58f7860d8d03916b9a529d1fd5950937626Adam Powell                .addNextIntent(new Intent(this, ContentViewActivity.class)
398739b58f7860d8d03916b9a529d1fd5950937626Adam Powell                        .putExtra(ContentViewActivity.EXTRA_TEXT, "From Interstitial Notification"))
408739b58f7860d8d03916b9a529d1fd5950937626Adam Powell                .startActivities();
418739b58f7860d8d03916b9a529d1fd5950937626Adam Powell        finish();
428739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    }
438739b58f7860d8d03916b9a529d1fd5950937626Adam Powell}
44