Skip to content

Commit

Permalink
[SSDK-1012] adopt sdk update
Browse files Browse the repository at this point in the history
  • Loading branch information
minli5 committed Jul 21, 2017
1 parent 93d3576 commit 4fd7ce9
Show file tree
Hide file tree
Showing 20 changed files with 374 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .idea/gradle.xml

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

2 changes: 2 additions & 0 deletions .idea/modules.xml

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

123 changes: 122 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,142 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true


// Enabling multidex support.
multiDexEnabled true
}




buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"

//lm
dexInProcess false
}
splits {
abi {
enable true
reset()
include 'armeabi-v7a'
universalApk false
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':common-prod-debug')
compile project(':sdk-dev-debug')
}

repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
testCompile 'junit:junit:4.12'
compile project(':common-prod-debug')
compile project(':sdk-dev-debug')
}


dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})


compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'

//lm
compile libs.ln
compile 'com.android.support:multidex:1.0.1'
compile libs.dagger
provided libs.daggercompiler

compile libs.eventbus

androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

compile libs.supportv13
compile libs.supportannotation
compile libs.appcompatv7
compile libs.recyclerviewv7
compile libs.cardviewv7
compile libs.supportdesign
compile libs.gridlayout

compile libs.gson

compile libs.retrofit
compile libs.retrofit_gsonconverter

compile libs.retrofit_deprecated
compile libs.okhttp3_for_retrofit1
compile libs.retrofit_rxjava

compile libs.okhttp
compile libs.okhttp_logging
compile libs.websocket

compile libs.dagger
provided libs.daggercompiler

compile libs.eventbus

compile 'com.jakewharton:butterknife:7.0.1'


compile libs.spongycastle_prov
compile libs.spongycastle_core
compile libs.kms


compile libs.wmeaar

compile libs.rxjava
compile libs.rxandroid

compile libs.will

debugCompile libs.leak_canary
releaseCompile libs.leak_canary_disabled
testCompile libs.leak_canary_disabled
androidTestCompile libs.leak_canary_disabled

compile libs.rxrelay

testCompile libs.junit
testCompile libs.robolectric
testCompile libs.robolectric_multidex
testCompile libs.mockito
compile 'joda-time:joda-time:2.9.2'


}
40 changes: 37 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,57 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cisco.sparksdk.sparkkitchensink">

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

<uses-feature
android:name="android.hardware.camera"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.flash"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.front"
android:required="false"/>

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

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

<application

android:name=".KitchenSinkApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".EnterActivity">

<activity
android:name=".EnterActivity"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateHidden">

<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".JWTActivity">
<activity android:name=".JWTActivity"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateHidden">
</activity>
<activity android:name=".RegistryActivity">
<activity android:name=".RegistryActivity"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateHidden">
</activity>
</application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class EnterActivity extends AppCompatActivity {

Expand All @@ -22,6 +23,8 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_enter);

Log.i(TAG, "onCreate: ->start");


buttonJWT = (Button) findViewById(R.id.buttonJWT);
buttonJWT.setOnClickListener(new View.OnClickListener() {
Expand All @@ -33,6 +36,25 @@ public void onClick(View v) {
// currentContext.startActivity(activityChangeIntent);

EnterActivity.this.startActivity(intent);

KitchenSinkApplication myapplication = (KitchenSinkApplication)getApplication();

if(myapplication.mSpark != null){

Log.i(TAG, "mSpark is created ");

Toast.makeText(EnterActivity.this, "mSpark is created", Toast.LENGTH_SHORT)
.show();

}else{

Log.i(TAG, "mSpark is null ");

Toast.makeText(EnterActivity.this, "mSpark is null", Toast.LENGTH_SHORT).show();

}

Log.i(TAG, "onClick: ->end");
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

public class JWTActivity extends AppCompatActivity {

private static final String TAG = "JWTActivity";

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_jwt);

Log.i(TAG, "onCreate: ->start");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.cisco.sparksdk.sparkkitchensink;

import android.util.Log;

import com.ciscospark.Spark;
import com.ciscospark.core.SparkApplication;
import com.ciscospark.phone.Phone;

/**
* Created by lm on 7/21/17.
*/

public class KitchenSinkApplication extends SparkApplication {

public Spark mSpark;
private static final String TAG = "KitchenSinkApplication";

@Override
public void onCreate() {

Log.i(TAG, "onCreate: ->start");

super.onCreate();

mSpark = new Spark();

Log.i(TAG, "onCreate: ->end");
}







}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

public class RegistryActivity extends AppCompatActivity {

private static final String TAG = "RegistryActivity";

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_registry);

Log.i(TAG, "onCreate: ->start");
}
}
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_dashboard_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_home_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_notifications_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z"/>
</vector>
19 changes: 19 additions & 0 deletions app/src/main/res/menu/navigation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/navigation_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="@string/title_home"/>

<item
android:id="@+id/navigation_dashboard"
android:icon="@drawable/ic_dashboard_black_24dp"
android:title="@string/title_dashboard"/>

<item
android:id="@+id/navigation_notifications"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/title_notifications"/>

</menu>
5 changes: 5 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
Loading

0 comments on commit 4fd7ce9

Please sign in to comment.