For some strange reason I get
android.content.ActivityNotFoundException: No Activity found to handle Intent {
act=android.intent.action.VIEW dat=geo:0,0?q=Fitness24Seven, Malmö }
This application worked perfectly before I updated Eclipse. I tried searching SO for similiar issues but without luck. It may be something with the manifest intent filter, but I don't understand how to do it (IF that is the issue).
Here is my code:
package se.projektledningett.studentimalmo;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
public class Fitness24SevenScreen extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_fitness24_seven_screen);
// Show the Up button in the action bar.
//setupActionBar();
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.fitness24_seven_screen, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of this
// activity, the Up button is shown. Use NavUtils to allow users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
public void openFitness24SevenWebpage(View view){
Uri uriUrl = Uri.parse("http://www.fitness24seven.com");
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
}
public void openFitness24SevenMap(View view){
Uri uri = Uri.parse("geo:0,0?q=Fitness24Seven, Malmö");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
}
Below is the manifest:
<activity
android:name="se.projektledningett.studentimalmo.Fitness24SevenScreen"
android:label="@string/title_activity_fitness24_seven_screen"
android:parentActivityName="se.projektledningett.studentimalmo.FitnessTrainingScreen2" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="se.projektledningett.studentimalmo.FitnessTrainingScreen2" />
</activity>
I don't understand why this occured after the update. I am getting really frustrated about all the strange errors that randomly apperas with Eclipse, the code and the environment. I really do not want to see any more android once this stupid project of mine is finished. If this isn't solved it will fail miserably. Why did it work perfectly before the update?