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 Powellpackage com.example.android.support.appnavigation.app;
178739b58f7860d8d03916b9a529d1fd5950937626Adam Powell
188739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport com.example.android.support.appnavigation.R;
198739b58f7860d8d03916b9a529d1fd5950937626Adam Powell
208739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport android.app.Activity;
218739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport android.content.Intent;
228739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport android.os.Bundle;
238739b58f7860d8d03916b9a529d1fd5950937626Adam Powellimport android.view.View;
248739b58f7860d8d03916b9a529d1fd5950937626Adam Powell
258739b58f7860d8d03916b9a529d1fd5950937626Adam Powellpublic class OutsideTaskActivity extends Activity {
268739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    @Override
278739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    protected void onCreate(Bundle savedInstanceState) {
288739b58f7860d8d03916b9a529d1fd5950937626Adam Powell        super.onCreate(savedInstanceState);
298739b58f7860d8d03916b9a529d1fd5950937626Adam Powell        setContentView(R.layout.outside_task);
308739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    }
318739b58f7860d8d03916b9a529d1fd5950937626Adam Powell
328739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    public void onViewContent(View v) {
338739b58f7860d8d03916b9a529d1fd5950937626Adam Powell        Intent intent = new Intent(Intent.ACTION_VIEW)
348739b58f7860d8d03916b9a529d1fd5950937626Adam Powell                .setType("application/x-example")
358739b58f7860d8d03916b9a529d1fd5950937626Adam Powell                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
368739b58f7860d8d03916b9a529d1fd5950937626Adam Powell        startActivity(intent);
378739b58f7860d8d03916b9a529d1fd5950937626Adam Powell    }
388739b58f7860d8d03916b9a529d1fd5950937626Adam Powell}
39