2021.04.08

This commit is contained in:
FHT
2021-04-08 11:22:29 +08:00
parent bea9f1c45c
commit a76ee8f972
11 changed files with 248 additions and 88 deletions

View File

@@ -11,13 +11,13 @@ def releaseTime() {
} }
android { android {
compileSdkVersion 29 compileSdkVersion 30
buildToolsVersion "30.0.1" buildToolsVersion "30.0.1"
defaultConfig { defaultConfig {
applicationId "com.tt.ttutils" applicationId "com.tt.ttutils"
minSdkVersion 14 minSdkVersion 16
targetSdkVersion 29 targetSdkVersion 30
// versionCode 1 // versionCode 1
// versionName "1.0" // versionName "1.0"
multiDexEnabled true multiDexEnabled true
@@ -35,6 +35,18 @@ android {
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可. JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
] ]
} }
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
//添加
exclude 'META-INF/rxjava.properties'
}
lintOptions { lintOptions {
checkReleaseBuilds false checkReleaseBuilds false
@@ -131,6 +143,7 @@ android {
dependencies { dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"]) implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.1.0' implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'

View File

@@ -8,16 +8,10 @@
<uses-permission android:name="android.permission.INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" /> <uses-permission android:name="android.permission.DELETE_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!-- Required --> <!-- Required -->
<permission <permission
android:name="${applicationId}.permission.JPUSH_MESSAGE" android:name="${applicationId}.permission.JPUSH_MESSAGE"
android:protectionLevel="signature" /> android:protectionLevel="signature" /> <!-- Required 一些系统要求的权限,如访问网络等 -->
<!-- Required 一些系统要求的权限,如访问网络等-->
<uses-permission android:name="${applicationId}.permission.JPUSH_MESSAGE" /> <uses-permission android:name="${applicationId}.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
@@ -26,26 +20,18 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 华为角标 -->
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" /> <!-- Optional for location -->
<!--华为角标-->
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" />
<!-- Optional for location -->
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 用于开启 debug 版本的应用在6.0 系统上 层叠窗口权限 -->
<!-- 用于开启 debug 版本的应用在6.0 系统上 层叠窗口权限 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <!-- Android Q后台定位权限 -->
<!-- Android Q后台定位权限-->
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" /> <uses-permission android:name="android.permission.GET_TASKS" />
<application <application
android:name="com.tt.base.MyApplication" android:name="com.tt.base.MyApplication"
android:allowBackup="true" android:allowBackup="true"
@@ -54,22 +40,65 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name="com.tt.activity.PackageActivity"></activity>
<receiver
android:name="com.tt.receiver.PackageReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<receiver
android:name="com.tt.receiver.BootReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.BATTERY_CHANGED" />
<action android:name="android.intent.action.BATTERY_LOW" />
<action android:name="android.intent.action.BATTERY_OKAY" />
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action android:name="android.intent.action.DATE_CHANGED" />
<action android:name="android.intent.action.ACTION_TIMEZONE_CHANGED" />
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.intent.action.SCREEN_ON" />
<action android:name="android.intent.action.SCREEN_OFF" />
<!-- 测试 -->
<!-- <action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" /> -->
<!-- <action android:name="android.hardware.usb.action.USB_ACCESSORY_DETACHED" /> -->
<!-- <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> -->
<!-- <action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" /> -->
<!-- <action android:name="android.intent.action.MEDIA_MOUNTED" /> -->
<!-- <action android:name="android.intent.action.MEDIA_CHECKING" /> -->
<!-- <action android:name="android.intent.action.MEDIA_UNMOUNTED" /> -->
<!-- <action android:name="android.intent.action.MEDIA_EJECT" /> -->
<!-- <action android:name="android.intent.action.MEDIA_UNMOUNTABLE" /> -->
<!-- <action android:name="android.intent.action.MEDIA_REMOVED" /> -->
<!-- <action android:name="android.intent.action.MEDIA_BAD_REMOVAL" /> -->
<!-- 自定义广播 -->
<action android:name="com.jiaoguanyi.appstore.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<activity android:name="com.tt.activity.MainActivity"> <activity android:name="com.tt.activity.MainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity> <!-- -->
<!----> <!-- Rich push 核心功能 since 2.0.6 -->
<!-- Rich push 核心功能 since 2.0.6-->
<activity <activity
android:name="cn.jpush.android.ui.PopWinActivity" android:name="cn.jpush.android.ui.PopWinActivity"
android:exported="false" android:exported="false"
android:theme="@style/MyDialogStyle" android:theme="@style/MyDialogStyle"
tools:replace="android:exported"></activity> tools:replace="android:exported" /> <!-- Required SDK核心功能 -->
<!-- Required SDK核心功能-->
<activity <activity
android:name="cn.jpush.android.ui.PushActivity" android:name="cn.jpush.android.ui.PushActivity"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
@@ -82,9 +111,7 @@
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="${applicationId}" /> <category android:name="${applicationId}" />
</intent-filter> </intent-filter>
</activity> </activity> <!-- Required SDK 核心功能 -->
<!-- Required SDK 核心功能-->
<!-- 可配置android:process参数将PushService放在其他进程中 --> <!-- 可配置android:process参数将PushService放在其他进程中 -->
<service <service
android:name="cn.jpush.android.service.PushService" android:name="cn.jpush.android.service.PushService"
@@ -95,16 +122,12 @@
<action android:name="cn.jpush.android.intent.PushService" /> <action android:name="cn.jpush.android.intent.PushService" />
<action android:name="cn.jpush.android.intent.PUSH_TIME" /> <action android:name="cn.jpush.android.intent.PUSH_TIME" />
</intent-filter> </intent-filter>
</service> </service> <!-- since 3.0.9 Required SDK 核心功能 -->
<!-- since 3.0.9 Required SDK 核心功能-->
<provider <provider
android:name="cn.jpush.android.service.DataProvider" android:name="cn.jpush.android.service.DataProvider"
android:authorities="${applicationId}.DataProvider" android:authorities="${applicationId}.DataProvider"
android:exported="false" android:exported="false"
android:process=":pushcore" /> android:process=":pushcore" /> <!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 -->
<!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 -->
<!-- 若不启用该功能可删除该组件,或把 enabled 设置成 false App 不会被其他 App 拉起,但会拉起其他的 App。 --> <!-- 若不启用该功能可删除该组件,或把 enabled 设置成 false App 不会被其他 App 拉起,但会拉起其他的 App。 -->
<service <service
android:name="cn.jpush.android.service.DaemonService" android:name="cn.jpush.android.service.DaemonService"
@@ -112,12 +135,10 @@
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="cn.jpush.android.intent.DaemonService" /> <action android:name="cn.jpush.android.intent.DaemonService" />
<category android:name="${applicationId}" /> <category android:name="${applicationId}" />
</intent-filter> </intent-filter>
</service> <!-- 可选如果使用静态Activity方式拉起该组件必须声明 -->
</service>
<!-- 可选如果使用静态Activity方式拉起该组件必须声明 -->
<activity <activity
android:name="cn.jpush.android.service.DActivity" android:name="cn.jpush.android.service.DActivity"
android:enabled="true" android:enabled="true"
@@ -126,22 +147,19 @@
android:theme="@android:style/Theme.Translucent.NoTitleBar"> android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter> <intent-filter>
<action android:name="cn.jpush.android.intent.DActivity" /> <action android:name="cn.jpush.android.intent.DActivity" />
<category android:name="${applicationId}" /> <category android:name="${applicationId}" />
</intent-filter> </intent-filter>
</activity> </activity> <!-- since 3.1.0 Required SDK 核心功能 -->
<!-- since 3.1.0 Required SDK 核心功能-->
<provider <provider
android:name="cn.jpush.android.service.DownloadProvider" android:name="cn.jpush.android.service.DownloadProvider"
android:authorities="${applicationId}.DownloadProvider" android:authorities="${applicationId}.DownloadProvider"
android:exported="true" /> android:exported="true" /> <!-- Required SDK核心功能 -->
<!-- Required SDK核心功能-->
<receiver <receiver
android:name="cn.jpush.android.service.PushReceiver" android:name="cn.jpush.android.service.PushReceiver"
android:enabled="true"> android:enabled="true">
<intent-filter android:priority="1000"> <intent-filter android:priority="1000">
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!--Required 显示通知栏 --> <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!-- Required 显示通知栏 -->
<category android:name="${applicationId}" /> <category android:name="${applicationId}" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
@@ -155,46 +173,34 @@
<data android:scheme="package" /> <data android:scheme="package" />
</intent-filter> </intent-filter>
</receiver> </receiver> <!-- Required SDK核心功能 -->
<!-- Required SDK核心功能-->
<receiver <receiver
android:name="cn.jpush.android.service.AlarmReceiver" android:name="cn.jpush.android.service.AlarmReceiver"
android:exported="false" /> android:exported="false" /> <!-- 3.5.0新增,用于定时展示功能 -->
<!-- 3.5.0新增,用于定时展示功能 -->
<receiver <receiver
android:name="cn.jpush.android.service.SchedulerReceiver" android:name="cn.jpush.android.service.SchedulerReceiver"
android:exported="false" /> android:exported="false" /> <!-- 3.6.7 新增,用于负反馈组件 -->
<service android:name="cn.jpush.android.service.MessagingIntentService" /> <!-- User defined. For test only 用户自定义的广播接收器 -->
<!-- 3.6.7 新增,用于负反馈组件 -->
<service android:name="cn.jpush.android.service.MessagingIntentService" />
<!-- User defined. For test only 用户自定义的广播接收器-->
<receiver <receiver
android:name="com.tt.sdk.jpush.jpushdemo.MyReceiver" android:name="com.tt.sdk.jpush.jpushdemo.MyReceiver"
android:enabled="true"> android:enabled="true">
<intent-filter> <intent-filter>
<action android:name="cn.jpush.android.intent.REGISTRATION" /> <!--Required 用户注册SDK的intent--> <action android:name="cn.jpush.android.intent.REGISTRATION" /> <!-- Required 用户注册SDK的intent -->
<action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!--Required 用户接收SDK消息的intent--> <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!-- Required 用户接收SDK消息的intent -->
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!--Required 用户接收SDK通知栏信息的intent--> <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!-- Required 用户接收SDK通知栏信息的intent -->
<action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!--Required 用户打开自定义通知栏的intent--> <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!-- Required 用户打开自定义通知栏的intent -->
<action android:name="cn.jpush.android.intent.CONNECTION" /><!-- 接收网络变化 连接/断开 since 1.6.3 --> <action android:name="cn.jpush.android.intent.CONNECTION" /> <!-- 接收网络变化 连接/断开 since 1.6.3 -->
<category android:name="${applicationId}" /> <category android:name="${applicationId}" />
</intent-filter> </intent-filter>
</receiver> </receiver> <!-- User defined. For test only 用户自定义接收消息器,3.0.7开始支持,目前新tag/alias接口设置结果会在该广播接收器对应的方法中回调 -->
<!-- since 3.3.0 接收JPush相关事件 -->
<!-- User defined. For test only 用户自定义接收消息器,3.0.7开始支持,目前新tag/alias接口设置结果会在该广播接收器对应的方法中回调-->
<!--since 3.3.0 接收JPush相关事件-->
<receiver android:name="com.tt.sdk.jpush.jpushdemo.PushMessageReceiver"> <receiver android:name="com.tt.sdk.jpush.jpushdemo.PushMessageReceiver">
<intent-filter> <intent-filter>
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" /> <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
<category android:name="${applicationId}"></category>
</intent-filter>
</receiver>
<!--since 3.3.0 Required SDK核心功能--> <category android:name="${applicationId}" />
</intent-filter>
</receiver> <!-- since 3.3.0 Required SDK核心功能 -->
<activity <activity
android:name="cn.jpush.android.service.JNotifyActivity" android:name="cn.jpush.android.service.JNotifyActivity"
android:exported="false" android:exported="false"
@@ -203,32 +209,26 @@
tools:replace="android:exported"> tools:replace="android:exported">
<intent-filter> <intent-filter>
<action android:name="cn.jpush.android.intent.JNotifyActivity" /> <action android:name="cn.jpush.android.intent.JNotifyActivity" />
<category android:name="${applicationId}" /> <category android:name="${applicationId}" />
</intent-filter> </intent-filter>
</activity> </activity> <!-- since 3.3.0 Required SDK 核心功能 -->
<!-- since 3.3.0 Required SDK 核心功能-->
<!-- 可配置android:process参数将PushService放在其他进程中 --> <!-- 可配置android:process参数将PushService放在其他进程中 -->
<!--User defined. For test only 继承自cn.jpush.android.service.JCommonService--> <!-- User defined. For test only 继承自cn.jpush.android.service.JCommonService -->
<service <service
android:name="com.tt.sdk.jpush.jpushdemo.PushService" android:name="com.tt.sdk.jpush.jpushdemo.PushService"
android:process=":pushcore"> android:process=":pushcore">
<intent-filter> <intent-filter>
<action android:name="cn.jiguang.user.service.action" /> <action android:name="cn.jiguang.user.service.action" />
</intent-filter> </intent-filter>
</service> </service> <!-- since 3.5.6 新增华硕通道 -->
<!-- since 3.5.6 新增华硕通道 --> <receiver android:name="cn.jpush.android.asus.AsusPushMessageReceiver" /> <!-- Required . Enable it you can get statistics data with channel -->
<receiver android:name="cn.jpush.android.asus.AsusPushMessageReceiver">
</receiver>
<!-- Required . Enable it you can get statistics data with channel -->
<meta-data <meta-data
android:name="JPUSH_CHANNEL" android:name="JPUSH_CHANNEL"
android:value="${JPUSH_CHANNEL}" /> android:value="${JPUSH_CHANNEL}" />
<meta-data <meta-data
android:name="JPUSH_APPKEY" android:name="JPUSH_APPKEY"
android:value="${JPUSH_APPKEY}" /> android:value="${JPUSH_APPKEY}" /> <!-- </>值来自开发者平台取得的AppKey -->
<!-- </>值来自开发者平台取得的AppKey-->
<meta-data <meta-data
android:name="design_width_in_dp" android:name="design_width_in_dp"
android:value="640" /> android:value="640" />

View File

@@ -14,8 +14,9 @@ class MainActivity : AppCompatActivity(), CancelAdapt {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main) setContentView(R.layout.activity_main)
//截图 //截图
CmdUtil.execute(" screencap -p /sdcard/" + "screen" + System.currentTimeMillis() + ".png") // CmdUtil.execute(" screencap -p /sdcard/" + "screen" + System.currentTimeMillis() + ".png")
textView.setText(DevicesUtils.getSerial()) textView.setText(DevicesUtils.getSerial())
} }

View File

@@ -0,0 +1,42 @@
package com.tt.activity;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import com.tt.receiver.PackageReceiver;
import com.tt.ttutils.R;
public class PackageActivity extends AppCompatActivity {
private PackageReceiver packageReceiver;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_package);
register();
}
@Override
protected void onDestroy() {
super.onDestroy();
if (null != packageReceiver) {
unregisterReceiver(packageReceiver);
}
}
private void register() {
if (null == packageReceiver) {
packageReceiver = new PackageReceiver();
}
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_PACKAGE_ADDED);
filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
filter.addDataScheme("package");
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
registerReceiver(packageReceiver, filter);
}
}

View File

@@ -0,0 +1,21 @@
package com.tt.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class BootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// TODO: This method is called when the BroadcastReceiver is receiving
// an Intent broadcast.
//throw new UnsupportedOperationException("Not yet implemented");
String action = intent.getAction();
if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
//自启
} else if (action.equals(Intent.ACTION_USER_PRESENT)) {
//解锁
}
}
}

View File

@@ -0,0 +1,21 @@
package com.tt.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class PackageReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// TODO: This method is called when the BroadcastReceiver is receiving
// an Intent broadcast.
//throw new UnsupportedOperationException("Not yet implemented");
String action = intent.getAction();
if (action.equals(Intent.ACTION_PACKAGE_ADDED)
|| action.equals(Intent.ACTION_PACKAGE_REPLACED)
|| action.equals(Intent.ACTION_PACKAGE_REMOVED)) {
}
}
}

View File

@@ -0,0 +1,10 @@
package com.tt.ttutils.jni;
public class NDKTools {
static {
System.loadLibrary("myMeetJni");
}
public static native String getStringFromNDK();
}

View File

@@ -0,0 +1,21 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_tt_ttutils_jni_NDKTools */
#ifndef _Included_com_tt_ttutils_jni_NDKTools
#define _Included_com_tt_ttutils_jni_NDKTools
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_tt_ttutils_jni_NDKTools
* Method: getStringFromNDK
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_tt_ttutils_jni_NDKTools_getStringFromNDK
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif
#endif

21
app/src/main/jni/main.c Normal file
View File

@@ -0,0 +1,21 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_tt_ttutils_jni_NDKTools */
#ifndef _Included_com_tt_ttutils_jni_NDKTools
#define _Included_com_tt_ttutils_jni_NDKTools
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_tt_ttutils_jni_NDKTools
* Method: getStringFromNDK
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_tt_ttutils_jni_NDKTools_getStringFromNDK
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.tt.activity.PackageActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -19,3 +19,4 @@ android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
android.useDeprecatedNdk=true