{"id":16428387,"url":"https://github.com/pliablepixels/cordova-plugin-multi-window","last_synced_at":"2025-10-26T23:30:55.330Z","repository":{"id":57208630,"uuid":"145224966","full_name":"pliablepixels/cordova-plugin-multi-window","owner":"pliablepixels","description":"multi window detection for Android and onStart() onStop() app state callbacks","archived":false,"fork":false,"pushed_at":"2018-08-23T13:44:10.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T01:11:27.464Z","etag":null,"topics":["cordova","cordova-plugin","multi-window","multiwindow"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pliablepixels.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-18T14:07:24.000Z","updated_at":"2019-05-24T13:51:20.000Z","dependencies_parsed_at":"2022-09-04T02:02:04.184Z","dependency_job_id":null,"html_url":"https://github.com/pliablepixels/cordova-plugin-multi-window","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pliablepixels%2Fcordova-plugin-multi-window","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pliablepixels%2Fcordova-plugin-multi-window/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pliablepixels%2Fcordova-plugin-multi-window/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pliablepixels%2Fcordova-plugin-multi-window/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pliablepixels","download_url":"https://codeload.github.com/pliablepixels/cordova-plugin-multi-window/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238408709,"owners_count":19467167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cordova","cordova-plugin","multi-window","multiwindow"],"created_at":"2024-10-11T08:16:31.076Z","updated_at":"2025-10-26T23:30:50.054Z","avatar_url":"https://github.com/pliablepixels.png","language":"Java","readme":"# cordova-plugin-multi-window\nTests if app is running in multi-window mode for Android devices. Also lets you trap `onStop()` and `onStart()` which are important to differentiate\nfrom `onPause` events while in multi-window.\n\nThis is my first cordova plugin, scraped together looking at [this](https://medium.com/ionic-and-the-mobile-web/how-to-write-cordova-plugins-864e40025f2) tutorial. I am  not an android native developer, so the code in the java file is a result of looking at other examples and trying to resolve compile/run time errors as they came along. I don't have a clue on how to write a proper android class file.\n\nIf you can improve it, please PR. \n\n## Test Repo\nFeel free to clone [this test repo](https://github.com/pliablepixels/is-multiwindow-test)\n\n## Usage inside your app\n`cordova plugin add cordova-plugin-multiwindow --save`\n\n### To get multi-window state:\n\n```\nwindow.MultiWindowPlugin.get(function (result) {\n        console.log (\"Multi-Window state is:\" + result.state);\n},\nfunction (err) { \n    console.log (\" *************** ERR:\"+JSON.stringify(err));\n});\n```\n\n### To register for onStop() and onStart():\n\n**NOTE: onStart() and onStop() are also invoked in non-multi window mode**\n\nThis plugin allows multiple callbacks to register to the events, because in practice,\nwhile building an app you'll want to trap these events in different controllers to manage pause/resume\nstates in different views. To do this, you can pass a handle (string) during registration which you can use to de-register that specific instance.\n\n```\n// Make sure you do this AFTER deviceReady\nwindow.MultiWindowPlugin.registerOnStop(\"my-stop-handle-thiscontroller\", onStop);\nwindow.MultiWindowPlugin.registerOnStart(\"my-start-handle\", onStart);\n// and in a different controller, maybe\nwindow.MultiWindowPlugin.registerOnStop(\"my-stop-handle-othercontroller\", onOtherStopHandler);\n```\n\n### To de-register for onStop() and onStart():\n\n```\n// Make sure you do this AFTER deviceReady\nwindow.MultiWindowPlugin.deregisterOnStop(\"my-stop-handle-othercontroller\");\nwindow.MultiWindowPlugin.deregisterOnStart(\"my-start-handle\");\n```\n\nOr, all together:\n\n**NOTE: This will de-register ALL callbacks in all controllers across the app, so use with caution**\n\n```\n// Make sure you do this AFTER deviceReady\nwindow.MultiWindowPlugin.deregisterAll();\n```\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpliablepixels%2Fcordova-plugin-multi-window","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpliablepixels%2Fcordova-plugin-multi-window","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpliablepixels%2Fcordova-plugin-multi-window/lists"}