On Apr 5, 10:45 am, Gorka Hernando <[email protected]> wrote:
> Hi again,
>
> Sorry if I am posting too much, but I really need to make this work
> today.
> Here it is my manifest file. I have created a service and a receiver
> to get the NDEF_DISCOVERED intent.
>
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>       package="com.android.nfcvoicereader" android:versionCode="1"
> android:versionName="1.0">
>     <uses-sdk android:minSdkVersion="10" />
>
>     <application android:icon="@drawable/icon" android:label="@string/
> app_name">
>     <service android:enabled="true" android:name="MyService"></
> service>
>     <receiver android:enabled="true"
> android:name="com.android.MyIntentReceiver">
>                 <intent-filter>
>                 <action android:name="android.intent.action.MAIN" />
>                 <category
> android:name="android.intent.category.LAUNCHER" />
>             </intent-filter>
>
>             <intent-filter>
>                 <action android:name="android.nfc.action.NDEF_DISCOVERED"/
>
>                         <data android:mimeType="text/plain" />
>
>                         <category 
> android:name="android.intent.category.DEFAULT"/>
>             </intent-filter>
>     </receiver>
>
>     <uses-feature android:name="android.hardware.nfc"
> android:required="true" />
>     </application>
> </manifest>
>
> Inside my project there is a receiver class which should get the
> intent so that I can start the service.
>
> public class MyIntentReceiver extends BroadcastReceiver {
>         static final String TAG = "BROADCAST RECEIVER";
>
>           @Override
>           public void onReceive(Context _context, Intent _intent) {
>             .....
>          }
>
> }
>
> Can someone tell me what I am doing wrong ??
>

See Context docs to find a method that starts a service

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to