Skip to content

Commit

Permalink
第一个版本
Browse files Browse the repository at this point in the history
  • Loading branch information
bjutapp committed Nov 26, 2024
0 parents commit affd89a
Show file tree
Hide file tree
Showing 125 changed files with 5,406 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
/app/build
/app/.cxx
/app/release
/app/src/main/cpp
/app/src/main/jniLibs
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

281 changes: 281 additions & 0 deletions Beijing_University_of_Technology.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# bjut app

日新工大第三方安卓版本,本APP是非官方的,免费开源的,功能实现完全依赖官方接口,个人数据仅保存在本地。初衷是集成北京工业大学 (BJUT) 所有有用的线上功能,本应用后续不定期更新。
本APP无意冒充官方日新工大,请认真辨别,禁止用于非法用途。

## 计划支持的功能

* [x] 课程表查看
* [x] 校园一卡通服务
* [x] 新闻查看
* [x] WEBVPN集成
* [x] 集成校内VPN动态otp验证码 (特色)
* [x] 桌面APP长按快捷菜单
* [ ] 图书馆相关功能
* [ ] 校内邮箱浏览
* [ ] 办事大厅
* [ ] 重要消息提示

## 应用编写说明

本代码使用Android Studio kotlin编写,由于版权和安全因素,部分静态链接库未在此处发布。相当于官版日新工大,此应用优化了一些数据的缓存逻辑,整体界面使用类Google Material风格设计,且适配了系统的暗色主题,部分页面依赖于系统WebView。

## 应用兼容性说明

本app支持armeabi-v7a和arm64-v8a两种安卓架构,理论上支持Android 7.0+版本。

## 应用内部分截图

![image](./img/1.jpg)
![image](./img/2.jpg)
![image](./img/3.jpg)
![image](./img/4.jpg)
![image](./img/5.jpg)
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
89 changes: 89 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}

android {
namespace = "com.hlwdy.bjut"
compileSdk = 34

defaultConfig {
applicationId = "com.hlwdy.bjut"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
ndk {
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
}
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags("-std=c++14")
//arguments("-DANDROID_STL=c++_shared")
arguments("-DANDROID_STL=none")
}
}
}

splits {
abi {
isEnable = true
reset()
include("armeabi-v7a", "arm64-v8a")
isUniversalApk=true
}
}

sourceSets {
getByName("main") {
jniLibs.srcDirs("src/main/jniLibs")
}
}

buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
viewBinding = true
}

externalNativeBuild {
cmake {
path("src/main/cpp/CMakeLists.txt")
}
}
}

dependencies {

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.lifecycle.livedata.ktx)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
implementation(libs.androidx.gridlayout)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)

implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation("androidx.core:core-splashscreen:1.0.1")
}
31 changes: 31 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.Conscrypt$Version
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
24 changes: 24 additions & 0 deletions app/src/androidTest/java/com/hlwdy/bjut/ExampleInstrumentedTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.hlwdy.bjut

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.hlwdy.bjut", appContext.packageName)
}
}
54 changes: 54 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET"/>

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Bjut"
tools:targetApi="31"
android:usesCleartextTraffic="true">
<activity android:name=".ui.LoginActivity" android:exported="true" android:theme="@style/Theme.App.Starting">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
<activity
android:name=".MainActivity"
android:exported="false"
android:theme="@style/Theme.Bjut.NoActionBar">
</activity>
<activity
android:name=".ui.news.NewsDetailActivity"
android:exported="false"
android:theme="@style/Theme.Bjut.NoActionBar"/>
<activity
android:name=".ui.home.WebVpnViewActivity"
android:exported="false"
android:theme="@style/Theme.Bjut.NoActionBar"/>
<activity
android:name=".ui.LogViewActivity"
android:exported="false"
android:theme="@style/Theme.Bjut.NoActionBar"/>
<activity
android:name=".ui.AboutActivity"
android:exported="false"
android:theme="@style/Theme.Bjut.NoActionBar"/>

<activity android:name=".RouterActivity" android:exported="false" android:theme="@style/Theme.App.Starting">

</activity>
</application>

</manifest>
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions app/src/main/java/com/hlwdy/bjut/ApkUpdate.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.hlwdy.bjut

import okhttp3.Callback

class ApkUpdate {
fun getLatest(callback: Callback){
HttpUtils()
.get("https://api.github.com/repos/bjutapp/bjut/releases/latest",true,callback)
}
}
Loading

0 comments on commit affd89a

Please sign in to comment.