Skip to main content

Migrating from Message

From version 5.0, we have added all of the Message ANE functionality to this ANE and will eventually be deprecating the Message ANE in favour of this Share ANE.

The functionality between the Message and Share ANEs seemed to overlap too much so we decided to reduce overheads involved for developers and combine the two ANEs into the Share ANE.

In order to migrate from the Message ANE to the Share ANE you'll need to update the email and sms functionality separately. This guide is assuming you will be removing the Message ANE, in favour of the functionality in the Share ANE.

Firstly, remove the Message ANE from your build.

Email functionality

Email functionality in the Share ANE is accessed through the accessor, so:

if (Message.isMailSupported)
Message.service.sendMail( ... );


if (
{ ... );

Similarly for sendMailWithOptions().

Some refactoring has also been done on the associated classes:

  • Attachments: com.distriqt.extension.message.MessageAttachment ->
  • Events:
    • ->

SMS Functionality

SMS functionality in the Share ANE is accessed through the Share.service.sms accessor, so:

if (Message.service.smsManager.isSMSSupported)
Message.service.smsManager.sendSMS( ... );


if (Share.service.sms.isSMSSupported)
Share.service.sms.sendSMS( ... );

Similarly for sendSMSWithUI(), getSubscriptions(), authorisationStatus(), and requestAuthorisation().

Some refactoring has also been done on the associated classes:

  • SMS Object: com.distriqt.extension.message.objects.SMS -> com.distriqt.extension.share.sms.SMS
  • Events:
    • ->
    • ->

Share Functionality

The share functionality from the Message ANE has been removed completely as it already existed in the Share ANE.


No changes to the info additions are required.


Remove the MessageFileProvider (the ShareFileProvider will be used instead now):

android:resource="@xml/distriqt_message_paths" />

Change the package name of the AuthorisationActivity as below (message > share):

<activity android:name="com.distriqt.extension.share.permissions.AuthorisationActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />

If you are using SMS receiver functionality, remove the MessageSMSReceiver and add the following:

<receiver android:name="com.distriqt.extension.share.receivers.SMSReceiver" android:exported="true" > 
<intent-filter android:priority="1000">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />