Skip to content

Commit 4e9cc00

Browse files
author
atsakiridis
committed
Fixed #246: Fix HelloWorld sample application to work with the updated SDK
1 parent de9477f commit 4e9cc00

File tree

11 files changed

+108
-43
lines changed

11 files changed

+108
-43
lines changed

Examples/restcomm-helloworld/.idea/gradle.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/restcomm-helloworld/.idea/misc.xml

Lines changed: 24 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/restcomm-helloworld/.idea/modules.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/restcomm-helloworld/.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/restcomm-helloworld/app/app.iml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
1313
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
1414
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
15-
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
1615
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
1716
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
18-
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
17+
<afterSyncTasks>
18+
<task>generateDebugAndroidTestSources</task>
19+
<task>generateDebugSources</task>
20+
</afterSyncTasks>
1921
<option name="ALLOW_USER_CONFIGURATION" value="false" />
2022
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
2123
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
@@ -24,7 +26,7 @@
2426
</configuration>
2527
</facet>
2628
</component>
27-
<component name="NewModuleRootManager" inherit-compiler-output="false">
29+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
2830
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
2931
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
3032
<exclude-output />
@@ -34,13 +36,13 @@
3436
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
3537
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
3638
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
37-
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
39+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
3840
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
3941
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
4042
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
4143
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
4244
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
43-
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/debug" type="java-test-resource" />
45+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
4446
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
4547
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
4648
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
@@ -69,8 +71,9 @@
6971
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
7072
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
7173
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
72-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" />
73-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" />
74+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/jars" />
75+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/22.2.1/jars" />
76+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars" />
7477
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
7578
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
7679
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
@@ -84,13 +87,14 @@
8487
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
8588
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
8689
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
90+
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
8791
</content>
8892
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
8993
<orderEntry type="sourceFolder" forTests="false" />
90-
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
91-
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
92-
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
93-
<orderEntry type="module" module-name="sipua" exported="" />
94+
<orderEntry type="library" exported="" name="design-22.2.1" level="project" />
95+
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
96+
<orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" />
97+
<orderEntry type="library" exported="" name="appcompat-v7-22.2.1" level="project" />
9498
<orderEntry type="module" module-name="restcomm.android.client.sdk" exported="" />
9599
</component>
96100
</module>

Examples/restcomm-helloworld/app/build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion 16
1010
targetSdkVersion 22
1111
versionCode 1
12-
versionName "1.0.0-BETA2#1"
12+
versionName "1.0.0-BETA3#1"
1313
}
1414
buildTypes {
1515
release {
@@ -19,9 +19,20 @@ android {
1919
}
2020
}
2121

22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
testCompile 'junit:junit:4.12'
25+
compile project(':restcomm.android.client.sdk')
26+
compile 'com.android.support:appcompat-v7:22.2.1'
27+
compile 'com.android.support:design:22.2.1'
28+
compile 'com.android.support:support-v4:22.2.1'
29+
}
30+
31+
/*
2232
dependencies {
2333
compile fileTree(dir: 'libs', include: ['*.jar'])
2434
compile 'com.android.support:appcompat-v7:22.2.0'
2535
compile project(':restcomm.android.client.sdk')
2636
compile project(':sipua')
2737
}
38+
*/

Examples/restcomm-helloworld/app/src/main/java/com/telestax/restcomm_helloworld/MainActivity.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@ public void onError(Exception exception) {
9797

9898
params = new HashMap<String, Object>();
9999
// CHANGEME: update the IP address to your Restcomm instance
100-
params.put("pref_proxy_ip", "23.23.228.238");
101-
params.put("pref_proxy_port", "5080");
102-
params.put("pref_sip_user", "bob");
100+
params.put("pref_proxy_domain", "sip:cloud.restcomm.com:5060");
101+
params.put("pref_sip_user", "antonis");
103102
params.put("pref_sip_password", "1234");
104103
device = RCClient.createDevice(params, this);
105104
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
@@ -171,7 +170,7 @@ public void onClick(View view) {
171170
HashMap<String, Object> connectParams = new HashMap<String, Object>();
172171
// CHANGEME: update the IP address to your Restcomm instance. Also, you can update the number
173172
// from '1235' to any Restcomm application you wish to reach
174-
connectParams.put("username", "sip:1235@23.23.228.238:5080");
173+
connectParams.put("username", "sip:1235@cloud.restcomm.com");
175174
connectParams.put("video-enabled", true);
176175

177176
// if you want to add custom SIP headers, please uncomment this
@@ -244,6 +243,11 @@ public void run() {
244243
});
245244
}
246245

246+
public void onConnectivityUpdate(RCDevice device, RCConnectivityStatus connectivityStatus)
247+
{
248+
249+
}
250+
247251
// RCConnection Listeners
248252
public void onConnecting(RCConnection connection)
249253
{

Examples/restcomm-helloworld/build.gradle

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:1.2.3'
8+
classpath 'com.android.tools.build:gradle:1.3.0'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
@@ -17,3 +17,34 @@ allprojects {
1717
jcenter()
1818
}
1919
}
20+
21+
task clean(type: Delete) {
22+
delete rootProject.buildDir
23+
}
24+
25+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
26+
/*
27+
buildscript {
28+
repositories {
29+
jcenter()
30+
}
31+
dependencies {
32+
classpath 'com.android.tools.build:gradle:1.3.0'
33+
34+
// NOTE: Do not place your application dependencies here; they belong
35+
// in the individual module build.gradle files
36+
}
37+
}
38+
allprojects {
39+
repositories {
40+
jcenter()
41+
}
42+
}
43+
44+
android {
45+
compileSdkVersion 22
46+
buildToolsVersion '23.0.1'
47+
}
48+
dependencies {
49+
}
50+
*/

Examples/restcomm-helloworld/restcomm-helloworld.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</configuration>
99
</facet>
1010
</component>
11-
<component name="NewModuleRootManager" inherit-compiler-output="true">
11+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
1212
<exclude-output />
1313
<content url="file://$MODULE_DIR$">
1414
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
include ':app', 'sipua'
2-
include ':sipua'
3-
project(':sipua').projectDir=new File('../../sipua')
1+
include ':app'
42
include ':restcomm.android.client.sdk'
53
project(':restcomm.android.client.sdk').projectDir=new File('../../restcomm.android.client.sdk')

0 commit comments

Comments
 (0)