Java Code Examples for android.content.Intent.getType()

The following are Jave code examples for showing how to use getType() of the android.content.Intent class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: yyox   File: KF5ChatActivity.java   View Source Code Vote up 7 votes
/**
 * 处理接收到ShareIntent
 */
private void handleShareIntent() {
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();
    if (TextUtils.equals(Intent.ACTION_SEND, action) && !TextUtils.isEmpty(type)) {
        if (TextUtils.equals("text/plain", type)) {
            String content = intent.getStringExtra(Intent.EXTRA_TEXT);
            if (!TextUtils.isEmpty(content)) {
                onSendTextMessage(content);
            }
        } else if (type.startsWith("image/")) {
            Uri uri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
            if (uri != null) {
                String path = FilePathUtils.getPath(mActivity, uri);
                if (!TextUtils.isEmpty(path)) {
                    //发送图片
                    onSendImageMessage(Collections.singletonList(new File(path)));
                }
            }
        }
    }
}
 
Example 2
Project: CodeCompilerApp   File: MainActivity.java   View Source Code Vote up 7 votes
/**
 * Parses the intent
 */
private void parseIntent(Intent intent) {
    final String action = intent.getAction();
    final String type = intent.getType();

    if (Intent.ACTION_VIEW.equals(action)
            || Intent.ACTION_EDIT.equals(action)
            || Intent.ACTION_PICK.equals(action)
            && type != null) {
        // Post event
       //newFileToOpen(new File(intent
       //        .getData().getPath()), "");
        Uri uri = intent.getData();
        GreatUri newUri = new GreatUri(uri, AccessStorageApi.getPath(this, uri), AccessStorageApi.getName(this, uri));
        newFileToOpen(newUri, "");
    } else if (Intent.ACTION_SEND.equals(action) && type != null) {
        if ("text/plain".equals(type)) {
            newFileToOpen(new GreatUri(Uri.EMPTY, "", ""), intent.getStringExtra(Intent.EXTRA_TEXT));
        }
    }
}
 
Example 3
Project: style-transfer   File: MainActivity.java   View Source Code Vote up 6 votes
protected Void doInBackground(Void... regions) {
    Intent intent = getIntent();

    if (intent != null) {
        String s = intent.getType();
        if (s != null && s.indexOf("image/") != -1) {
            Uri data = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
            mImageName = "edit"+data.getLastPathSegment(); // TODO the wrong way to do this

            if (data != null) {
                InputStream input = null;
                try {
                    input = getContentResolver().openInputStream(data);
                    mDisplayedImage = BitmapFactory.decodeStream(input);

                    return null;
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                }

            }
        }
    }

    getLocalImage();
    return null;
}
 
Example 4
Project: FicsaveMiddleware   File: MainActivity.java   View Source Code Vote up 6 votes
private void setIntentFicUrl() {
    ficUrl = "";
    Intent intent = getIntent();
    if (intent != null) {
        String intentType = intent.getType();
        String intentAction = intent.getAction();
        Log.d("ficsaveM/intentReceived", intentAction + " " + intent.toString());
        if (Intent.ACTION_SEND.equals(intentAction) && intentType != null && "text/plain".equals(intentType)) {
            Matcher m = Patterns.WEB_URL.matcher(intent.getStringExtra(Intent.EXTRA_TEXT));
            while (m.find()) {
                String url = m.group();
                ficUrl = url;
                Log.d("ficsaveM/setIntFicUrl", "URL extracted: " + url);

                mGTracker.send(new HitBuilders.EventBuilder()
                        .setCategory(MAIN_PAGE_CATEGORY)
                        .setAction("Fic Url Set")
                        .setLabel(URL_LABEL + ficUrl)
                        .setValue(1)
                        .build());
                Bundle bundle = new Bundle();
                bundle.putString("Url", ficUrl);
                mFTracker.logEvent("FicUrlSet", bundle);
            }

        }
    }
}
 
Example 5
Project: CleanArchitechture   File: Logger.java   View Source Code Vote up 6 votes
public static void dump(Intent intent) {
    if (intent == null) {
        e("Intent is null");
        return;
    }

    e("Intent: action: %s", intent.getAction());

    if (intent.getPackage() != null) {
        e("  pkg: %s", intent.getPackage());
    }

    if (intent.getType() != null) {
        e("  type: %s", intent.getType());
    }

    if (intent.getComponent() != null) {
        e("  comp: %s", intent.getComponent().flattenToString());
    }

    if (intent.getDataString() != null) {
        e("  data: %s", intent.getDataString());
    }

    if (intent.getCategories() != null) {
        for (String cat : intent.getCategories()) {
            e("  cat: %s", cat);
        }
    }

    Bundle bundle = intent.getExtras();
    if (bundle != null) {
        for (String key : bundle.keySet()) {
            Object value = bundle.get(key);
            e("  extra: %s->%s", key, value);
        }
    }

}
 
Example 6
Project: quiz_helper   File: PopupActivity.java   View Source Code Vote up 6 votes
private void handleIntent() {
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();
    if (intent == null) {
        return;
    }
    if (type == null) {
        return;
    }
    //getStringExtra() may return null
    if (Intent.ACTION_SEND.equals(action) && type.equals("text/plain")) {
        mTextToProcess = intent.getStringExtra(Intent.EXTRA_TEXT);
        mTargetWord = intent.getStringExtra(Constant.INTENT_ANKIHELPER_TARGET_WORD);
        //mFbReaderBookmarkId = intent.getStringExtra(Constant.INTENT_ANKIHELPER_FBREADER_BOOKMARK_ID);
        String noteEditedByUser = intent.getStringExtra(Constant.INTENT_ANKIHELPER_NOTE);
        String updateId = intent.getStringExtra(Constant.INTENT_ANKIHELPER_NOTE_ID);
    }
    if(Intent.ACTION_PROCESS_TEXT.equals(action)&&type.equals("text/plain"))
    {
    mTextToProcess = intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT);
    }
    if(mTextToProcess ==null)
    {
    return;
    }
    populateWordSelectBox();
}
 
Example 7
Project: file.io-app   File: MainActivity.java   View Source Code Vote up 6 votes
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);

    /* Animate the views */
    MaterialIn.animate(rootView);

    /* Get the view model */
    uploadItemViewModel = ViewModelProviders.of(this).get(UploadItemViewModel.class);

    /* Handle incoming intent content */
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();
    // FIXME: Google photos URI
    if (type != null) {
        Log.d(TAG, "Receive Type: " + type);
        Uri fileUri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
        Log.d(TAG, "\nURI: " + fileUri);
        if (Intent.ACTION_SEND.equals(action) && fileUri != null) {
            handleExplicitFileShare(intent);
        }
    }
    linkTextView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            // Copy the content of the link text to Clipboard
            ClipboardManager clipboardManager = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
            ClipData clipData = ClipData.newPlainText("link", linkTextView.getText());
            if (clipboardManager != null) {
                clipboardManager.setPrimaryClip(clipData);
                Toast.makeText(MainActivity.this, getString(R.string.link_copy), Toast.LENGTH_SHORT).show();
            }
        }
    });
}
 
Example 8
Project: text_converter   File: MainActivity.java   View Source Code Vote up 6 votes
@Nullable
private String getTextFromAnotherApp() {
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();

    if (Intent.ACTION_SEND.equals(action) && type != null) {
        if (type.equals("text/plain")) {
            String text = intent.getStringExtra(Intent.EXTRA_TEXT);
            FirebaseAnalytics.getInstance(this).logEvent("open_from_another_app", new Bundle());
            return text;
        }
    }
    return null;
}
 
Example 9
Project: yt-mp3-downloader-android   File: MainActivity.java   View Source Code Vote up 6 votes
void handleIntent(){
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();

    if (Intent.ACTION_SEND.equals(action) && type != null) {
        if ("text/plain".equals(type)) {
            String youtubeUrlString = intent.getStringExtra(Intent.EXTRA_TEXT);
            String videoId = extractIdFromUrl(youtubeUrlString);
            if (youtubeUrlString != null) {
                download(checkBaseUrl+videoId);
            }
        }
    }
}
 
Example 10
Project: ankihelper   File: PopupActivity.java   View Source Code Vote up 6 votes
private void handleIntent() {
        Intent intent = getIntent();
        String action = intent.getAction();
        String type = intent.getType();
        if (intent == null) {
            return;
        }
        if (type == null) {
            return;
        }
        //getStringExtra() may return null
        if (Intent.ACTION_SEND.equals(action) && type.equals("text/plain")) {
            mTextToProcess = intent.getStringExtra(Intent.EXTRA_TEXT);
            mTargetWord = intent.getStringExtra(Constant.INTENT_ANKIHELPER_TARGET_WORD);
            mUrl = intent.getStringExtra(Constant.INTENT_ANKIHELPER_TARGET_URL);
            //mFbReaderBookmarkId = intent.getStringExtra(Constant.INTENT_ANKIHELPER_FBREADER_BOOKMARK_ID);
            String noteEditedByUser = intent.getStringExtra(Constant.INTENT_ANKIHELPER_NOTE);
            if(noteEditedByUser != null){
                mNoteEditedByUser = noteEditedByUser;
            }
            String updateId = intent.getStringExtra(Constant.INTENT_ANKIHELPER_NOTE_ID);
            mUpdateAction = intent.getStringExtra(Constant.INTENT_ANKIHELPER_UPDATE_ACTION);
            if(updateId != null && !updateId.isEmpty())
            {
                    try{
                        mUpdateNoteId = Long.parseLong(updateId);
                    }
                    catch(Exception e){

                    }
        }
}
        if (Intent.ACTION_PROCESS_TEXT.equals(action) && type.equals("text/plain")) {
                mTextToProcess = intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT);
                }
                if (mTextToProcess == null) {
            return;
        }
        populateWordSelectBox();
    }
 
Example 11
Project: Slide-RSS   File: AddFeedFromURL.java   View Source Code Vote up 6 votes
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Get intent, action and MIME type
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();

    if (Intent.ACTION_SEND.equals(action) && type != null) {
        if ("text/plain".equals(type)) {
            handleSendText(intent); // Handle text being sent

        }
    }
}
 
Example 12
Project: container   File: ActivityStack.java   View Source Code Vote up 6 votes
private void realStartActivityLocked(IBinder resultTo, Intent intent, String resultWho, int requestCode,
                                     Bundle options) {
    Class<?>[] types = mirror.android.app.IActivityManager.startActivity.paramList();
    Object[] args = new Object[types.length];
    if (types[0] == IApplicationThread.TYPE) {
        args[0] = ActivityThread.getApplicationThread.call(VirtualCore.mainThread());
    }
    int intentIndex = ArrayUtils.protoIndexOf(types, Intent.class);
    int resultToIndex = ArrayUtils.protoIndexOf(types, IBinder.class, 2);
    int optionsIndex = ArrayUtils.protoIndexOf(types, Bundle.class);
    int resolvedTypeIndex = intentIndex + 1;
    int resultWhoIndex = resultToIndex + 1;
    int requestCodeIndex = resultToIndex + 2;

    args[intentIndex] = intent;
    args[resultToIndex] = resultTo;
    args[resultWhoIndex] = resultWho;
    args[requestCodeIndex] = requestCode;
    if (optionsIndex != -1) {
        args[optionsIndex] = options;
    }
    args[resolvedTypeIndex] = intent.getType();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
        args[intentIndex - 1] = VirtualCore.get().getHostPkg();
    }
    ClassUtils.fixArgs(types, args);

    mirror.android.app.IActivityManager.startActivity.call(ActivityManagerNative.getDefault.call(),
            (Object[]) args);
}
 
Example 13
Project: aos-Video   File: CastService.java   View Source Code Vote up 6 votes
@Override
public int onStartCommand(Intent intent,int flags, int startID){
    int ret = super.onStartCommand(intent,flags, startID);
    Log.d(TAG,"onStartCommand");
    mIntent = intent;
    //save type because can be lost in PlayerService with setData.
    mType = intent.getType();
    startVideoCast(false);
    return ret;
}
 
Example 14
Project: easyfilemanager   File: DocumentsActivity.java   View Source Code Vote up 5 votes
private void buildDefaultState() {
    mState = new State();

    final Intent intent = getIntent();
    final String action = intent.getAction();
    if (IntentUtils.ACTION_OPEN_DOCUMENT.equals(action)) {
        mState.action = ACTION_OPEN;
    } else if (IntentUtils.ACTION_CREATE_DOCUMENT.equals(action)) {
        mState.action = ACTION_CREATE;
    } else if (IntentUtils.ACTION_GET_CONTENT.equals(action)) {
        mState.action = ACTION_GET_CONTENT;
    } else if (IntentUtils.ACTION_OPEN_DOCUMENT_TREE.equals(action)) {
        mState.action = ACTION_OPEN_TREE;
    } else if (DocumentsContract.ACTION_MANAGE_ROOT.equals(action)) {
        //mState.action = ACTION_MANAGE;
        mState.action = ACTION_BROWSE;
    } else{
        mState.action = ACTION_BROWSE;
    }

    if (mState.action == ACTION_OPEN || mState.action == ACTION_GET_CONTENT) {
        mState.allowMultiple = intent.getBooleanExtra(IntentUtils.EXTRA_ALLOW_MULTIPLE, false);
    }
    
    if (mState.action == ACTION_GET_CONTENT || mState.action == ACTION_BROWSE) {
        mState.acceptMimes = new String[] { "*/*" };
        mState.allowMultiple = true;
    }
    else if (intent.hasExtra(IntentUtils.EXTRA_MIME_TYPES)) {
        mState.acceptMimes = intent.getStringArrayExtra(IntentUtils.EXTRA_MIME_TYPES);
    } else {
        mState.acceptMimes = new String[] { intent.getType() };
    }

    mState.localOnly = intent.getBooleanExtra(IntentUtils.EXTRA_LOCAL_ONLY, true);
    mState.forceAdvanced = intent.getBooleanExtra(DocumentsContract.EXTRA_SHOW_ADVANCED	, false);
    mState.showAdvanced = mState.forceAdvanced
            | SettingsActivity.getDisplayAdvancedDevices(this);
    
    mState.rootMode = SettingsActivity.getRootMode(this);
}
 
Example 15
Project: okwallet   File: SendCoinsFragment.java   View Source Code Vote up 5 votes
@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setRetainInstance(true);
    setHasOptionsMenu(true);

    bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();

    backgroundThread = new HandlerThread("backgroundThread", Process.THREAD_PRIORITY_BACKGROUND);
    backgroundThread.start();
    backgroundHandler = new Handler(backgroundThread.getLooper());

    if (savedInstanceState != null) {
        restoreInstanceState(savedInstanceState);
    } else {
        final Intent intent = activity.getIntent();
        final String action = intent.getAction();
        final Uri intentUri = intent.getData();
        final String scheme = intentUri != null ? intentUri.getScheme() : null;
        final String mimeType = intent.getType();

        if ((Intent.ACTION_VIEW.equals(action) || NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action))
                && intentUri != null && "bitcoin".equals(scheme)) {
            initStateFromBitcoinUri(intentUri);
        } else if ((NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action))
                && PaymentProtocol.MIMETYPE_PAYMENTREQUEST.equals(mimeType)) {
            final NdefMessage ndefMessage = (NdefMessage) intent
                    .getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES)[0];
            final byte[] ndefMessagePayload = Nfc.extractMimePayload(PaymentProtocol.MIMETYPE_PAYMENTREQUEST,
                    ndefMessage);
            initStateFromPaymentRequest(mimeType, ndefMessagePayload);
        } else if ((Intent.ACTION_VIEW.equals(action))
                && PaymentProtocol.MIMETYPE_PAYMENTREQUEST.equals(mimeType)) {
            final byte[] paymentRequest = BitcoinIntegration.paymentRequestFromIntent(intent);

            if (intentUri != null)
                initStateFromIntentUri(mimeType, intentUri);
            else if (paymentRequest != null)
                initStateFromPaymentRequest(mimeType, paymentRequest);
            else
                throw new IllegalArgumentException();
        } else if (intent.hasExtra(SendCoinsActivity.INTENT_EXTRA_PAYMENT_INTENT)) {
            initStateFromIntentExtras(intent.getExtras());
        } else {
            updateStateFrom(PaymentIntent.blank());
        }
    }
}
 
Example 16
Project: dankbank   File: ShareActivity.java   View Source Code Vote up 5 votes
private String getFileExtension(Intent intent) {
    final String type = intent.getType();

    return type.split("\\/")[1];
}
 
Example 17
Project: memetastic   File: MemeCreateActivity.java   View Source Code Vote up 5 votes
@SuppressWarnings({"unchecked", "ConstantConditions"})
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (AppSettings.get().isEditorStatusBarHidden()) {
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
    setContentView(R.layout.memecreate__activity);
    if (AppSettings.get().isEditorStatusBarHidden()) {
        AndroidBug5497Workaround.assistActivity(this);
    }

    // Quit activity if no conf was given
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();
    if (!(Intent.ACTION_SEND.equals(action) && type.startsWith("image/")) &&
            (!getIntent().hasExtra(EXTRA_IMAGE_PATH))) {
        finish();
        return;
    }

    // Stop if data is not loaded yet (Try load in onResume, recreate activity in broadcast)
    if (MemeData.isReady()) {
        // Bind Ui
        ButterKnife.bind(this);
        _app = (App) getApplication();

        // Set _toolbar
        setSupportActionBar(_toolbar);
        if (getSupportActionBar() != null) {
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        }
        initMemeSettings(savedInstanceState);
        initMoarControlsContainer();
        initCaptionButtons();
    }
    if (savedInstanceState != null
            && savedInstanceState.containsKey("captionPosition")
            && savedInstanceState.containsKey("captionEditBar")
            && savedInstanceState.containsKey("captionText")) {
        _isBottom = savedInstanceState.getBoolean("captionPosition");
        _editBar.setVisibility(savedInstanceState.getBoolean("captionEditBar") ?
                View.VISIBLE : View.GONE);
        _create_caption.setText(savedInstanceState.getString("captionText"));
    }
}
 
Example 18
Project: SecScanQR   File: GenerateActivity.java   View Source Code Vote up 5 votes
/**
 * Standard Android on create method that gets called when the activity
 * initialized.
 */
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_generate);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    text = (EditText) findViewById(R.id.txtQR);
    image = (ImageView) findViewById(R.id.image);

    //Setup the Spinner Menu for the different formats
    Spinner spinner = (Spinner) findViewById(R.id.spinner);
    spinner.setOnItemSelectedListener(this);
    ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
            R.array.formats_array, android.R.layout.simple_spinner_item);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);


    //If the device were rotated then restore information
    if(savedInstanceState != null){
        text2Qr = (String) savedInstanceState.get(STATE_TEXT);
        text.setText(text2Qr);
    }

    // Get intent, action and MINE type and check if the intent was started by a share to modul from an other app
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();

    if (Intent.ACTION_SEND.equals(action) && type != null){
        if("text/plain".equals(type)){
            handleSendText(intent); //call method to handle sended text
        }
    }

    //OnClickListener for the "+" Button and functionality
    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            text2Qr = text.getText().toString().trim();
            if(text2Qr.equals("")){
                Toast.makeText(getApplicationContext(), getResources().getText(R.string.error_text_first), Toast.LENGTH_SHORT).show();
            } else {
                multiFormatWriter = new MultiFormatWriter();
                try{
                    BitMatrix bitMatrix = multiFormatWriter.encode(text2Qr, format, 500,500);
                    BarcodeEncoder barcodeEncoder = new BarcodeEncoder();
                    bitmap = barcodeEncoder.createBitmap(bitMatrix);
                    image.setImageBitmap(bitmap);
                } catch (Exception e){
                    Toast.makeText(activity.getApplicationContext(), getResources().getText(R.string.error_generate), Toast.LENGTH_LONG).show();
                }
            }

        }
    });

}
 
Example 19
Project: Gallery-example   File: MediaBrowser.java   View Source Code Vote up 3 votes
@Override
public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    runOnUiThread(new Runnable() {
        @Override
        public void run() {

            contextThemeWrapper = new ContextThemeWrapper(getBaseContext(), MediaBrowser.this.getTheme());

            Preferences.applyTheme(contextThemeWrapper, getBaseContext());

            ImmersiveMode.On(MediaBrowser.this);

        }
    });

    setContentView(R.layout.media_pager);

    Intent intent = getIntent();
    String action = intent.getAction();
    type = intent.getType();

    if (Intent.ACTION_VIEW.equals(action) && type != null) {

        if (type.startsWith("image/") || type.startsWith("video/")) {

            Uri imageUri = intent.getData();

            url = convertMediaUriToPath(imageUri);

        }

    }

    runOnUiThread(new Runnable() {
        @Override
        public void run() {

            initViews();

            initMediaView();

        }
    });

}
 
Example 20
Project: TinyPlanetMaker   File: MainActivity.java   View Source Code Vote up 3 votes
@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    mImageView = (ImageView) findViewById(R.id.imageView);

    mOnPlanetTouchListener = new OnPlanetTouchListener(this);

    mImageView.setOnTouchListener(mOnPlanetTouchListener);

    initDrawer();

    initToolbar();

    mNativeWrapper = new NativeWrapper();

    mSizeMinMax = getResources().getIntArray(R.array.size_seekbar_values);

    mPreviewPlanetMaker = new PlanetMaker(mNativeWrapper, PREVIEW_IMG_SIZE, mSizeMinMax);

    initTabFragment();

    Intent intent = getIntent();

    // Did the user intended to open an image?
    if (Intent.ACTION_SEND.equals(intent.getAction()) && intent.getType() != null) {

        Uri imageUri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
        if (imageUri != null) {
            FileLoader fileLoader = new FileLoader(this, isPano(imageUri));
            fileLoader.execute(imageUri);
        }


    } else {
        SharedPreferences pref = getSharedPreferences("org.hofapps.tinyplanet", Context.MODE_PRIVATE);

        if (pref.getBoolean("firstRun", true))
            showFirstTimeDialog();

        pref.edit().putBoolean("firstRun", false).commit();
    }

}