Skip to content

Commit

Permalink
use maven repository and remove dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xionxiao committed Sep 1, 2017
1 parent f050a68 commit 68d0f92
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 213 deletions.
97 changes: 6 additions & 91 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

// Enabling multidex support.
multiDexEnabled true
}

Expand All @@ -33,21 +32,17 @@ android {
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"

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


repositories {
flatDir {
dirs 'libs'
Expand All @@ -59,94 +54,14 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.webex:wme4android-release:7.7.0@aar'
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(':sdk-debug')
}


dependencies {
compile 'com.android.support.constraint:constraint-layout:+'
}
dependencies {
compile 'com.android.support.constraint:constraint-layout:+'
}
dependencies {
compile 'com.android.support:support-v4:25.+'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services-plus:+'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.ciscospark:android-sdk:0.0.1'
}
dependencies {
compile 'com.android.support:support-v4:25.+'
}
dependencies {
compile 'com.android.support:support-v4:25.+'
}
dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

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.dagger
provided libs.daggercompiler

compile libs.retrofit
compile libs.retrofit_gsonconverter
compile libs.retrofit_rxjava

compile libs.okhttp
compile libs.okhttp_logging

compile libs.eventbus

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

compile libs.ln

compile libs.wmeaar

compile libs.rxjava
compile libs.rxandroid

compile libs.will

compile libs.sqlcipher

compile libs.fasterxml_annotations
compile libs.fasterxml_databind
compile libs.fasterxml_core

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.9'
compile 'com.cisco.wx2:diagnostic-events-gson:1.0.86'

compile 'com.segment.analytics.android:analytics:4.3.0-RC1'
compile 'com.cisco.spark.android:common-lib:2.0.3886@aar'


}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
android:name=".CallActivity"
android:configChanges="orientation|screenSize"></activity>
<activity
android:name=".dialActivity"
android:name=".DialActivity"
android:configChanges="orientation|screenSize"></activity>
<provider
android:name="com.cisco.spark.android.sync.ConversationContentProvider"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
Expand All @@ -17,7 +17,6 @@
import com.ciscospark.phone.CallOption;
import com.ciscospark.phone.DialObserver;
import com.ciscospark.phone.IncomingCallObserver;
import com.ciscospark.phone.Phone;
import com.webex.wseclient.WseSurfaceView;

import java.util.List;
Expand Down Expand Up @@ -54,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
localView = (WseSurfaceView) findViewById(R.id.localView);
remoteView = (WseSurfaceView) findViewById(R.id.remoteView);

myApplication = (KitchenSinkApplication)getApplication();
myApplication = (KitchenSinkApplication) getApplication();

mActiveCallObserver = new MyCallObserver(this);

Expand Down Expand Up @@ -121,7 +120,7 @@ public void onIncomingCall(Call call) {

public void reject() {
if (mWaitingFragment != null) {
((InComingCallFragment)mWaitingFragment).setButtonVisibility(View.INVISIBLE);
((InComingCallFragment) mWaitingFragment).setButtonVisibility(View.INVISIBLE);
}
if (mActiveCall != null) {
mActiveCall.reject();
Expand All @@ -139,15 +138,15 @@ public void answerCall() {
}
}

private void call(){
private void call() {
Log.i(TAG, "call: ->start");

this.dialCallee = myApplication.callee;
this.isAudioCall = myApplication.isAudioCall;

if(this.isAudioCall){
if (this.isAudioCall) {
this.audioCall(this.dialCallee);
}else{
} else {
this.videoCall(this.dialCallee);

}
Expand All @@ -156,7 +155,7 @@ private void call(){

}

private void HandleHangupButton(){
private void HandleHangupButton() {
Log.i(TAG, "HandleHangupButton: ->start");
hangupButton = (Button) findViewById(R.id.buttonHangup);
hangupButton.setOnClickListener(new View.OnClickListener() {
Expand Down Expand Up @@ -190,7 +189,7 @@ public void onFailed(SparkError error) {
Log.i(TAG, "DialObserver-> onFailed");
Log.i(TAG, "error code is " + error.toString());
Toast.makeText(CallActivity.this, "DialObserver-> onFailed", Toast.LENGTH_SHORT).show();
CallActivity.this.callStatus.setText("Dialing failed for "+ error.toString());
CallActivity.this.callStatus.setText("Dialing failed for " + error.toString());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package com.cisco.sparksdk.sparkkitchensink;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

public class dialActivity extends AppCompatActivity {
import static com.ciscospark.Spark.LogLevel.RELEASE;

public class DialActivity extends AppCompatActivity {

private static final String TAG = "dialActivity";
private static final String TAG = "DialActivity";

ViewPager simpleViewPager;
TabLayout tabLayout;
Expand All @@ -30,20 +31,20 @@ protected void onCreate(Bundle savedInstanceState) {
// Create a new Tab named "First"
TabLayout.Tab firstTab = tabLayout.newTab();
firstTab.setText("History"); // set the Text for the first Tab
firstTab.setIcon(R.drawable.ic_launcher); // set an icon for the
//firstTab.setIcon(R.drawable.ic_launcher); // set an icon for the
// first tab
tabLayout.addTab(firstTab); // add the tab at in the TabLayout

// Create a new Tab named "Second"
TabLayout.Tab secondTab = tabLayout.newTab();
secondTab.setText("People"); // set the Text for the second Tab
secondTab.setIcon(R.drawable.ic_launcher); // set an icon for the second tab
//secondTab.setIcon(R.drawable.ic_launcher); // set an icon for the second tab
tabLayout.addTab(secondTab); // add the tab in the TabLayout

// Create a new Tab named "Third"
TabLayout.Tab thirdTab = tabLayout.newTab();
thirdTab.setText("Dialer"); // set the Text for the first Tab
thirdTab.setIcon(R.drawable.ic_launcher); // set an icon for the first tab
//thirdTab.setIcon(R.drawable.ic_launcher); // set an icon for the first tab
tabLayout.addTab(thirdTab); // add the tab at in the TabLayout

com.cisco.sparksdk.sparkkitchensink.PagerAdapter adapter = new com.cisco.sparksdk
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,26 @@
package com.cisco.sparksdk.sparkkitchensink;

import android.util.Log;

import com.cisco.spark.android.authenticator.OAuth2AccessToken;
import com.ciscospark.Spark;
import com.ciscospark.core.SparkApplication;
import com.ciscospark.phone.Phone;

/**
* Created by lm on 7/21/17.
*/
import static com.ciscospark.Spark.LogLevel.RELEASE;

public class KitchenSinkApplication extends SparkApplication {

public Spark mSpark;
public Phone mPhone;

public OAuth2AccessToken token;

private static final String TAG = "KitchenSinkApplication";

public String callee;
public boolean isAudioCall;

@Override
public void onCreate() {

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

super.onCreate();

mSpark = new Spark();

Log.i(TAG, "onCreate: ->end");
// This may not effect wme for wme may not initialized
// as permission reason when start the app for the first time.
mSpark.setLogLevel(RELEASE);
}







}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void onClick(View v) {
Log.i(TAG, "buttonDial.onClick: ->start");

if(RegistryActivity.this.isRegistered){
Intent intent = new Intent(RegistryActivity.this, dialActivity.class);
Intent intent = new Intent(RegistryActivity.this, DialActivity.class);

RegistryActivity.this.startActivity(intent);

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_dial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.cisco.sparksdk.sparkkitchensink.dialActivity">
tools:context="com.cisco.sparksdk.sparkkitchensink.DialActivity">

<android.support.design.widget.TabLayout
android:id="@+id/simpleTabLayout"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_first.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.cisco.sparksdk.sparkkitchensink.dialActivity">
tools:context="com.cisco.sparksdk.sparkkitchensink.DialActivity">

<TextView
android:layout_width="wrap_content"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_in_coming_call.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<android.support.design.widget.FloatingActionButton
android:id="@+id/reject"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@dimen/room_details_dialog_avatar"
android:layout_height="@android:dimen/app_icon_size"
android:layout_marginBottom="40dp"
android:layout_marginLeft="80dp"
android:clickable="true"
Expand All @@ -22,7 +22,7 @@

<android.support.design.widget.FloatingActionButton
android:id="@+id/answer"
android:layout_width="@dimen/room_details_dialog_avatar"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@android:dimen/app_icon_size"
android:layout_marginBottom="40dp"
android:layout_marginRight="80dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_second.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.cisco.sparksdk.sparkkitchensink.dialActivity">
tools:context="com.cisco.sparksdk.sparkkitchensink.DialActivity">

<TextView
android:layout_width="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_third.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.cisco.sparksdk.sparkkitchensink.dialActivity">
tools:context="com.cisco.sparksdk.sparkkitchensink.DialActivity">


<EditText
Expand Down
Loading

0 comments on commit 68d0f92

Please sign in to comment.