user547995
user547995

Reputation: 2085

Can't Start App (Widget Behaviour)

I have made my own sms app with a reciver.

Now the emulator doesn'T start the app when run it via eclipse. On my phone i can't press open after installing and the App Drawer doens't show my app.

the behaviour is like a widget

MY Manifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.korn.websms"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >

        <activity
            android:name=".WebSMSActivity"
            android:label="@string/app_name" >


        </activity>
        <receiver android:name=".SmsReceiver" android:exported="true" > 
      <intent-filter android:priority="999"> 
    <action android:name="android.provider.Telephony.SMS_RECEIVED" />
     </intent-filter> 
    </receiver>



    </application>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.SEND_SMS"/> 
     <uses-permission android:name="android.permission.RECEIVE_SMS"/> 
     <uses-permission android:name="android.permission.READ_SMS"/> 
     <uses-permission android:name="android.permission.READ_CONTACTS"/> 
</manifest>

Upvotes: 0

Views: 168

Answers (2)

Barak
Barak

Reputation: 16393

You are missing a couple of lines from your manifest if you are looking to launch your app from an icon on the screen...

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

The first one (MAIN) means that this activity is the entry point of the application, when you launch the application, this activity is created.

The second one (LAUNCHER) means that it should show up in the Launcher as a top level app.

Upvotes: 0

Anurag Ramdasan
Anurag Ramdasan

Reputation: 4330

you haven't declared a Main and Launcher activity that would be launched when the app is installed.

this should be declared within your main activity

   <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

Upvotes: 1

Related Questions