refactored android example_app
This commit is contained in:
@@ -4,7 +4,7 @@ android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.3"
|
||||
defaultConfig {
|
||||
applicationId "com.example.joseph.example_android_app"
|
||||
applicationId "com.example.joseph.example_app"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 23
|
||||
versionCode 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.example.joseph.example_android_app;
|
||||
package com.example.joseph.example_app;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
@@ -24,6 +24,6 @@ public class ExampleInstrumentationTest {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.example.joseph.example_android_app", appContext.getPackageName());
|
||||
assertEquals("com.example.joseph.example_app", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.joseph.example_android_app">
|
||||
package="com.example.joseph.example_app">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@@ -8,10 +8,6 @@
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<activity android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package ZeroTierSDK.ZeroTierSDK;
|
||||
public class ZeroTierSDK {
|
||||
package SDK;
|
||||
public class SDK {
|
||||
public native void startOneService();
|
||||
static { System.loadLibrary("ZeroTierOneJNI"); } // Loads JNI code
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.example.joseph.example_android_app;
|
||||
package com.example.joseph.example_app;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import SDK.SDK;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
@@ -12,10 +14,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
ZeroTierSDK wrapper = new ZeroTierSDK();
|
||||
SDK wrapper = new SDK();
|
||||
wrapper.startOneService(); // Calls to JNI code
|
||||
}
|
||||
}).start();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
android:id="@+id/activity_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.example.joseph.example_android_app.MainActivity">
|
||||
tools:context="com.example.joseph.example_app.MainActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">Example_Android_App</string>
|
||||
<string name="app_name">example_app</string>
|
||||
</resources>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.example.joseph.example_android_app;
|
||||
package com.example.joseph.example_app;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
|
||||
org.gradle.daemon=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
|
||||
Reference in New Issue
Block a user