Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Removing send via Bluetooth from send menu

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: mahbub_s60 (03 Jun 2010)
Last edited: hamishwillee (30 May 2013)

Contents

Description

When user selects send menu then a sub menu is displayed like send via Bluetooth. During runtime if device management software want to prevent for example sending via Bluetooth, then this solution can be used.

Solution

When the device management software want to remove the option then it can call DeInstallMtmGroup with the Mtm resource file. Once the Mtm is uninstalled then send ui will not find the Mtm and as result the menu item will not be shown. When we want to restore the option then we call InstallMtmGroup again.

Code for removing send via Bluetooth menu item.

            // English language, check for other language
_LIT(KMTMDataLocation,"z:\\resource\\messaging\\mtm\\btmtm.r01");
 
CMsvSession* session = CMsvSession::OpenSyncL(*this);
CleanupStack::PushL(session);
TInt err=session->DeInstallMtmGroup(KMTMDataLocation);
 
if (err!=KErrNone && err!=KErrNotFound)
{
User::Leave(err);
}
CleanupStack::PopAndDestroy(session); // session


Code for re storing send via Bluetooth menu item.

            // English language, check for other language
_LIT(KMTMDataLocation,"z:\\resource\\messaging\\mtm\\btmtm.r01");
CMsvSession* session = CMsvSession::OpenSyncL(*this);
CleanupStack::PushL(session);
TInt err=session->InstallMtmGroup(KMTMDataLocation);
 
if (err!=KErrNone && err!=KErrNotFound)
{
User::Leave(err);
}
CleanupStack::PopAndDestroy(session); // session

Some related articles

How to block IP packet with IPhook module based on IP address
How to prevent data sending over Infrared programatically
Removing send via Bluetooth from send menu
How to prevent web browsing with WLAN programatically

Required Capability and Example

WriteDeviceData is necessary to execute DeInstallMtmGroup() method. File:BTSendMenuOnOff.zip

This page was last modified on 30 May 2013, at 23:54.
260 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×