Ram
Ram

Reputation: 1697

Android Dictionary not working

I wrote my own dictionary definition words in my dictionary application. But whenever i launching my dictionary application in my emulator default android dictionary working won't working my app dictionary. I changed all the provider permission,manifest file all those things. But dictionary not working.

Manifest:

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

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_dictionary"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

         <!-- The default activity of the app; displays search results. -->
        <activity android:name=".SearchBook"
                  android:launchMode="singleTop">

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

            <!-- Receives the search request. -->
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
                <!-- No category needed, because the Intent will specify this class component-->
            </intent-filter>

            <!-- Points to searchable meta data. -->
            <meta-data android:name="android.app.searchable"
                       android:resource="@xml/searchable" />

        </activity>

        <!-- Displays the definition of a word. -->
        <activity android:name=".WordActivity" />

        <!-- Provides search suggestions for words and their definitions. -->
        <provider android:name=".DictionaryProvider"
                  android:authorities="com.example.searchbook.DictionaryProvider" />

        <!-- Points to searchable activity so the whole app can invoke search. -->
        <meta-data android:name="android.app.default_searchable"
                   android:value=".SearchBook" />


    </application>

</manifest>

Upvotes: 1

Views: 708

Answers (1)

mehmetminanc
mehmetminanc

Reputation: 1379

"com.example.searchbook" seems like convention of android for sample apps. There may be an existing app named exactly like that. As you pointed out it launches the default. Try to refactor it to something else like "com.stackoverflow.karthi".

Upvotes: 2

Related Questions