mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-24 22:45:20 +00:00
0c7505b588
* wifi aware wip * wifi aware wip * starting to work * werk * dms work * wip * fix(wifi-aware): use bindSocket and scoped IPv6 instead of bindProcessToNetwork * Merge branch 'upstream/main' into fix/wifi-aware-socket-binding * Fix Wi-Fi Aware connectivity and UI integration post-merge - Replace bindProcessToNetwork with bindSocket for VPN compatibility. - Implement Scoped IPv6 address resolution (aware0) for mesh routing. - Bridge Wi-Fi Aware incoming messages to AppStateStore for UI visibility. - Fix syntax errors and variable name conflicts in Debug UI. * Enhance Wi-Fi Aware robustness and debug UI display - Clean up transport resources (sockets, server sockets, network callbacks) immediately on peer disconnection. - Implement resolveScopedAddress to show scoped IPv6 (e.g., %aware0) in Debug UI. - Fix Map type mismatch warning in ChatViewModel bridge. - Filter self-ID from peer cleanup tables to prevent recursive self-removal. * Share GossipSyncManager across transports to prevent redundant message synchronization - Registered BluetoothMeshService's GossipSyncManager as a singleton in MeshServiceHolder. - Modified WifiAwareMeshService to use the shared GossipSyncManager if available. - Added background cleanup for peer mappings on socket disconnection. - Fixed Kotlin type mismatch during nickname map merging. * Restore VPN acquisition logic and improve peer cleanup - Revert removal of NET_CAPABILITY_NOT_VPN to allow hardware handle acquisition while VPN is active. - Refactor handlePeerDisconnection to more reliably cleanup initial and routed IDs. - Switch cleanup logging to debug level to reduce log noise. --------- Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com> Co-authored-by: aidenvalue <>
133 lines
6.4 KiB
XML
133 lines
6.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||
xmlns:tools="http://schemas.android.com/tools">
|
||
|
||
<!-- Internet permissions for Nostr relay connections -->
|
||
<uses-permission android:name="android.permission.INTERNET" />
|
||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
||
|
||
<!-- Bluetooth permissions -->
|
||
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
|
||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
||
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
|
||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
||
|
||
<!-- Location permission required for BLE scanning -->
|
||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||
|
||
<!-- Notification permissions -->
|
||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||
|
||
<!-- Wi‑Fi / Wi‑Fi Aware permissions -->
|
||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||
<!-- Android 13+ runtime permission for Wi‑Fi operations (including Aware) -->
|
||
<uses-permission android:name="android.permission.NEARBY_WIFI_DEVICES" />
|
||
<!-- Signature permission for internal UI shutdown broadcasts -->
|
||
<uses-permission android:name="com.bitchat.android.permission.FORCE_FINISH" />
|
||
<!-- Foreground service and boot permissions for long-running background mesh -->
|
||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||
<!-- Connected device foreground service type for BLE operations (API 34+) -->
|
||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
|
||
<!-- Data sync foreground service type (required when declaring dataSync) -->
|
||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||
|
||
<!-- Microphone for voice notes -->
|
||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||
|
||
<!-- Storage permissions for file sharing -->
|
||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
|
||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||
|
||
<!-- Haptic feedback permission -->
|
||
<uses-permission android:name="android.permission.VIBRATE" />
|
||
|
||
<!-- Battery optimization permission -->
|
||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||
|
||
<!-- Hardware features -->
|
||
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
|
||
<uses-feature android:name="android.hardware.bluetooth" android:required="true" />
|
||
<!-- Device support hint for Wi‑Fi Aware (optional) -->
|
||
<uses-feature android:name="android.hardware.wifi.aware" android:required="false" />
|
||
|
||
<permission
|
||
android:name="com.bitchat.android.permission.FORCE_FINISH"
|
||
android:protectionLevel="signature" />
|
||
|
||
<application
|
||
android:name=".BitchatApplication"
|
||
android:allowBackup="false"
|
||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||
android:fullBackupContent="@xml/backup_rules"
|
||
android:icon="@mipmap/ic_launcher"
|
||
android:roundIcon="@mipmap/ic_launcher_round"
|
||
android:label="@string/app_name"
|
||
android:supportsRtl="true"
|
||
android:theme="@style/Theme.BitchatAndroid"
|
||
tools:targetApi="31">
|
||
<!-- FileProvider for sharing temp/cache files with external viewers -->
|
||
<provider
|
||
android:name="androidx.core.content.FileProvider"
|
||
android:authorities="${applicationId}.fileprovider"
|
||
android:exported="false"
|
||
android:grantUriPermissions="true">
|
||
<meta-data
|
||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||
android:resource="@xml/file_paths" />
|
||
</provider>
|
||
<activity
|
||
android:name=".ui.GeohashPickerActivity"
|
||
android:exported="false"
|
||
android:theme="@style/Theme.BitchatAndroid"
|
||
android:windowSoftInputMode="adjustResize" />
|
||
<activity
|
||
android:name=".MainActivity"
|
||
android:exported="true"
|
||
android:label="@string/app_name"
|
||
android:theme="@style/Theme.BitchatAndroid"
|
||
android:windowSoftInputMode="adjustResize"
|
||
android:launchMode="singleTop">
|
||
<intent-filter>
|
||
<action android:name="android.intent.action.MAIN" />
|
||
<category android:name="android.intent.category.LAUNCHER" />
|
||
</intent-filter>
|
||
</activity>
|
||
|
||
<!-- Persistent foreground service to run the mesh in background -->
|
||
<service
|
||
android:name=".service.MeshForegroundService"
|
||
android:exported="false"
|
||
android:foregroundServiceType="connectedDevice|dataSync"
|
||
tools:ignore="DataExtractionRules">
|
||
</service>
|
||
|
||
<!-- Listen for in-app broadcast when POST_NOTIFICATIONS is granted -->
|
||
<receiver
|
||
android:name=".service.NotificationPermissionChangedReceiver"
|
||
android:enabled="true"
|
||
android:exported="false">
|
||
<intent-filter>
|
||
<action android:name="com.bitchat.android.action.NOTIFICATION_PERMISSION_GRANTED" />
|
||
</intent-filter>
|
||
</receiver>
|
||
|
||
<!-- Auto-start mesh service after boot if enabled -->
|
||
<receiver
|
||
android:name=".service.BootCompletedReceiver"
|
||
android:enabled="true"
|
||
android:exported="false">
|
||
<intent-filter>
|
||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
|
||
</intent-filter>
|
||
</receiver>
|
||
</application>
|
||
</manifest>
|