user492888
user492888

Reputation: 207

Is there any API to recognize app is in multiwindow mode in samsung devices?

How to know currently app is opened in multi-window feature in Samsung devices?

In my case onMeasure view, it considers any other app opened in bottom as keyboard visible. Also is there any method to reliably check keyboard is visible.

Upvotes: 1

Views: 374

Answers (1)

Sestertius
Sestertius

Reputation: 1372

Use Samsung's multiwindow SDK

Add this two jar's to your libs/ folder:

  1. multiwindow-v1.2.3.jar
  2. sdk-v1.0.0.jar

You can download the sdk from here:

http://img-developer.samsung.com/contents/cmm/sms/MultiwindowSDK_v1.2.3.zip

Then use this listener in your OnCreate method:

    SMultiWindowActivity mMultiWindowActivity = new SMultiWindowActivity(this);

        mMultiWindowActivity.setStateChangeListener(new SMultiWindowActivity.StateChangeListener() {
            @Override
            public void onModeChanged(boolean isMultiWindow) {

                if (isMultiWindow){

                    //called when changing to Multiple Window

                }else{

                }

            }

            @Override
            public void onZoneChanged(int i) {

            }

            @Override
            public void onSizeChanged(Rect rect) {

            }

        });

More info:

http://developer.samsung.com/board/download.do?bdId=T000000144&attachId=0000000001

Upvotes: 2

Related Questions