Languages

Menu
Sites
Language
Unable to get App Settings instance of IME app

Hi,

I have to set app settings listner for IME settings. I am able to set settinglistner for non-IME UI app, but facing problem while doing the same for IME app. How do I set appsetting chang event listner? Am i missing something here? or it is a bug?

As it is mentioned in the documentation and I quote

"The AppSetting class is basically used for specific applications such as IME, which have no UI"

Following is the piece of code I used.
 
 
    AppSetting* pAppSetting = AppSetting::GetInstance();
    result r = GetLastResult();
    if(IsFailed(r)) AppLog("getting appsetting failed %s",GetErrorMessage(r));
    else // Use pAppSetting only if it is not null
    {
        r = pAppSetting->SetAppSettingEventListener(this);

        if(IsFailed(r)) AppLog("setting listner failed %s",GetErrorMessage(r));
    }

Following is the corresponding logs I see.

09-20 16:39:43.690 : INFO / testIME ( 16001 : 16001 ) : int OspMain(int, char **)(24) > Application started.
09-20 16:39:43.730 : ERROR / Tizen::Base::Collection ( 2402 : 2402 ) : virtual const Tizen::Base::Object* Tizen::Base::Collection::ArrayList::GetAt(int) const(238) > [E_OUT_OF_RANGE] The index(2) MUST be greater than or equal to 0 and less than the number of elements(2).
09-20 16:39:43.770 : ERROR / Tizen::Ui ( 16001 : 16001 ) : bool Tizen::Ui::_Control::IsVisible() const(2943) > [E_SYSTEM] This control should be attached to the main tree.
09-20 16:39:43.810 : ERROR / Tizen::Io ( 16001 : 16001 ) : result Tizen::Io::_DirEnumeratorImpl::MoveNext()(143) > [E_END_OF_FILE] End of directory entries
09-20 16:39:43.890 : ERROR / Tizen::App ( 16001 : 16001 ) : result Tizen::App::_AppSettingImpl::Load()(667) > [E_OBJ_NOT_FOUND] The instance of specified AppId does not have setting information. 09-20 16:39:43.890 : ERROR / Tizen::App ( 16001 : 16001 ) : result Tizen::App::_AppSettingImpl::Construct(const Tizen::App::AppId&, const Tizen::Base::String&)(638) > [E_SYSTEM] A system error has been occurred. Loading procedure failed.
09-20 16:39:43.890 : ERROR / Tizen::App ( 16001 : 16001 ) : static Tizen::App::_AppSettingImpl* Tizen::App::_AppSettingImpl::GetInstance()(350) > [E_SYSTEM] Propagating.
09-20 16:39:43.890 : ERROR / Tizen::App ( 16001 : 16001 ) : static Tizen::App::AppSetting* Tizen::App::AppSetting::GetInstance()(61) > [] Memory allocation failed.
09-20 16:39:43.890 : INFO / testIME ( 16001 : 16001 ) : virtual bool testIMEApp::OnAppInitialized()(77) > getting appsetting failed E_OUT_OF_MEMORY

From the logs it apperas that there is no settings file, but there is one. Follwing is the screen shot of project directories.

 

 

Thanks,

Bharath

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

6 Replies
hgw7
https://developer.tizen.org/forums/native-application-development/problem-deploying-ime-application
bharath reddy donapaati
Hgw7, Thanks for the link. but it is a different problem that is discussed on the thread . Could not find anything relevant for my issue.
Alex Dem
Hi, Looks like it should works. Try to insert your code into standart sample Tizen Native Project->Template->IME Application and check results (please remove from manifest unused 'appsetting' platform privilege level and maybe remove 'http://tizen.org/category/ime' from "category"). Maybe it could be useful to find your error. p.s. I was able to deploy but unable to launch IME app with category "http://tizen.org/category/ime" using "Run as" and did not find description how to launch such app, but maybe you know how. Alexey.
bharath reddy donapaati
Hi Alex, I have removed appsetting privilege from manifest ( I feel this step is almost necessary as required certificates are not available). If I remove ime from category, app won't appear in the list of available keyboards. I see that some one already mentioned how to launch IME, thats the only way.
hgw7
The cannot be 'Run As' error arises as IME app won't have UI. After running it, package is pushed to the device/emulator. Goto Settings -> Language and Keyboard -> Keyboard -> Keyboard Selection.. You should be able to see the IME app name that can be selected.
Alex Dem
Thank you for information. I have checked provided code based on Template->IME Application (I have selected my custom keyboard) and after App was launched I have got the same error and logs using Emulator of 2.2.0 official SDK. Alexey.