forked from AlexandreRouma/SDRPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request AlexandreRouma#649 from AlexandreRouma/backend_abs…
…traction Backend abstraction and android support
- Loading branch information
Showing
115 changed files
with
5,934 additions
and
2,156 deletions.
There are no files selected for viewing
This file contains 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 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 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,12 @@ | ||
.cxx | ||
.externalNativeBuild | ||
build/ | ||
*.iml | ||
|
||
.idea | ||
.gradle | ||
local.properties | ||
|
||
# Android Studio puts a Gradle wrapper here, that we don't want: | ||
gradle/ | ||
gradlew* |
This file contains 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,64 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
|
||
android { | ||
compileSdkVersion 28 | ||
buildToolsVersion "30.0.3" | ||
ndkVersion "23.0.7599858" | ||
defaultConfig { | ||
applicationId "org.sdrpp.sdrpp" | ||
minSdkVersion 28 | ||
targetSdkVersion 28 | ||
versionCode 1 | ||
versionName "1.1.0" | ||
|
||
externalNativeBuild { | ||
cmake { | ||
arguments "-DOPT_BACKEND_GLFW=OFF", "-DOPT_BACKEND_ANDROID=ON", "-DOPT_BUILD_SOAPY_SOURCE=OFF", "-DOPT_BUILD_ANDROID_AUDIO_SINK=ON", "-DOPT_BUILD_AUDIO_SINK=OFF", "-DOPT_BUILD_DISCORD_PRESENCE=OFF", "-DUSE_INTERNAL_LIBCORRECT=OFF" | ||
} | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') | ||
} | ||
} | ||
|
||
externalNativeBuild { | ||
cmake { | ||
version "3.18.1" | ||
path "../../CMakeLists.txt" | ||
} | ||
} | ||
|
||
sourceSets { | ||
main { | ||
assets.srcDirs += ['assets'] | ||
} | ||
} | ||
} | ||
|
||
task deleteTempAssets (type: Delete) { | ||
delete 'assets' | ||
} | ||
|
||
task copyResources(type: Copy) { | ||
description = 'Copy resources...' | ||
from '../../root/' | ||
into 'assets/' | ||
include('**/*') | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation 'androidx.appcompat:appcompat:1.0.2' | ||
} | ||
|
||
copyResources.dependsOn deleteTempAssets | ||
preBuild.dependsOn copyResources |
This file contains 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,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="org.sdrpp.sdrpp"> | ||
|
||
<application | ||
android:label="SDR++" | ||
android:allowBackup="false" | ||
android:fullBackupContent="false" | ||
android:hasCode="true"> | ||
|
||
<activity | ||
android:name="org.sdrpp.sdrpp.MainActivity" | ||
android:icon="@mipmap/ic_launcher" | ||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" | ||
android:configChanges="orientation|keyboardHidden|screenSize"> | ||
<meta-data android:name="android.app.lib_name" android:value="sdrpp_core" /> | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
</manifest> |
This file contains 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,32 @@ | ||
package org.sdrpp.sdrpp; | ||
|
||
import android.app.NativeActivity; | ||
import android.app.AlertDialog; | ||
import android.app.PendingIntent; | ||
import android.content.Intent; | ||
import android.content.IntentFilter; | ||
import android.content.BroadcastReceiver; | ||
import android.content.Context; | ||
import android.content.DialogInterface; | ||
import android.content.pm.PackageManager; | ||
import android.hardware.usb.*; | ||
import android.Manifest; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.view.KeyEvent; | ||
import android.view.inputmethod.InputMethodManager; | ||
import android.util.Log; | ||
import android.content.res.AssetManager; | ||
|
||
import androidx.core.app.ActivityCompat; | ||
|
||
import androidx.core.content.PermissionChecker; | ||
|
||
import java.util.concurrent.LinkedBlockingQueue; | ||
import java.io.*; | ||
|
||
class DeviceManager { | ||
public fun init() { | ||
|
||
} | ||
} |
Oops, something went wrong.