P
Pommes9485
Fortgeschrittenes Mitglied
- 6
Schönen Sonntag erstmal!
Ich hänge momentan an einer Stelle und leider kann auch Google mir nicht helfen -.-
Ich starte in der MainActivity einen Intent (android.intent.action.send_multiple)und bekomme immer den Fehler:
ActivityNotFoundException (android.intent.action.send_multiple): no activity found to handle intent
Leider komme ich da überhaupt nicht weiter. Hier meine Datein:
Die Manifest Datei:
Ich hoffe ihr könnt mir helfen.
Ich hänge momentan an einer Stelle und leider kann auch Google mir nicht helfen -.-
Ich starte in der MainActivity einen Intent (android.intent.action.send_multiple)und bekomme immer den Fehler:
ActivityNotFoundException (android.intent.action.send_multiple): no activity found to handle intent
Leider komme ich da überhaupt nicht weiter. Hier meine Datein:
Code:
package com.MB.fotowallpaper;
import java.util.ArrayList;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcelable;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.GridLayout;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button bt1 = (Button) findViewById(R.id.button1);
bt1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
getImages();
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent intent) {
if (intent.hasExtra(Intent.EXTRA_STREAM)) {
ArrayList<Parcelable> list = intent
.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
for (Parcelable p : list) {
Uri uri = (Uri) p;
Log.i("URI", uri.getPath());
}
}
}
private void getImages() {
Intent i = new Intent(Intent.ACTION_SEND_MULTIPLE);
startActivityForResult(i, 0);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.MB.fotowallpaper"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.MB.fotowallpaper.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
</application>
</manifest>
Ich hoffe ihr könnt mir helfen.