Customize an invitation

The code on this page works with either the default UI or the custom UI.

Customize the invitation method

To introduce a new invitation method - besides the default methods like email and SMS, which we provided - customize your own invitation method by doing the following.

Define an Activity with an intent-filter in your AndroidManifest.xml.

<activity android:name="us.zoom.sdkexample.MyInviteActivity"
android:label="@string/invite_acitivity_name"
android:icon="@drawable/ic_launcher" >
  <intent-filter>
    <action android:name="us.zoom.sdkexample.intent.action.MeetingInvite"/>
    <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>
</activity>

The action name <action android:name="(here)" /> should be your application package name. For example, the demo application package name is: us.zoom.sdkexample concatenates with intent.action.MeetingInvite.

Tips The activity will be listed at the top of the invite methods list.

Next, edit your own invitation contents.

Intent intent = getIntent();
Uri uri = intent.getData();
if(uri != null)
  txtUrl.setText("URL:" + uri.toString());
String subject = intent.getStringExtra(AndroidAppUtil.EXTRA_SUBJECT);
if(subject != null)
  txtSubject.setText("Subject: " + subject);
long meetingId = intent.getLongExtra(AndroidAppUtil.EXTRA_MEETING_ID, 0);
if(meetingId > 0)
  txtMeetingId.setText("Meeting ID: " + meetingId);
String meetingPassword = intent.getStringExtra(AndroidAppUtil.EXTRA_MEETING_PSW);
if(meetingPassword != null)
  txtPassword.setText("Password: " + meetingPassword);
String meetingRawPassword = intent.getStringExtra(AndroidAppUtil.EXTRA_MEETING_RAW_PSW);
if(meetingRawPassword != null)
  txtRawPassword.setText("Raw Password: " + meetingRawPassword);
String text = intent.getStringExtra(AndroidAppUtil.EXTRA_TEXT);
if(text != null)
  edtText.setText(text);

To disable all other invitation methods besides the one you create, add the following to res/values/config.xml.

<!-- Define this bool value in config.xml to remove all default invite options and remain only your totally customized invite activity. -->
<bool name="zm_config_invite_by_only_action_meeting_invite">true</bool>

Customize the invitation content

To customize the invitation email subject and content, SMS content, and URL invitation text, follow these steps.

  1. Create your invitation generator class, then implement this interface.

    import com.zipow.videobox.util.InviteContentGenerator;
    public class MyInviteContentGenerator implements InviteContentGenerator {
        ...
    }
    

    Then, add the following into your res/values/config.xml file.

    <string name="zm_config_invite_content_generator">us.zoom.sdkexample.MyInviteContentGenerator</string>
    
  2. To change your Email Topic, override the genEmailTopic function.

    @Override
    public String genEmailTopic(Context context, long meetingId, String meetingUrl,
        String myName, String password, String rawPassword) {
      ...
    }
    
  3. To change your Email Content, override the genEmailContent function.

    @Override
    public String genEmailContent(Context context, long meetingId,
        String meetingUrl, String myName, String password, String rawPassword) {
      ...
    }
    
  4. To change your SMS Content, override the genSmsContent function.

    @Override
    public String genSmsContent(Context context, long meetingId,
        String meetingUrl, String myName, String password, String rawPassword) {
      ...
    }
    
  5. To change your Copy URL Content, override the genCopyUrlText function.

    @Override
    public String genSmsContent(Context context, long meetingId,
        String meetingUrl, String myName, String password, String rawPassword) {
      ...
    }
    

Null or empty value

If the return value is null or empty the Zoom default invitation template will be used.

The parameters in the functions:

ParameterDefinition
contextApplication context
meetingIdMeeting Number
meetingUrlMeeting Url
myNameDisplay name
passwordMeeting password