Preferences for input method

by Andriy Tsykholyas » Tue, 02 Mar 2010 04:51:00 GMT


Sponsored Links
 Hi,

I'm working on input method. While creating the settings for it I've
stuck with the following problem: settings view (which extends
PreferenceActivity) fails to show if its package differs from the
application's package.
So, application package is "my.ime", and full name of settings view is
"my.ime.settings.MySettings". The exception is:

E/AndroidRuntime(  345): android.content.ActivityNotFoundException:
Unable to find explicit activity class {my.ime.settings/
my.ime.settings.MySettings}; have you declared this activity in your
AndroidManifest.xml?
E/AndroidRuntime(  345):        at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:
1480)
E/AndroidRuntime(  345):        at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1454)
E/AndroidRuntime(  345):        at
android.app.Activity.startActivityForResult(Activity.java:2661)
E/AndroidRuntime(  345):        at
android.app.Activity.startActivity(Activity.java:2705)
E/AndroidRuntime(  345):        at
com.android.settings.LanguageSettings.onPreferenceTreeClick(LanguageSettings.java:
271)
E/AndroidRuntime(  345):        at
android.preference.Preference.performClick(Preference.java:821)
E/AndroidRuntime(  345):        at
android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:
190)
E/AndroidRuntime(  345):        at
android.widget.AdapterView.performItemClick(AdapterView.java:284)
E/AndroidRuntime(  345):        at
android.widget.ListView.performItemClick(ListView.java:3246)
E/AndroidRuntime(  345):        at android.widget.AbsListView
$PerformClick.run(AbsListView.java:1635)
E/AndroidRuntime(  345):        at
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(  345):        at
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(  345):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  345):        at
android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime(  345):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  345):        at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  345):        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(  345):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime(  345):        at dalvik.system.NativeStart.main(Native
Method)

The AndroidManifest.xml is OK.
It also works fine if I move the settings view
(my.ime.settings.MySettings) to application package (my.ime).
Non-settings view (my.ime.view.MyActivity) also starts fine, despite
of different package name.

Does Android blocks settings views from another packages (e.g. for
security reasons)?
Or I'm just missing something?

Thanks in advance,
Andriy

--



Other Threads

1. How are SMS and MMS save on android phone

THank you.

Sms has a column PERSON_ID which saves the person ID of the sender,
but why there is such equivalent column in MMS table?

        /**
         * The person ID of the sender
         * <P>Type: INTEGER (long)</P>
         */
        public static final String PERSON_ID = "person";







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

2. how to avoid showing the temp files?

Hi every one,

I am trying to show the .kar files and .mid files which are located in
the sdcard.

For that I have written the code like:

 class MyFileFilter implements FileFilter
    {
        public boolean accept(File pathname)
        {

            if (pathname.getName().endsWith(".mid")) // audio
                        return true;

            if (pathname.getName().endsWith(".kar")) // audio
                        return true;


            return false;
        }
    }

 public void listAllMediaFiles(String path)
    {
        File cwd = new File(path);
            File[] myFiles = cwd.listFiles(new MyFileFilter());
            for (int i = 0; i < myFiles.length; i++)
            {
                String mediaFileName = myFiles[i].getName();
                mediaFilesVctr.add(mediaFileName);
                mediaFilesLocVctr.add(myFiles[i].getPath());
            }
            File []allFiles = cwd.listFiles();
            for(int len = 0;len<allFiles.length;len++)
            {
                //System.out.println(allFiles[len]);
                if(allFiles[len].isDirectory())
                {
                        listAllMediaFiles(allFiles[len].getPath());
                }
            }
    }

and I am calling listAllMediaFiles("/sdcard");

it lists all the files including some temp files also.

How can I eliminate showing the temp files?

Thanks,
Manoj.
--~--~---------~--~----~------------~-------~--~----~

3. Emulator: 1.6 SDK release Troubleshooting Proxy

4. Playing a video file from resource.

5. Global search always shows "More results... XXX (n)" for 3rd party application?

6. Global search always shows "More results... XXX (n)" for 3rd party application?

7. Why Update buffering is always 0% when mediaplayer play the rtsp ?