Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

I have a background service that sleeps for a minute then starts an
activity that I've created. The problem is everytime the service calls the activity, an FC error displays.

My project so far is very simple, these are the components (3):
-MyActivity0
-MyActivity1
-MyService0
How it works:
a. MyActivity0 has a button that starts MyService0.
b. MyService0 then runs and should start MyActivity1 (but this is
where I get an FC).

This is the calling code the crashes:
startActivity(new Intent(MyService0.this, MyActivity1.class));
This is the AndroidManifest.xml:
XML
<application android:icon="@drawable/icon" android:label="string/
app_name">
        <activity android:name=".MyActivity">
                <intent-filter>
                        <action android:name="android.intent.action.MAIN">
                        <category android:name="android.intent.category.LAUNCHER">
                </intent-filter>;
        </activity>
       <activity android:name=".MyActivity1">
        <service android:name="MyService0"; android:enabled="true">
</application>

-I'm using Eclipse with the latest Android SDK targetting 2.2.
-I'm seeing it crash both on the emulator and on the NexusOne.
-I've tried searching the group, and haven't found a similar problem.

Any help would be much appreciated for this beginner.

Thanks in advance.
Best Regards,
Posted
Updated 4-Oct-10 7:51am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900