Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does my intent shut off the application?
    text
    copied!<p>This intent at the bottom of the page simply says that it is unable to start the event. I have tried to use this intent to start every other activity, and it just doesn't work whereas the intent to start anything in my main activity work just fine... anyway any feedback is appreciated.</p> <pre><code>package com.chich; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageView; import android.widget.Toast; public class second_activity extends Activity { @Override public void onCreate( Bundle savedInstanceState ) { super.onCreate( savedInstanceState ); setContentView( R.layout.main2 ); getWindow().setWindowAnimations( 0 ); Toast toast=Toast.makeText(this, "Your incoming texts and calls are now being blocked.", 2000); toast.setGravity(Gravity.TOP, -30, 50); toast.show(); ImageView Image2 = ( ImageView ) findViewById( R.id.Image2 ); Image2.setOnClickListener( new OnClickListener() { @Override public void onClick( View Image2 ) { Intent intent = new Intent(second_activity.this, third_activity.class); startActivity(intent); } }); } } </code></pre> <p>Manifest file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.chich" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="8" /&gt; &lt;uses-permission android:name="android.permission.SEND_SMS"&gt; &lt;/uses-permission&gt; &lt;uses-permission android:name="android.permission.RECEIVE_SMS"&gt; &lt;/uses-permission&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;activity android:name=".chich_activity" android:label="@string/app_name" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name=".second_activity" android:label="@string/app_name"&gt; &lt;intent-filter&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name=".third_activity" android:label="@string/app_name"&gt; &lt;intent-filter&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;receiver android:name=".SmsReceiver"&gt; &lt;intent-filter android:priority="9999999" &gt; &lt;action android:name = "android.provider.Telephony.SMS_RECEIVED" /&gt; &lt;/intent-filter&gt; &lt;/receiver&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>I'm not sure what it means but here's my LogCat info: 02-08 03:11:00.062: D/UnlockClock(2500): GMT_update mRightNow.getTimeZone().getID() == America/Los_Angeles 02-08 03:11:00.077: D/UnlockClock(2500): GMT_update current == America/Los_Angeles, TimeZone.getTimeZone(current).getID() == America/Los_Angeles 02-08 03:11:05.319: D/dalvikvm(17812): GC_EXPLICIT freed 6871 objects / 411088 bytes in 151ms 02-08 03:11:07.058: I/3gw.Service(3071): Mobile Network connected - not roaming 02-08 03:11:07.527: D/dalvikvm(2500): GC_FOR_MALLOC freed 39720 objects / 2083360 bytes in 94ms 02-08 03:11:14.194: D/dalvikvm(16583): GC_EXPLICIT freed 413 objects / 21640 bytes in 138ms 02-08 03:11:19.179: D/dalvikvm(18220): GC_EXPLICIT freed 168 objects / 9000 bytes in 124ms 02-08 03:11:27.089: D/dalvikvm(17515): GC_EXPLICIT freed 3 objects / 72 bytes in 221ms 02-08 03:11:32.269: D/dalvikvm(2664): GC_EXPLICIT freed 579 objects / 35824 bytes in 239ms 02-08 03:11:39.866: D/dalvikvm(16088): GC_EXPLICIT freed 854 objects / 26864 bytes in 186ms</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload