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 )
[url]http://harmattan-dev.nokia.com/docs/library/html/qmsystem2/classMeeGo_1_1QmDeviceMode.html[/url]
Unfortunately it seems to require mce::DeviceModeControl credential, which is not available to third parties according to this page:
[url]http://wiki.meego.com/User:Javispedro/Activities_blocked_by_the_N9_and_N950_security_policy[/url]
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.
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;
}
[/CODE]
Re: Setting "Flight mode" on Harmattan
Thanks,
but I do know the system calls. The issue is that setting device mode requires credential mce::DeviceModeControl, and if I try to request that credential in Aegis file, I get an error during package install:
denied 'mce::DeviceModeControl' -- origin '' does not allow it
The result of that is that the system call doesn't work.
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.
Re: Setting "Flight mode" on Harmattan
[QUOTE=gnuton;874796]Hi,
I've spoken with MeeGo SW guys and all the methods requiring that token will be removed from the harmattan reference manual soon.[/QUOTE]
Not the best possible course of action, IMO, as those methods could still be useful with Open Mode kernel.
Re: Setting "Flight mode" on Harmattan
[QUOTE=ajalkane;874801]Not the best possible course of action, IMO, as those methods could still be useful with Open Mode kernel.[/QUOTE]
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.
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.
Re: Setting "Flight mode" on Harmattan
[QUOTE=gnuton;875027]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.[/QUOTE]
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.
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.
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!
Re: Setting "Flight mode" on Harmattan
To set the device in flight mode you should interact with MCE daemon via DBus (source: [url]http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Architecture/System_Software[/url]).
If AEGIS doesn't blocks the dbus calls app->MCE, I guess you can bypass this protection.
Re: Setting "Flight mode" on Harmattan
[QUOTE=gnuton;875512]To set the device in flight mode you should interact with MCE daemon via DBus (source: [url]http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Architecture/System_Software[/url]).
If AEGIS doesn't blocks the dbus calls app->MCE, I guess you can bypass this protecti]
.[/QUOTE]
Unfortunately aegis is smart enough to block also dbus calls. So no, it won't work.
Re: Setting "Flight mode" on Harmattan
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 :(
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.