problem in service in manifest file

by Honest » Mon, 17 Aug 2009 18:47:29 GMT


Sponsored Links
 Hello,

I have created the one class named MyService which extends Service. it
is in com.saltriver.service package. Now  can some one tell me how i
should specified it in anroidmanfiest.xml file. The following is
content of xml file but it is giving error in <service>. so can some
one tell me what is wrong in it.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=" http://schemas.android.com/apk/res/android" ;
      package="com.saltriver.service"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".ServiceExample"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <service android:name=".service.MyService"/>

<intent-filter>


</intent-filter>

</service>
    <uses-sdk android:minSdkVersion="3" />
</manifest>


--~--~---------~--~----~------------~-------~--~----~



problem in service in manifest file

by String » Mon, 17 Aug 2009 21:33:30 GMT


 It'd be helpful if you said what error you're getting.

First off, what you've posted isn't valid XML, the service element's
getting closed twice. Take the / out of the opening tag.

Second, if you get an error of "Class .service.MyService does not
exist", try changing your opening service tag to:
<service android:name=".MyService">

String




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Samdroid Tools gak muncul habis root

As subject napa ya kok habis root pakai lk-2.02 update,samdroid tools nga 
muncul ya?

Tapi mesti apply samdroid 1.0.3 update baru bisa muncul samdroid tools buat 
app2sd

Apa memang mesti begitu ya?

Mohon pencerahannya

-- 
"Indonesian Android Community [id-android]" 

2. remove checkboxpreference in preferencescreen

Hi,
Your requirement is not quite clear. You need to put some light on it.

What I understood is, you have an XML, where you have defined some
preferences. Then, you show them in a PreferenceActivity (using
addPreferencesFromResource).
Now, there is one checkbox type preference, which you dont want your
user to be able to change.

I am assuming that you are willing to change that preference from code
(otherwise, how is it going to be changed?)

So, just remove that checkbox preference from your XML. Then, your
user will not able to see it.

Then, add/read/modify that preference from code.
In preferences, there is an edit() method, which return an Editor. You
can incove putBoolean(String key, boolean value) on the Editor to add
a key-value.
Dont forget to call commit().


Regards
Sarwar Erfan





-- 

3. Fwd: Image flicker

4. Android Library Project

5. Codec for BlueZ

6. Farewell, we hardly knew ye

7. Largest Android application?