-
-
Notifications
You must be signed in to change notification settings - Fork 156
Android Native App #471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kief5555
wants to merge
141
commits into
dev
Choose a base branch
from
android-native
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Android Native App #471
Changes from 59 commits
Commits
Show all changes
141 commits
Select commit
Hold shift + click to select a range
5d56d79
Add Gradle wrapper files and update settings for Android project
Kief5555 f97710e
feat: Enhance streaming experience and UI updates
Kief5555 d0771a6
feat: Enhance session proxy settings and ad playback functionality
Kief5555 36149af
feat: Implement QR code generation and enhance streaming stats
Kief5555 97b644e
feat: Add functionality to remove completed ads from session state an…
Kief5555 02a7bfe
Refactor UI colors and enhance device login experience
Kief5555 05e8eff
feat: Enhance device code login support and improve session handling
Kief5555 fbd669d
feat: Replace loading skeleton with pulsing animation for game images
Kief5555 2eed4bd
feat: Enhance OpenNowViewModel with account switching and stream retu…
Kief5555 d2036a5
Potential fix for pull request finding
Kief5555 d525803
feat: Enhance stream resolution options and implement membership tier…
Kief5555 3b7d1c1
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 49f6847
feat: Remove release artifacts and update .gitignore for cleaner builds
Kief5555 380a69a
feat: Update minimum SDK version and increment version code; enhance …
Kief5555 5963880
feat: Refactor token management to use milliseconds for refresh windo…
Kief5555 c722a8f
feat: Enhance WebRTC codec handling and input channel management
Kief5555 3837fae
feat: Refactor mouse capture handling and enhance stream settings adj…
Kief5555 d9cbf2c
feat: Implement display refresh rate management and enhance stream se…
Kief5555 556bdfe
Add vector drawable icons for various game stores and implement unit …
Kief5555 4898a2e
feat: Add HDR support and enhance haptic feedback for gamepad control…
Kief5555 c0a866d
feat: Enhance sorting and filtering UI with improved layout and funct…
Kief5555 b81beaa
feat: Implement settings reset and cache clearing functionality; enha…
Kief5555 6bc4504
Add new strings for empty search states and filters; enhance tests fo…
Kief5555 82a146c
feat: Implement Android update functionality
Kief5555 6ead986
Add unit test for OpenNow analytics configuration
Kief5555 e5d36e6
feat: Update versioning, enhance stream settings, and improve UI/UX
Kief5555 9e8d0ca
feat: Add donation section and debug event logging
Kief5555 97e839c
Implement persistent storage management and game store connectors for…
Kief5555 f4f736c
Fix(android): add storage addon filter and connector state/token fixe…
Kief5555 6dc97ac
feat: Update version and enhance audio cue functionality
Kief5555 3845723
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 8204694
Add in-app store connector connect/disconnect actions (#548)
Kief5555 41a95d2
feat(android): update version code to 16 and version name to 0.6.1
Kief5555 1353777
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 5f808f7
Fix Android account linking and add missing Steam provider (#550)
Kief5555 859d909
Fix Android connector refresh polling (#553)
Kief5555 9f091fc
Fix account-link ALS 401 error and add toasts (#554)
Kief5555 b702052
Fix Android ALS endpoint and client ID to match desktop (#559)
Kief5555 0be6ebc
feat: Add settings screen with various configuration options
Kief5555 2af413a
feat: Add Android update notice handling and improve codec negotiation
Kief5555 6abb5fa
chore: Remove unused Kotlin compiler session file
Kief5555 26c0aa5
feat: Enhance storage usage progress indicator with dynamic height an…
Kief5555 36b311f
feat: Enhance stream resolution handling and gamepad input support
Kief5555 e5eb361
feat: Add play time stats panel and enhance session management
Kief5555 405fcda
feat: Implement APK update support and enhance update management for …
Kief5555 f695e88
feat: Enhance settings UI with descriptions and add account provider …
Kief5555 0a3b94c
feat: Enhance diagnostic logging and redaction for sensitive information
Kief5555 7ed7106
Refactor OpenNowViewModel for improved debugging and diagnostics
Kief5555 b19868b
feat: Refactor SDP handling to improve candidate endpoint resolution …
Kief5555 3c95f3f
Refactor code structure for improved readability and maintainability
Kief5555 bc48bc4
feat: Enhance streaming settings and diagnostics
Kief5555 4496299
Refactor mouse assist functionality and update related tests
Kief5555 9b56102
Refactor catalog background image handling and improve haptics parsing
Kief5555 ff2d029
feat: Update version code and name, enhance controller navigation han…
Kief5555 9bac3cb
feat: Update version code to 34 and name to 0.7.9; enhance streaming …
Kief5555 1944eb4
feat: Update version code to 35 and name to 0.8.0; improve SurfaceVie…
Kief5555 b2c7b28
feat: Implement nextSessionAdId function and refactor queue ad handli…
Kief5555 c619185
feat: Update version code to 36 and name to 0.8.1
Kief5555 4153ed6
feat: Add appCategory to manifest and adjust windowSoftInputMode in M…
Kief5555 a2e6168
Add unit tests for AndroidStreamKeepAliveNotifier and CellularNetwork…
Kief5555 b1e5831
feat(android): redesign virtual touch controller, secure auth storage…
Chizuui 28b7f10
Merge pull request #634 from Chizuui/android-native
Kief5555 01e58c5
feat(android): implement multi-style touch overlay, unified sliding D…
Chizuui f279685
Merge pull request #641 from Chizuui/dev-android-native
Kief5555 f5f9cd3
Improve Android auth refresh and stream recovery
Kief5555 5fd8ede
Add tests for launch errors, ownership, stream settings, and local TV…
Kief5555 59aef68
Refactor stream handling and improve artwork logic
Kief5555 9eeb55b
fix(android): improve virtual stick pointer handling and state manage…
Kief5555 714a0c5
fix(android): resolve input thread lag, TV controller navigation, hal…
Chizuui 26f3ec6
Merge pull request #646 from Chizuui/dev-android-native-pr
Kief5555 d5c8d22
fix(android): fix virtual stick getting stuck on release outside stic…
Chizuui d3268b8
fix(android): fix analog stick held state not cleared when touch rele…
Chizuui d87e837
Merge pull request #647 from Chizuui/android-native
Kief5555 9e153f4
fix(android): update version code and name, enhance game card scaling…
Kief5555 f90b3ec
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 6e55d55
feat: TV and input experience improvements
Chizuui 49b6b2a
Merge pull request #648 from Chizuui/pr-tv-input-improvements
Kief5555 a6cb5d4
Refactor settings UI and enhance controller focus handling
Kief5555 d743870
feat: Update version and enhance HDR support
Kief5555 7b88bad
feat: Add microphone support and bug reporting functionality
Kief5555 bf01a98
feat: Enhance resolution handling for 1440p streams and add correspon…
Kief5555 0b27de5
feat: Update version code to 47 and version name to 0.9.2
Kief5555 40b2194
feat: add native low latency video decoder wrapper with MediaTek support
Chizuui 086d9c9
Refactor streaming settings and performance warnings
Kief5555 aa44fa1
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 fb02a34
feat: implement Android controller slot management and enhance input …
Kief5555 fb72c35
feat: update version code to 49 and version name to 0.9.4; add pinch …
Kief5555 fac02fd
feat: update version code to 51 and version name to 0.9.6; refactor G…
Kief5555 19d848e
Refactor and enhance session reporting and stream settings tests
Kief5555 bd8e482
feat: Enhance AV1 support and performance tuning
Kief5555 9e29e0d
feat: update version code to 55 and version name to 1.0.0
Kief5555 48d57b6
Add bug report preflight diagnostics and input diagnostics tracking
Kief5555 21e371a
fix(android): resolve direct click cursor position drift after app pa…
Chizuui a719ecb
fix(android): resolve RtpSender disposed crash and optimize Snapdrago…
Chizuui 9dabf5a
fix(input): sync virtual cursor position directly to target touch coo…
Chizuui df2de8b
fix(input): reset direct click tracking state when switching in and o…
Chizuui 160e439
feat(touch/ui): implement native touch and UI redesign on Android client
Chizuui 144c01b
fix(touch/ui): resolve compile errors after rebase
Chizuui 5f17baa
feat: update version code to 60 and version name to 1.0.5; refactor C…
Kief5555 8588395
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 709c520
Refactor controller navigation handling and enhance bug report functi…
Kief5555 4a0b5c4
Refactor settings UI and improve touch input handling
Kief5555 9d4246a
feat: Enhance HDR settings and session report features
Kief5555 21c355f
Fix native touch + ultrawide resolution for games like NTE
Chizuui 053b19a
fix(input): overhaul direct click to eliminate cursor drift
Chizuui 0a62d30
Refactor Android service command handling and improve stability
Kief5555 e6ff898
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 b051fa3
Fix GFN library ownership and free launches
Kief5555 fe68243
feat: update version to 1.1.0 and enhance native touch support with b…
Kief5555 8d509fe
fix(input): overhaul direct click to eliminate cursor drift
Chizuui f70c4cf
feat: live bitrate with overlay indicator, TV input fixes, haptics re…
Chizuui 3b64dc9
Add unit tests for various components in the OpenNow application
Kief5555 b0e911f
Merge android-native (3b64dc91) into android-native-live-features
Chizuui c760acd
Merge pull request #710 from Chizuui/android-native-live-features
Kief5555 e1c1f83
feat: enhance CPU profiling and diagnostics with new sampling and rep…
Kief5555 722c7fc
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 25d31a0
feat: update version to 1.1.5 and enhance signaling failure handling …
Kief5555 2f46c7b
feat: Implement diagnostic snapshot persistence and history management
Kief5555 4b13959
Implement external mouse pointer lock feature
Kief5555 5eaf64f
feat: Add SDP tools and signaling client for improved media handling
Kief5555 d826f37
Fix low-speed Android mouse precision
zortos293 ec31fbe
Merge latest android-native into mouse precision fix
zortos293 e388e6f
feat: Update version to 1.2.0 and enhance queue ready notification ha…
Kief5555 edfb0fa
Merge branch 'android-native' into capy/android-mouse-precision
Kief5555 7920d73
Merge pull request #738 from OpenCloudGaming/capy/android-mouse-preci…
Kief5555 01bad77
Refactor stream session recovery and enhance input diagnostics
Kief5555 ec5068d
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 cf5d20c
Add Turkish localization and network profile tests
Kief5555 03c1505
feat: Update Android app version and enhance touch aiming functionality
Kief5555 e8c9667
feat: Enhance touch controller behavior for Finger Mouse and add corr…
Kief5555 86cb36a
feat: Update Android diagnostics to include device and Android contex…
Kief5555 9312154
fix(android): recover touch input across sessions
zortos293 a7ed673
Merge pull request #753 from OpenCloudGaming/capy/android-touch-sessi…
Kief5555 0cfb3fb
fix(android): detect modern Exynos HEVC decoders
zortos293 cdbb7a8
fix(android): preserve mixed Finger Mouse gestures
zortos293 86c726d
Merge pull request #766 from OpenCloudGaming/capy/preserve-mixed-fing…
Kief5555 2f78015
Merge pull request #765 from OpenCloudGaming/capy/fix-a56-hevc-detection
Kief5555 c647b44
fix(android): keep controller Select input in game on TV
zortos293 c9a6b8d
Merge pull request #771 from OpenCloudGaming/capy/keep-controller-sel…
Kief5555 3a71930
feat: Enhance ControlSliderRow with description toggle and add Discor…
Kief5555 99d3ea0
Merge branch 'android-native' of https://github.com/OpenCloudGaming/O…
Kief5555 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .gradle/ | ||
| .idea/ | ||
| build/ | ||
| local.properties | ||
| captures/ | ||
| *.iml | ||
| app/build/ | ||
| app/release/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # OpenNOW Native Android | ||
|
|
||
| This folder is a standalone Android Studio project for the native Kotlin / Jetpack Compose OpenNOW target. | ||
|
|
||
| Open it from Android Studio with **File > Open > `OpenNOW/android`**. Android Studio will install/use the required Gradle, Android SDK, CMake, and NDK components from the project configuration. | ||
|
|
||
| ## Build Targets | ||
|
|
||
| - `:app:assembleDebug` builds a debug APK. | ||
| - `:app:assembleRelease` builds the direct-distribution release APK with APK update support. | ||
| - `:app:bundleRelease` builds the Google Play Android App Bundle. This task removes `REQUEST_INSTALL_PACKAGES` and disables APK self-updates so Play installs use Google Play's update mechanism. | ||
|
|
||
| ## APK Update Manifest | ||
|
|
||
| APK and debug builds check `https://api.printedwaste.com/releases/opennow/latest` and can download the returned APK. App Bundle builds installed from Google Play detect `com.android.vending` as the install source and do not check, download, or install APK updates. The manifest should look like this: | ||
|
|
||
| ```json | ||
| { | ||
| "versionCode": 7, | ||
| "versionName": "0.5.2", | ||
| "apkUrl": "https://api.printedwaste.com/release-files/opennow/app-release.apk", | ||
| "artifactUrl": "https://api.printedwaste.com/release-files/opennow/app-release.apk", | ||
| "sha256": "optional lowercase apk checksum", | ||
| "releaseNotes": "Short notes shown in Settings\nSecond line" | ||
| } | ||
| ``` | ||
|
|
||
| `apkUrl`, `artifactUrl`, or `url` may point at the APK. `releaseNotes` may use real newlines or literal `\n` separators. The app compares `versionCode` against its installed build and asks Android's package installer to confirm the downloaded APK. | ||
|
|
||
| ## Runtime Notes | ||
|
|
||
| - UI is native Compose. | ||
| - GFN auth, catalog, subscription, CloudMatch session creation/polling/claim/stop, signaling, and input packet behavior are implemented in Kotlin from the Electron project contracts. | ||
| - Streaming uses Android WebRTC plus hardware MediaCodec probing. The bundled `opennow_native` JNI library exposes native runtime diagnostics and keeps the NDK/CMake path wired for media-sensitive code. | ||
| - Queue ad metadata is preserved in `SessionInfo`; ad playback can use the included Media3 dependency when the server returns an ad media URL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| import java.util.Properties | ||
|
|
||
| plugins { | ||
| id("com.android.application") | ||
| id("org.jetbrains.kotlin.plugin.compose") | ||
| id("org.jetbrains.kotlin.plugin.serialization") | ||
| } | ||
|
|
||
| val localProperties = Properties().apply { | ||
| rootProject.file("local.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) } | ||
| } | ||
| fun Sequence<String?>.firstNonBlankOrNull(): String? = | ||
| mapNotNull { value -> value?.trim()?.takeIf { it.isNotEmpty() } }.firstOrNull() | ||
|
|
||
| fun gradlePropertyValue(vararg names: String): String? = | ||
| names.asSequence().map { name -> providers.gradleProperty(name).orNull }.firstNonBlankOrNull() | ||
|
|
||
| fun localPropertyValue(vararg names: String): String? = | ||
| names.asSequence().map { name -> localProperties.getProperty(name) }.firstNonBlankOrNull() | ||
|
|
||
| fun environmentValue(vararg names: String): String? = | ||
| names.asSequence().map { name -> providers.environmentVariable(name).orNull }.firstNonBlankOrNull() | ||
|
|
||
| fun firstNonBlankValue(vararg values: String?): String = | ||
| values.asSequence().firstNonBlankOrNull().orEmpty() | ||
|
|
||
| fun buildConfigString(value: String): String = | ||
| "\"" + value | ||
| .replace("\\", "\\\\") | ||
| .replace("\"", "\\\"") | ||
| .replace("\n", "\\n") | ||
| .replace("\r", "\\r") + "\"" | ||
|
|
||
| val defaultPostHogProjectToken = "phc_pdob6BhBvbayfd7BA6zXBkty8o6EkxKYY7sF3ZwLymk3" | ||
| val defaultPostHogHost = "https://aa.printedwaste.com" | ||
|
|
||
| val postHogProjectToken = firstNonBlankValue( | ||
| gradlePropertyValue("posthog.apiKey", "posthog.projectToken"), | ||
| environmentValue("POSTHOG_API_KEY", "POSTHOG_PROJECT_TOKEN"), | ||
| localPropertyValue("posthog.apiKey", "posthog.projectToken"), | ||
| defaultPostHogProjectToken, | ||
| ) | ||
| val postHogHost = firstNonBlankValue( | ||
| gradlePropertyValue("posthog.host"), | ||
| environmentValue("POSTHOG_HOST"), | ||
| localPropertyValue("posthog.host"), | ||
| defaultPostHogHost, | ||
| ) | ||
| val buildingPlayReleaseBundle = gradle.startParameter.taskNames.any { taskName -> | ||
| taskName.substringAfterLast(":").equals("bundleRelease", ignoreCase = true) | ||
| } | ||
|
|
||
| android { | ||
| namespace = "com.opencloudgaming.opennow" | ||
| compileSdk = 37 | ||
|
|
||
| defaultConfig { | ||
| applicationId = "com.opencloudgaming.opennow" | ||
| minSdk = 24 | ||
| targetSdk = 36 | ||
| versionCode = 36 | ||
| versionName = "0.8.1" | ||
|
|
||
| buildConfigField("String", "POSTHOG_PROJECT_TOKEN", buildConfigString(postHogProjectToken)) | ||
| buildConfigField("String", "POSTHOG_HOST", buildConfigString(postHogHost)) | ||
| buildConfigField("boolean", "APK_UPDATES_SUPPORTED", "true") | ||
|
|
||
| ndk { | ||
| abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86_64") | ||
| } | ||
|
|
||
| } | ||
|
|
||
| buildTypes { | ||
| debug { | ||
| isMinifyEnabled = false | ||
| } | ||
| release { | ||
| isMinifyEnabled = true | ||
| isShrinkResources = true | ||
| buildConfigField("boolean", "APK_UPDATES_SUPPORTED", (!buildingPlayReleaseBundle).toString()) | ||
| proguardFiles( | ||
| getDefaultProguardFile("proguard-android-optimize.txt"), | ||
| "proguard-rules.pro", | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| sourceSets { | ||
| if (buildingPlayReleaseBundle) { | ||
| getByName("release").manifest.srcFile("src/playBundle/AndroidManifest.xml") | ||
| } | ||
| } | ||
|
|
||
| buildFeatures { | ||
| compose = true | ||
| buildConfig = true | ||
| } | ||
|
|
||
| externalNativeBuild { | ||
| cmake { | ||
| path = file("src/main/cpp/CMakeLists.txt") | ||
| version = "3.22.1" | ||
| } | ||
| } | ||
|
|
||
| packaging { | ||
| jniLibs { | ||
| useLegacyPackaging = false | ||
| } | ||
| resources { | ||
| excludes += setOf( | ||
| "META-INF/AL2.0", | ||
| "META-INF/LGPL2.1", | ||
| "META-INF/LICENSE*", | ||
| "META-INF/NOTICE*", | ||
| ) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| kotlin { | ||
| jvmToolchain(17) | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation(platform("androidx.compose:compose-bom:2026.06.00")) | ||
| androidTestImplementation(platform("androidx.compose:compose-bom:2026.06.00")) | ||
|
|
||
| implementation("androidx.activity:activity-compose:1.13.0") | ||
| implementation("androidx.browser:browser:1.10.0") | ||
| implementation("androidx.compose.foundation:foundation") | ||
| implementation("androidx.compose.material3:material3") | ||
| implementation("androidx.compose.ui:ui") | ||
| implementation("androidx.compose.ui:ui-tooling-preview") | ||
| implementation("androidx.core:core:1.19.0") | ||
| implementation("androidx.lifecycle:lifecycle-runtime-compose:2.11.0") | ||
| implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.11.0") | ||
| implementation("androidx.media3:media3-common:1.10.1") | ||
| implementation("androidx.media3:media3-exoplayer:1.10.1") | ||
| implementation("androidx.media3:media3-ui:1.10.1") | ||
|
|
||
| implementation("io.coil-kt.coil3:coil-compose:3.4.0") | ||
| implementation("io.coil-kt.coil3:coil-network-okhttp:3.4.0") | ||
|
|
||
| implementation("com.squareup.okhttp3:logging-interceptor:5.4.0") | ||
| implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:5.4.0") | ||
| implementation("com.squareup.okhttp3:okhttp:5.4.0") | ||
| implementation("io.github.webrtc-sdk:android:144.7559.09") | ||
| implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0") | ||
| implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.11.0") | ||
| implementation("com.posthog:posthog-android:3.51.2") | ||
|
|
||
| debugImplementation("androidx.compose.ui:ui-tooling") | ||
| debugImplementation("androidx.compose.ui:ui-test-manifest") | ||
|
|
||
| testImplementation("junit:junit:4.13.2") | ||
| androidTestImplementation("androidx.test.ext:junit:1.3.0") | ||
| androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0") | ||
| androidTestImplementation("androidx.compose.ui:ui-test-junit4") | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| -keep class org.webrtc.** { *; } | ||
| -keep class org.jni_zero.** { *; } | ||
| -keep class kotlinx.serialization.** { *; } | ||
| -keepclassmembers class com.opencloudgaming.opennow.** { | ||
| @kotlinx.serialization.Serializable *; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <uses-permission android:name="android.permission.INTERNET" /> | ||
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
| <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> | ||
| <uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
| <uses-permission android:name="android.permission.VIBRATE" /> | ||
| <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> | ||
| <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" /> | ||
| <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> | ||
| <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> | ||
|
|
||
| <uses-feature | ||
| android:name="android.hardware.gamepad" | ||
| android:required="false" /> | ||
| <uses-feature | ||
| android:name="android.hardware.touchscreen" | ||
| android:required="false" /> | ||
| <uses-feature | ||
| android:name="android.hardware.faketouch" | ||
| android:required="false" /> | ||
| <uses-feature | ||
| android:name="android.software.leanback" | ||
| android:required="false" /> | ||
| <uses-feature | ||
| android:name="android.hardware.microphone" | ||
| android:required="false" /> | ||
|
|
||
| <application | ||
| android:name=".OpenNowApplication" | ||
| android:allowBackup="false" | ||
| android:appCategory="game" | ||
| android:banner="@drawable/opennow_banner" | ||
| android:hardwareAccelerated="true" | ||
| android:icon="@drawable/opennow_icon" | ||
| android:label="@string/app_name" | ||
| android:networkSecurityConfig="@xml/network_security_config" | ||
| android:resizeableActivity="true" | ||
| android:roundIcon="@drawable/opennow_icon" | ||
| android:supportsRtl="true" | ||
| android:theme="@style/Theme.OpenNOW"> | ||
| <service | ||
| android:name=".AndroidQueueStatusService" | ||
| android:exported="false" | ||
| android:foregroundServiceType="dataSync" /> | ||
| <activity | ||
| android:name=".MainActivity" | ||
| android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" | ||
| android:exported="true" | ||
| android:launchMode="singleTask" | ||
| android:supportsPictureInPicture="true" | ||
| android:windowSoftInputMode="adjustResize"> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.MAIN" /> | ||
| <category android:name="android.intent.category.LAUNCHER" /> | ||
| <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> | ||
| </intent-filter> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
| <data android:scheme="opennow" /> | ||
| </intent-filter> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
| <data android:scheme="http" android:host="localhost" android:port="2259" /> | ||
| <data android:scheme="http" android:host="localhost" android:port="6460" /> | ||
| <data android:scheme="http" android:host="localhost" android:port="7119" /> | ||
| <data android:scheme="http" android:host="localhost" android:port="8870" /> | ||
| <data android:scheme="http" android:host="localhost" android:port="9096" /> | ||
| </intent-filter> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
| <data android:scheme="http" android:host="127.0.0.1" android:port="2259" /> | ||
| <data android:scheme="http" android:host="127.0.0.1" android:port="6460" /> | ||
| <data android:scheme="http" android:host="127.0.0.1" android:port="7119" /> | ||
| <data android:scheme="http" android:host="127.0.0.1" android:port="8870" /> | ||
| <data android:scheme="http" android:host="127.0.0.1" android:port="9096" /> | ||
| </intent-filter> | ||
| </activity> | ||
| <provider | ||
| android:name="androidx.core.content.FileProvider" | ||
| android:authorities="${applicationId}.updates" | ||
| android:exported="false" | ||
| android:grantUriPermissions="true"> | ||
| <meta-data | ||
| android:name="android.support.FILE_PROVIDER_PATHS" | ||
| android:resource="@xml/update_file_paths" /> | ||
| </provider> | ||
| </application> | ||
| </manifest> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| cmake_minimum_required(VERSION 3.22.1) | ||
|
|
||
| project(opennow_native) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 17) | ||
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| add_library(opennow_native SHARED opennow_native.cpp) | ||
|
|
||
| target_compile_options(opennow_native PRIVATE -fexceptions -frtti) | ||
|
|
||
| find_library(log-lib log) | ||
| find_library(android-lib android) | ||
| find_library(mediandk-lib mediandk) | ||
|
|
||
| target_link_libraries( | ||
| opennow_native | ||
| ${android-lib} | ||
| ${log-lib} | ||
| ${mediandk-lib} | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #include <jni.h> | ||
| #include <media/NdkMediaCodec.h> | ||
| #include <media/NdkMediaFormat.h> | ||
| #include <sstream> | ||
| #include <string> | ||
|
|
||
| extern "C" JNIEXPORT jstring JNICALL | ||
| Java_com_opencloudgaming_opennow_NativeCodecProbe_nativeRuntimeSummary(JNIEnv *env, jobject) { | ||
| std::ostringstream out; | ||
| out << "{"; | ||
| out << "\"nativeLibrary\":\"opennow_native\","; | ||
| out << "\"mediaNdk\":true,"; | ||
| out << "\"rtpPacketSize\":1140,"; | ||
| out << "\"inputProtocolVersion\":3"; | ||
| out << "}"; | ||
| const std::string value = out.str(); | ||
| return env->NewStringUTF(value.c_str()); | ||
| } | ||
|
|
||
| extern "C" JNIEXPORT jboolean JNICALL | ||
| Java_com_opencloudgaming_opennow_NativeCodecProbe_nativeDecoderAvailable(JNIEnv *env, jobject, jstring mimeType) { | ||
| if (mimeType == nullptr) { | ||
| return JNI_FALSE; | ||
| } | ||
|
|
||
| const char *rawMimeType = env->GetStringUTFChars(mimeType, nullptr); | ||
| if (rawMimeType == nullptr) { | ||
| return JNI_FALSE; | ||
| } | ||
|
|
||
| AMediaCodec *codec = AMediaCodec_createDecoderByType(rawMimeType); | ||
| env->ReleaseStringUTFChars(mimeType, rawMimeType); | ||
| if (codec == nullptr) { | ||
| return JNI_FALSE; | ||
| } | ||
|
|
||
| AMediaCodec_delete(codec); | ||
| return JNI_TRUE; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[🟠 High] [🔵 Bug]
minSdkwas lowered to 24, but queue notification code still unconditionally callsNotificationChannelandNotification.Builder(context, channelId)(API 26+ only), so queue status updates can crash on Android 24/25 at runtime; either keepminSdk >= 26or add SDK-gated compat notification construction.