diff --git a/app/app.iml b/app/app.iml
index 292e30e..42fa1fa 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -29,7 +29,7 @@
-
+
@@ -59,7 +59,7 @@
-
+
diff --git a/app/build.gradle b/app/build.gradle
index c144061..be92790 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -32,6 +32,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f3a3a4c..0096912 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,8 +2,6 @@
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/cpp/3rdparty/json b/app/src/main/cpp/3rdparty/json
new file mode 160000
index 0000000..99d7518
--- /dev/null
+++ b/app/src/main/cpp/3rdparty/json
@@ -0,0 +1 @@
+Subproject commit 99d7518d21cbbfe91d341a5431438bf7559c6974
diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt
index b3dff0e..c97ab29 100644
--- a/app/src/main/cpp/CMakeLists.txt
+++ b/app/src/main/cpp/CMakeLists.txt
@@ -15,6 +15,11 @@ set (HEADERS
model/Song.h
)
+set(JSON_BuildTests OFF CACHE INTERNAL "")
+
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/json)
+
add_library( # Sets the name of the library.
native-lib
@@ -47,7 +52,9 @@ find_library( # Sets the name of the path variable.
target_link_libraries( # Specifies the target library.
native-lib
+ PRIVATE nlohmann_json::nlohmann_json
# Links the target library to the log library
# included in the NDK.
- ${log-lib} )
\ No newline at end of file
+ ${log-lib}
+ )
\ No newline at end of file
diff --git a/app/src/main/cpp/Demo.cpp b/app/src/main/cpp/Demo.cpp
index cfc3688..374f2bd 100644
--- a/app/src/main/cpp/Demo.cpp
+++ b/app/src/main/cpp/Demo.cpp
@@ -15,17 +15,50 @@
#include
#include
+#include "nlohmann/json.hpp"
+
#include "model/Song.h"
-int demoCall()
+model::Song initSong();
+
+int demoCall();
+
+void printSong(const model::Song&);
+
+
+model::Song initSong()
{
model::Song song;
song.title = "hello";
song.artist = "some artist";
+
+
+ return song;
+}
+
+
+int demoCall()
+{
+ model::Song song = initSong();
+
std::cout << "testing" << std::endl;
+ printSong(song);
+
return 0;
}
+
+void printSong(const model::Song& song)
+{
+ std::cout << "\nsong information" << std::endl;
+ std::cout << "title: " << song.title << std::endl;
+ std::cout << "artist: " << song.artist << std::endl;
+ std::cout << "album: " << song.album << std::endl;
+ std::cout << "genre: " << song.genre << std::endl;
+ std::cout << "year: " << song.year << std::endl;
+}
+
+
extern "C"
JNIEXPORT void
JNICALL
@@ -34,4 +67,14 @@ Java_com_example_mear_activities_MainActivity_test(
jobject /* this */) {
demoCall();
-}
\ No newline at end of file
+}
+
+extern "C"
+JNIEXPORT void
+JNICALL
+Java_com_example_mear_activities_DemoStreamActivity_test(
+ JNIEnv *env,
+ jobject /* this */) {
+
+ demoCall();
+}
diff --git a/app/src/main/java/com/example/mear/activities/DemoStreamActivity.kt b/app/src/main/java/com/example/mear/activities/DemoStreamActivity.kt
new file mode 100644
index 0000000..0492b16
--- /dev/null
+++ b/app/src/main/java/com/example/mear/activities/DemoStreamActivity.kt
@@ -0,0 +1,37 @@
+package com.example.mear.activities
+
+import android.os.Bundle
+import android.support.design.widget.Snackbar
+import android.support.v7.app.AppCompatActivity
+import com.example.mear.R
+
+import kotlinx.android.synthetic.main.activity_demo_stream.*
+import kotlinx.android.synthetic.main.content_demo_stream.*
+
+class DemoStreamActivity : AppCompatActivity() {
+
+ companion object {
+ init {
+ System.loadLibrary("native-lib")
+ }
+ }
+
+
+ external fun test();
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_demo_stream)
+ setSupportActionBar(toolbar)
+
+ demoStream.setOnClickListener {
+ test()
+ }
+
+ fab.setOnClickListener {view ->
+ Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
+ .setAction("Action", null).show()
+ }
+ }
+
+}
diff --git a/app/src/main/res/layout/activity_demo_stream.xml b/app/src/main/res/layout/activity_demo_stream.xml
new file mode 100644
index 0000000..ac123fb
--- /dev/null
+++ b/app/src/main/res/layout/activity_demo_stream.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/content_demo_stream.xml b/app/src/main/res/layout/content_demo_stream.xml
new file mode 100644
index 0000000..9fd0be9
--- /dev/null
+++ b/app/src/main/res/layout/content_demo_stream.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9b93fff..3cd8078 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -56,64 +56,22 @@
John Smith
Add friends to messages
-
- - Always
- - When possible
- - Never
-
-
- - 1
- - 0
- - -1
-
+ Data & sync
+ Sync frequency
- Data & sync
-
- Sync frequency
-
- - 15 minutes
- - 30 minutes
- - 1 hour
- - 3 hours
- - 6 hours
- - Never
-
-
- - 15
- - 30
- - 60
- - 180
- - 360
- - -1
-
-
-
- - Entry 1
- - Entry 2
- - Entry 3
-
-
-
- - 1
- - 2
- - 3
-
-
-
-
System sync settings
-
Notifications
-
New message notifications
-
Ringtone
+
Silent
Vibrate
+
SongViewActivity
+
"Material is the metaphor.\n\n"
@@ -203,4 +161,47 @@
"For example, position the FAB to one side of stream of a cards so the FAB won’t interfere "
"when a user tries to pick up one of cards.\n\n"
+
+
+ DemoStreamActivity
+
+
+ - Always
+ - When possible
+ - Never
+
+
+
+ - 1
+ - 0
+ - -1
+
+
+ - 15 minutes
+ - 30 minutes
+ - 1 hour
+ - 3 hours
+ - 6 hours
+ - Never
+
+
+
+ - 15
+ - 30
+ - 60
+ - 180
+ - 360
+ - -1
+
+
+ - Entry 1
+ - Entry 2
+ - Entry 3
+
+
+ - 1
+ - 2
+ - 3
+
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 7b7f3b4..98c219b 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -8,8 +8,10 @@
- @color/colorAccent
- @style/PopupMenu
- - @style/myPopupMenuTextAppearanceSmall
- - @style/myPopupMenuTextAppearanceLarge
+ - @style/myPopupMenuTextAppearanceSmall
+
+ - @style/myPopupMenuTextAppearanceLarge
+