×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    12

    Setting "Flight mode" on Harmattan

    Hi,

    how can I set Flight Mode on Harmattan? There is a function that can do that:

    bool MeeGo::QmDeviceMode::setMode ( DeviceMode mode )

    http://harmattan-dev.nokia.com/docs/...eviceMode.html

    Unfortunately it seems to require mce:eviceModeControl credential, which is not available to third parties according to this page:

    http://wiki.meego.com/User:Javispedr...ecurity_policy

    Is there any way to implement this functionality? It has been requested by many users to my application ProfileMatic. The same thing applies on setting Power Saving Mode, this too has been requested.

    Both are features I very well understand why people would want automatically managed by ProfileMatic. Which makes this situation frustrating.

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: Setting "Flight mode" on Harmattan

    Here is sample code, Something u can do like :


    Code:
     devModeChanged (
     	        MeeGo::QmDeviceMode::DeviceMode mode)
    	{
    		    SYS_DEBUG("newmode %d", mode);
    	#ifdef DEBUG
    	    switch (mode)
    	    {
    	        case MeeGo::QmDeviceMode::Flight:
    	            SYS_DEBUG ("mode = Flight mode");
    	            break;
    	        case MeeGo::QmDeviceMode::Normal:
    	            SYS_DEBUG ("mode = Normal");
    	            break;
    	        default:
    	            SYS_DEBUG ("mode = Error!!!");
    	            break;
    	    }

  3. #3
    Registered User
    Join Date
    Jul 2011
    Posts
    12

    Re: Setting "Flight mode" on Harmattan

    Thanks,

    but I do know the system calls. The issue is that setting device mode requires credential mce:eviceModeControl, and if I try to request that credential in Aegis file, I get an error during package install:

    denied 'mce:eviceModeControl' -- origin '' does not allow it

    The result of that is that the system call doesn't work.

  4. #4
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Setting "Flight mode" on Harmattan

    Hi,
    I've spoken with MeeGo SW guys and all the methods requiring that token will be removed from the harmattan reference manual soon.

  5. #5
    Registered User
    Join Date
    Jul 2011
    Posts
    12

    Re: Setting "Flight mode" on Harmattan

    Quote Originally Posted by gnuton View Post
    Hi,
    I've spoken with MeeGo SW guys and all the methods requiring that token will be removed from the harmattan reference manual soon.
    Not the best possible course of action, IMO, as those methods could still be useful with Open Mode kernel.

  6. #6
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    200

    Re: Setting "Flight mode" on Harmattan

    Quote Originally Posted by ajalkane View Post
    Not the best possible course of action, IMO, as those methods could still be useful with Open Mode kernel.
    I agree. IMHO it's also better to find out that you are not allowed to do something, than not finding anything and keep searching. This of course requires that restricted tokens are documented within normal documentation.

  7. #7
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Setting "Flight mode" on Harmattan

    Thanks guys for your feedback, I will update MeeGo SW guys and suggest to don't remove the documentation but just to mark it as not usable with stock kernel.

  8. #8
    Registered User
    Join Date
    Jul 2011
    Posts
    12

    Re: Setting "Flight mode" on Harmattan

    Quote Originally Posted by gnuton View Post
    Thanks guys for your feedback, I will update MeeGo SW guys and suggest to don't remove the documentation but just to mark it as not usable with stock kernel.
    Thanks for following up on this. And I also agree with mikko's point. It can be a huge time saver to at least know something can not be done.

  9. #9
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Setting "Flight mode" on Harmattan

    Hi
    MeeGo guys has been informed and they agreed!
    So the documentation won't be removed, but those classes will be marked as "unusable" with the stock harmattan kernel.

  10. #10
    Registered User
    Join Date
    Jul 2011
    Posts
    69

    Re: Setting "Flight mode" on Harmattan

    Do I understand it right that this also means there is no way for 3th party applications to set flight mode?
    I also need this feature for my SleepAnalyser!

    Beside of that, I am missing another API method:
    Setting an alarm like done with the clock application.
    I and others tried to adapt the timed sample program, but had no success (search in this forum and at meego.com for info).
    Setting an alarm (with notification on lock screen and sound even in silent mode) is IMHO a feature that should be open for 3th party applications!

    Beside of all, what is the point of locking 3th party applications out of those API methods?
    Unless Nokia builds their own applications fulfilling all needs, it really limits the popularity of the N9!

  11. #11
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Setting "Flight mode" on Harmattan

    To set the device in flight mode you should interact with MCE daemon via DBus (source: http://wiki.maemo.org/Documentation/...ystem_Software).
    If AEGIS doesn't blocks the dbus calls app->MCE, I guess you can bypass this protection.

  12. #12
    Registered User
    Join Date
    Jul 2011
    Posts
    12

    Re: Setting "Flight mode" on Harmattan

    Quote Originally Posted by gnuton View Post
    To set the device in flight mode you should interact with MCE daemon via DBus (source: http://wiki.maemo.org/Documentation/...ystem_Software).
    If AEGIS doesn't blocks the dbus calls app->MCE, I guess you can bypass this protecti]
    .
    Unfortunately aegis is smart enough to block also dbus calls. So no, it won't work.

  13. #13
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Setting "Flight mode" on Harmattan

    Sad, so no way!

  14. #14
    Registered User
    Join Date
    Jul 2011
    Posts
    69

    Re: Setting "Flight mode" on Harmattan

    We should create a bug report for those issues. How ever I do not expect any improvements from Nokias side
    Without access to those functionality, my app is not really worthy to be ported to Harmattan

  15. #15
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Setting "Flight mode" on Harmattan

    Hi,
    Depend on the issue you want to report. Missing AEGIS tokens won't be updated.
    I fought for enough time to understand there is no way to have them.
    So filing issue related to those is quite useless.

Similar Threads

  1. Qt Creator and Harmattan "No such file or directory"
    By Sasler in forum [Archived] Qt SDKs and Tools
    Replies: 7
    Last Post: 2011-11-09, 20:47
  2. How to modify the control pane label "OK" and "Cancel" of Text Setting item
    By misfit.physics in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-02-27, 05:39
  3. Keypad input mode "Abc" and "123"
    By fafou in forum Symbian
    Replies: 0
    Last Post: 2003-06-23, 09:59
  4. Replies: 2
    Last Post: 2002-05-29, 07:17
  5. Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×