/ /次のコードでインテントが開かない-java、android、android-intent

インテントはjava、android、android-intentのコードで開かれません

これをチェックしてくれませんか? 私が見たコードの一部が必要だと思ったら、もし私が忘れてしまった部分があれば教えてください。 私はnewbostonのチュートリアルに従っていますが、ここに留まりました。IntentSQLViewは実行されず、何が問題なのかわかりません。 追伸デバッガーを使用してその中に入りたかったのですが、SQLViewクラスを認識しないようです。

マニフェスト:

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.thenewboston.travis"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />

<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".Test"
android:label="@string/app_name" >
</activity>
<activity
android:name=".Splash"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".StartingPoint"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.thenewboston.travis.STARTINGPOINT" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Menu"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.thenewboston.travis.MENU" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Prefs"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.thenewboston.travis.PREFS" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".AboutUs"
android:label="@string/app_name"
android:theme="@android:style/Theme.Dialog" >
<intent-filter>
<action android:name="com.thenewboston.travis.ABOUT" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TextPlay"
android:label="@string/app_name" >
</activity>
<activity
android:name=".Email"
android:label="@string/app_name" >
</activity>
<activity
android:name=".Camera"
android:label="Camera Application"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".OpenedClass"
android:label="Opened Class"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Data"
android:label="Data"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".GFX"
android:label="Graphic"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".GFXSurface"
android:label="Graphic GFX"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".SoundStuff"
android:label="Sound Stuff"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Slider"
android:label="Slider"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Tabs"
android:label="Tabs"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".SimpleBrowser"
android:label="Simple Browser"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Flipper"
android:label="Simple Browser"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".SharedPrefs"
android:label="Shared Preferences"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".InternalData"
android:label="InternalData"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ExternalData"
android:label="ExternalData"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".SQLiteExample"
android:label="SQLiteExample"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".SQLView"
android:label="SQLiteView"
android:screenOrientation="portrait" >
</activity>
</application>

</manifest>

SQLViewを呼び出す部分:

        try {
Intent i = new Intent("com.thenewboston.travis.SQLVIEW");
startActivity(i);
} catch (Exception e) {
e.printStackTrace();
Dialog d = new Dialog(this);
d.setTitle("Heck Yeah!");
TextView tvi = new TextView(this);
tvi.setText("we"re fucked");
d.setContentView(tvi);
d.show();

}

そして、SQLView:

package com.thenewboston.travis;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class SQLView extends Activity{

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.sqlview);
TextView tv = (TextView) findViewById(R.id.tvSQLinfo);
HotOrNot info = new HotOrNot(this);
info.open();
String data = info.getData();
info.close();
tv.setText(data);
}
}

回答:

回答№1は1

マニフェストでこれを変更します

<activity
android:name=".SQLView"
android:label="SQLiteView"
android:screenOrientation="portrait" >
</activity>

これに:

<activity
android:name=".SQLView"
android:label="SQLiteView"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.thenewboston.travis.SQLVIEW" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

マニフェストにインターネットフィルターを含める必要がありますが、おそらく忘れていました。動作するかどうかを確認してください。