Sunday, February 16, 2014

android how with intent to jump to the File Manager


I want to achieve is to click a button, and then jump to the File Manager main interface, browse files.
Intent intent = new Intent ();
intent.setAction ("android.intent.action.MAIN") ;/ / this place did not achieve the desired effect for a lot of
intent.addCategory ("android.intent.category.DEFAULT");
startActivity (intent);

Which in the end is inside the parameters of the intent-filter action name? ?
Android.intent.action.SEARCH can jump with the file manager search interface
With com.mediatek.filemanager.DOWNLOAD_LOCATION can jump to download the file manager interface
You can skip to increase with com.mediatek.filemanager.ADD_FILE file (paste) interface
So have tried ......
However, the file manager can not be the main interface!
Seek expert advice twelve.
AndroidManifest.xml
Attach File Manager
  
package = "com.mediatek.filemanager"
android: versionCode = "1"
android: versionName = "1.0">

android: hardwareAccelerated = "true"
android: icon = "@ drawable / app_filemanager"
android: label = "@ string / app_name"
android: name = ". FileManagerApplication">
<-! Points to searchable activity so the whole app can invoke search -.>
android: name = "android.app.default_searchable"
android: value = "com.mediatek.filemanager.FileManagerSearchActivity" />

android: alwaysRetainTaskState = "true"
android: configChanges = "orientation | keyboardHidden | screenSize | mcc | mnc"
android: label = "@ string / app_name"
android: launchMode = "singleTask"
android: name = "FileManagerOperationActivity"
android: theme = "@ style / FileManagerOperTheme"
android: uiOptions = "splitActionBarWhenNarrow">





android: configChanges = "orientation | keyboardHidden | screenSize | mcc | mnc"
android: label = "@ string / app_name"
android: launchMode = "singleTask"
android: name = ". FileManagerSearchActivity"
android: theme = "@ style / transparent">
<-! FileManagerOperTheme ->





android: name = "android.app.searchable"
android: resource = "@ xml / searchable" />

android: configChanges = "orientation | keyboardHidden | screenSize | mcc | mnc"
android: label = "@ string / app_name"
android: name = ". FileManagerSelectPathActivity"
android: theme = "@ android: style / Theme.Holo.Light.NoActionBar">






android: configChanges = "orientation | keyboardHidden | screenSize | mcc | mnc"
android: label = "@ string / app_name"
android: name = ". FileManagerSelectFileActivity"
android: theme = "@ android: style / Theme.Holo.Light.NoActionBar">





















android: minSdkVersion = "14"
android: targetSdkVersion = "14" />

<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Their own roof ............
Reply:
So it
 Intent mIntent = new Intent (); 
ComponentName comp = new ComponentName ("com.mediatek.filemanager", "com.mediatek.filemanager.FileManagerOperationActivity");
mIntent.setComponent (comp);
mIntent.setAction ("android.intent.action.VIEW");
startActivity (mIntent);


May need to set mIntent.flag to new_task, you try it
Reply:
reference to the second floor guoyoulei520 reply:
this happen
 Intent mIntent = new Intent (); 
ComponentName comp = new ComponentName ("com.mediatek.filemanager", "com.mediatek.filemanager.FileManagerOperationActivity");
mIntent.setComponent (comp);
mIntent.setAction ("android.intent.action.VIEW");
startActivity (mIntent);


May need to set mIntent.flag to new_task, you try it
Yes, I try. Xianxie
Reply:
reference to the third floor bboyliaoye reply:
Quote: references to the second floor guoyoulei520 reply:

So it
 Intent mIntent = new Intent (); 
ComponentName comp = new ComponentName ("com.mediatek.filemanager", "com.mediatek.filemanager.FileManagerOperationActivity");
mIntent.setComponent (comp);
mIntent.setAction ("android.intent.action.VIEW");
startActivity (mIntent);


May need to set mIntent.flag to new_task, you try it
Yes, I try. Xianxie

Hello, you used to code tried, can jump to the file manager, but with me playing this application termination box (sorry XXX has stopped), you say mlntent.flag not set, then set me look.
Reply:
reference to the third floor bboyliaoye reply:
Quote: references to the second floor guoyoulei520 reply:

So it
 Intent mIntent = new Intent (); 
ComponentName comp = new ComponentName ("com.mediatek.filemanager", "com.mediatek.filemanager.FileManagerOperationActivity");
mIntent.setComponent (comp);
mIntent.setAction ("android.intent.action.VIEW");
startActivity (mIntent);


May need to set mIntent.flag to new_task, you try it
Yes, I try. Xianxie
or bomb box quit ...... me see why it bombs box
Reply:
In the end can not be achieved? If you can give me a specific talk chant
Reply:
I created an android project which add a button, click into an error, can not find the relevant class
E / AndroidRuntime (1756): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.mediatek.filemanager / com.mediatek.filemanager.FileManagerOperationActivity}; have you declared this activity in your AndroidManifest.xml?

No comments:

Post a Comment