Custom Meeting UI is not been called


#1

Following SDK example2,  I have a CustomMeetingActivity class.

It is defined in the config.xml as

\<resources\> 
 \<string name="zm\_config\_conf\_activity"\>com.xyz.ui.CustomMeetingActivity\</string\>
\</resources\>

And also in Manifest.xml

But when join the meeting, my CustomMeetingActivity, getLayout() is never called.

Would appreciate any help on how to load my custom layout.

#2

Hi Beth,  

Could you also provide the code snippet of activity defination in your manifest and CustomMeestingActivity class implemetion. So that we can check what’s going on there.

Thanks.


#3

In Manifest.xml I added this activity.

\<activity  
android:name="com.xyz.ui.CustomMeetingActivity"  
android:configChanges="orientation|screenSize"  
android:hardwareAccelerated="false"  
android:theme="@style/ZMTheme.SubWindow"  
android:process=":zoom\_meeting"  
android:screenOrientation="landscape" /\>

The CustomMeetingActivity class were mostly copy from example

public class CustomMeetingActivity extends MeetingActivity {

&nbsp;&nbsp;&nbsp; private Button btnLeaveZoomMeeting;
&nbsp;&nbsp;&nbsp; private Button btnSwitchToNextCamera;
&nbsp;&nbsp;&nbsp; private Button btnAudio;
&nbsp;&nbsp;&nbsp; private Button btnParticipants;
&nbsp;&nbsp;&nbsp; private Button btnShare;
&nbsp;&nbsp;&nbsp; private Button btnStopShare;
&nbsp;&nbsp;&nbsp; private Button btnMoreOptions;


&nbsp;&nbsp;&nbsp; @Override
&nbsp;&nbsp;&nbsp; protected int getLayout() {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return R.layout.activity\_custom\_av\_meeting;
&nbsp;&nbsp;&nbsp; }

&nbsp;&nbsp;&nbsp; @Override
&nbsp;&nbsp;&nbsp; protected boolean isAlwaysFullScreen() {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;
&nbsp;&nbsp;&nbsp; }

&nbsp;&nbsp;&nbsp; @Override
&nbsp;&nbsp;&nbsp; protected boolean isSensorOrientationEnabled() {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;
&nbsp;&nbsp;&nbsp; }

&nbsp;&nbsp;&nbsp; @Override
&nbsp;&nbsp;&nbsp; protected void onCreate(Bundle savedInstanceState) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super.onCreate(savedInstanceState);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; disableFullScreenMode();
&nbsp;&nbsp;&nbsp; }

&nbsp;&nbsp;&nbsp; @Override
&nbsp;&nbsp;&nbsp; public void onConfigurationChanged (Configuration newConfig) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super.onConfigurationChanged(newConfig);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; disableFullScreenMode();
&nbsp;&nbsp;&nbsp; }

&nbsp;&nbsp;&nbsp; private void disableFullScreenMode() {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; getWindow().setFlags(~WindowManager.LayoutParams.FLAG\_FULLSCREEN, WindowManager.LayoutParams.FLAG\_FULLSCREEN);
&nbsp;&nbsp;&nbsp; }

&nbsp;&nbsp;&nbsp; @Override
&nbsp;&nbsp;&nbsp; public void onBackPressed() {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( getFragmentManager().getBackStackEntryCount() \> 0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; getFragmentManager().popBackStack();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super.onBackPressed();
&nbsp;&nbsp;&nbsp; }


&nbsp;&nbsp;&nbsp; @Override
&nbsp;&nbsp;&nbsp; protected void onResume() {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super.onResume();

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // disable animation
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overridePendingTransition(0, 0);
&nbsp;&nbsp;&nbsp; }

//&nbsp;&nbsp;&nbsp; @Override
//&nbsp;&nbsp;&nbsp; protected void onMeetingConnected() {
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; updateButtonsStatus();
//&nbsp;&nbsp;&nbsp; }
//
//&nbsp;&nbsp;&nbsp; @Override
//&nbsp;&nbsp;&nbsp; protected void onSilentModeChanged(boolean inSilentMode) {
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; updateButtonsStatus();
//&nbsp;&nbsp;&nbsp; }
//
//&nbsp;&nbsp;&nbsp; @Override
//&nbsp;&nbsp;&nbsp; protected void onStartShare() {
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnShare.setVisibility(View.GONE);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnStopShare.setVisibility(View.VISIBLE);
//&nbsp;&nbsp;&nbsp; }
//
//&nbsp;&nbsp;&nbsp; @Override
//&nbsp;&nbsp;&nbsp; protected void onStopShare() {
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnShare.setVisibility(View.VISIBLE);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnStopShare.setVisibility(View.GONE);
//&nbsp;&nbsp;&nbsp; }
//
//&nbsp;&nbsp;&nbsp; private void updateButtonsStatus() {
//
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boolean enabled = (isMeetingConnected() && !isInSilentMode());
//
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnSwitchToNextCamera.setEnabled(enabled);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnAudio.setEnabled(enabled);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnParticipants.setEnabled(enabled);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnShare.setEnabled(enabled);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnMoreOptions.setEnabled(enabled);
//
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(isSharingOut()) {
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnShare.setVisibility(View.GONE);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnStopShare.setVisibility(View.VISIBLE);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnShare.setVisibility(View.VISIBLE);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnStopShare.setVisibility(View.GONE);
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
//&nbsp;&nbsp;&nbsp; }
}

#4

The av meeting is launched from a fragment. The meeting starts successfully but the CustomMeetingActivity is not called.

public class AudioVideoMeetingFragment extends AbstractFragment implements ZoomSDKInitializeListener, MeetingServiceListener, View.OnClickListener, AppAVMeetingService.AudioVideoMeetingListener {

 public void onClickBtnJoinMeeting() {

 ZoomSDK zoomSDK = ZoomSDK.getInstance();

if (!zoomSDK.isInitialized()) {
 AppLogger.trace("ZoomSDK has not been initialized successfully");
return;
 }

 MeetingService meetingService = zoomSDK.getMeetingService();

 JoinMeetingOptions opts = new JoinMeetingOptions();
// opts.no\_driving\_mode = true;  
// opts.no\_invite = true;  
// opts.no\_meeting\_end\_message = true;  
// opts.no\_titlebar = true;  
// opts.no\_bottom\_toolbar = true;  
// opts.no\_dial\_in\_via\_phone = true;  
// opts.no\_dial\_out\_to\_phone = true;  
// opts.no\_disconnect\_audio = true;  
// opts.no\_share = true;  
// opts.invite\_options = InviteOptions.INVITE\_VIA\_EMAIL + InviteOptions.INVITE\_VIA\_SMS;  
// opts.meeting\_views\_options = MeetingViewsOptions.NO\_BUTTON\_SHARE;  
// opts.no\_audio = true;  
// opts.no\_video = true;  
// opts.no\_meeting\_error\_message = true;  
// opts.participant\_id = "participant id";  
int ret = meetingService.joinMeeting( getApplicationContext(), String.valueOf(mSpaceMeeting.getId()), mCurrentUserDisplayName, "", opts);

 }
}

#5

Hi Beth,

Your activity defination and configuration are all right. It is very strange why the function does not work. Could you please try to run our sdk demo(example2) and try to modify the activity class name/package name. Then, check if can this issue reproduce on sdk demo project.

Thanks.


#6

I am back to continue on getting the custom UI working.

I am not sure what your last suggestion is. Example2 works fine. But when I added CustomMeetingActivity to my app it does not work.

Please confirm the steps to add Custom activity.

  1. add resource to config.xml under Values

    <resources>
    <string name=“zm_config_conf_activity”>com.xyz.ui.CustomMeetingActivity</string>
    </resources>

  2. Define the activity in Manifest.xml file

    <activity
    android:name=“com.xyz.ui.CustomMeetingActivity”
    android:configChanges=“orientation|screenSize”
    android:hardwareAccelerated=“false”
    android:theme="@style/ZMTheme.SubWindow"
    android:process=":zoom_meeting"
    android:screenOrientation=“landscape” />

When these two are in place, the CustomMeetingActivity.getLayout() should be called on start or join meeting.

One thing that my program is different from the exampl2 is that the joinMeeting is called from a fragment which started from the Main activity. The Audio Video meeting starts fine, just not loading my custom meeting layout.


#7

Hi Beth,

Did you define the “zm_config_conf_activity” in your App main project so that it can override the default value in zoom sdk aar package?


#8

 

Hi Jacky

I don’t quite understand your question. My previous post listed the steps I took to add CustomMeetingActivity.  What am I missing?

“Define the “zm_config_conf_acitity” in my App main project?” Are you asking if I have CustomMeetingActivity.java class in my package? The answer is yes

 

-Beth

 

 

 


#9

Hi Beth,

You should confirm that the string zm_config_conf_activity (you defined in your string resource) can override the default value in zoom sdk.

Please try to print the string value of zm_config_conf_activity  in your code and check if the value is same as you have defined (

<string name=“zm_config_conf_activity”>com.xyz.ui.CustomMeetingActivity</string>)

Thanks


#10

I printed my whole CustomMeetingActivity 14 days ago. Is there something else you are looking for that’s missing?


#11

It is working now that when I move the CustomMeetingActivity to be in the same package level as my Main activity instead of in the com.xyz.ui package.

Thanks for your help.