keep orientation in portrait mode, disable connection/disconnection sounds
This commit is contained in:
1 parent
3fa3a182ec
commit
3e2e5a68ce
7 files changed
+15
-5
No files matched your search
@@ -1 +1,2 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
relay/mobile.aar
|
||||||
Binary file not shown.
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
@@ -19,6 +18,7 @@
|
|||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import mobile.LogCallback
|
|||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val VK_CALL_LINK = "https://vk.com/call/join/6kGvQofFiOyjuK0w_BeQvAx8gTsUg0PKUVzWt0VmkIg" // Open call page on app start
|
private const val VK_CALL_LINK = "" // Open call page on app start
|
||||||
}
|
}
|
||||||
|
|
||||||
private lateinit var webView: WebView
|
private lateinit var webView: WebView
|
||||||
@@ -137,9 +137,18 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
webView.webViewClient = object : WebViewClient() {
|
webView.webViewClient = object : WebViewClient() {
|
||||||
|
override fun onPageStarted(view: WebView, url: String, favicon: android.graphics.Bitmap?) {
|
||||||
|
view.evaluateJavascript("""(function(){
|
||||||
|
var oac=window.AudioContext||window.webkitAudioContext;
|
||||||
|
if(oac){var nac=function(){var c=new oac();c.suspend();
|
||||||
|
c.resume=function(){return Promise.resolve()};
|
||||||
|
return c};
|
||||||
|
nac.prototype=oac.prototype;window.AudioContext=nac;
|
||||||
|
if(window.webkitAudioContext)window.webkitAudioContext=nac}
|
||||||
|
})()""", null)
|
||||||
|
}
|
||||||
override fun onPageFinished(view: WebView, url: String) {
|
override fun onPageFinished(view: WebView, url: String) {
|
||||||
appendLog("Page loaded, injecting hook...")
|
appendLog("Page loaded, injecting hook...")
|
||||||
view.evaluateJavascript("(function(){var o=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){this.muted=true;this.volume=0;return o.call(this)}})()", null)
|
|
||||||
view.evaluateJavascript(hookJs, null)
|
view.evaluateJavascript(hookJs, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
ROOT="$(dirname "$0")"
|
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
||||||
cd "$ROOT/app"
|
cd "$ROOT/app"
|
||||||
|
|
||||||
[ -f "./gradlew" ] || { echo "gradlew not found"; exit 1; }
|
[ -f "./gradlew" ] || { echo "gradlew not found"; exit 1; }
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user