

provide a reference to the activity as well as the In the main activity, lazily create an instance of theīroadcaster (opens new window) class. class MainActivity : AppCompatActivity ( ) In the generated MainActivity.kt, check for and request any Permissions must be approved (opens new window)īy the end-user at runtime. Since Android 6.0, the above is not enough. Open the adle file for the app module.Īdd an NDK ABI filter to the android defaultConfig block. Only necessary when developing on x86 emulator images, as real x86 devices can translate ARM machine code. The armeabi-v7a and arm64-v8a ABIs (opens new window) areĬompatible with all modern devices and ARM emulator images.
#WINDOWMANAGER KOTLIN APK#
Is needed to ensure that the generated APK contains the greatest common denominator. If you don't want toīundle all of them, or if other libraries contain native code for other architectures, an ABI filter The Bambuser SDK contains native code built for the armeabi-v7a, arm64-v8a, x86Īnd x86_64 ABIs (opens new window).

# Configure Gradle to build for supported architectures The setFlags() method of Window class is used to display content in full screen mode. In the second popup window, check libbambuser and click OK.Ĭlick OK again to return from the Project Structure screen. In the second column, click the + button in the third column and choose Once more, in the project tree on the left-hand-side, right click on yourĪpp module and choose Open Module Settings again.Ĭhoose Dependencies on the lefthand side, keep the app module selected The file and sync the project, then reopen the Project Structure screen. If this happens, add include ':libbambuser' manually at the end of Some recent versions of Android Studio fail to add new modules to the You may now need to close and reopen the Project Structure screen, before the library module In case you upgrade the module in place later, etc. Optionally remove the version number in the suggested subproject name Navigate to the SDK files you extracted and import the. In Android Studio, in the project tree on the left-hand-side, right click on your app module
#WINDOWMANAGER KOTLIN ZIP FILE#
Open the downloaded zip file and extract it.Log in to the Bambuser site and download the latest SDK bundle for Android from the Choose Kotlin as programming language (See our Java guide if you prefer Java).Set the Minimum SDK to at least API 21: Android 5.0, which is the oldest API supported by the.Enter a suitable application name and your company domain.Make sure to familiarize yourself with the example apps in the SDK bundlesįor a more complete overview. score:1 Accepted answer According to the official docs the recommended way is to use WindowManagergetCurrentWindowMetrics (): val metrics: WindowMetrics context.getSystemService (WindowManager::class.java).currentWindowMetrics If you use it to get screen size, please see my answer here. Which you can find on /studio (opens new window).

This guide focuses on the bare minimum required to start broadcasting. This guide is based on Android Studio 3.4.1.
#WINDOWMANAGER KOTLIN HOW TO#
# How to create a live broadcasting app in Kotlin using Android Studio
