Skip to content

Commit 18d8900

Browse files
marinaserranomontesCesar Guirao
authored and
Cesar Guirao
committed
Adding OpenTok Android SDK samples
1 parent b5291b7 commit 18d8900

File tree

94 files changed

+5426
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+5426
-0
lines changed

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#built application files
2+
*.apk
3+
*.ap_
4+
5+
# files for the dex VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# generated files
12+
bin/
13+
gen/
14+
15+
# Local configuration file (sdk path, etc)
16+
local.properties
17+
18+
# Eclipse project files
19+
.classpath
20+
.project
21+
22+
# Proguard folder generated by Eclipse
23+
proguard/
24+
25+
# Intellij project files
26+
*.iml
27+
*.ipr
28+
*.iws
29+
.idea/
30+
31+
.DS_Store

OpenTokSamples/AndroidManifest.xml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.opentok.android.demo.opentokhelloworld"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="16"
9+
android:targetSdkVersion="17" />
10+
11+
<uses-permission android:name="android.permission.CAMERA" />
12+
<uses-permission android:name="android.permission.INTERNET" />
13+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
14+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
15+
16+
<uses-feature android:name="android.hardware.camera" />
17+
<uses-feature android:name="android.hardware.camera.autofocus" />
18+
19+
<application
20+
android:allowBackup="true"
21+
android:icon="@drawable/ic_launcher"
22+
android:label="@string/app_name"
23+
android:theme="@style/AppTheme" >
24+
<activity
25+
android:name="com.opentok.android.demo.opentoksamples.OpenTokSamples"
26+
android:configChanges="orientation|keyboardHidden|screenSize"
27+
android:screenOrientation="fullSensor"
28+
android:label="@string/app_name" >
29+
<intent-filter>
30+
<action android:name="android.intent.action.MAIN" />
31+
<category android:name="android.intent.category.LAUNCHER" />
32+
</intent-filter>
33+
</activity>
34+
<activity
35+
android:name="com.opentok.android.demo.opentoksamples.HelloWorldActivity"
36+
android:configChanges="orientation|keyboardHidden|screenSize">
37+
<intent-filter>
38+
<action android:name="com.opentok.android.demo.opentokhelloworld.OpenTokHelloWorld" />
39+
<category android:name="android.intent.category.DEFAULT" />
40+
</intent-filter>
41+
</activity>
42+
<activity
43+
android:name="com.opentok.android.demo.opentoksamples.UIActivity"
44+
android:configChanges="orientation|keyboardHidden|screenSize">
45+
<intent-filter>
46+
<action android:name="com.opentok.android.demo.opentokhelloworld.OpenTokHelloWorldUI" />
47+
<category android:name="android.intent.category.DEFAULT" />
48+
</intent-filter>
49+
</activity>
50+
<activity
51+
android:name="com.opentok.android.demo.opentoksamples.VideoCapturerActivity"
52+
android:configChanges="orientation|keyboardHidden|screenSize">
53+
<intent-filter>
54+
<action android:name="com.opentok.android.demo.opentokhelloworld.OpenTokCapturer" />
55+
<category android:name="android.intent.category.DEFAULT" />
56+
</intent-filter>
57+
</activity>
58+
<activity
59+
android:name="com.opentok.android.demo.opentoksamples.VideoRendererActivity"
60+
android:configChanges="orientation|keyboardHidden|screenSize">
61+
<intent-filter>
62+
<action android:name="com.opentok.android.demo.opentokhelloworld.OpenTokRenderer" />
63+
<category android:name="android.intent.category.DEFAULT" />
64+
</intent-filter>
65+
</activity>
66+
<activity
67+
android:name="com.opentok.android.demo.opentoksamples.MultipartyActivity"
68+
android:configChanges="orientation|keyboardHidden|screenSize">
69+
<intent-filter>
70+
<action android:name="com.opentok.android.demo.opentokhelloworld.OpenTokSubclassing" />
71+
<category android:name="android.intent.category.DEFAULT" />
72+
</intent-filter>
73+
</activity>
74+
</application>
75+
76+
</manifest>

OpenTokSamples/ic_launcher-web.png

69.5 KB
607 KB
Binary file not shown.

OpenTokSamples/proguard-project.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}

OpenTokSamples/project.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-16
1.28 KB
10.8 KB
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item android:state_pressed="true"
5+
android:drawable="@color/blue" />
6+
7+
<item android:state_focused="true"
8+
android:drawable="@color/blue" />
9+
10+
<item android:drawable="@color/trans" />
11+
12+
</selector>
1.51 KB
1.81 KB
1.23 KB
1.76 KB
3.71 KB
1.11 KB
1.74 KB
1.88 KB
6.3 KB
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item android:state_pressed="true"
5+
android:drawable="@color/blue" />
6+
7+
<item android:state_focused="true"
8+
android:drawable="@color/blue" />
9+
10+
<item android:drawable="@color/trans" />
11+
12+
</selector>
1.06 KB
26.2 KB
1.27 KB
1.44 KB
1.42 KB
3.44 KB
679 Bytes
1.24 KB
1.45 KB
1.88 KB
16.2 KB
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item android:state_pressed="true"
5+
android:drawable="@color/blue" />
6+
7+
<item android:state_focused="true"
8+
android:drawable="@color/blue" />
9+
10+
<item android:drawable="@color/trans" />
11+
12+
</selector>
2.11 KB
1.66 KB
1.75 KB
2.07 KB
4.48 KB
1.51 KB
27.6 KB
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item android:state_pressed="true"
5+
android:drawable="@color/blue" />
6+
7+
<item android:state_focused="true"
8+
android:drawable="@color/blue" />
9+
10+
<item android:drawable="@color/trans" />
11+
12+
</selector>
2.02 KB
1.92 KB
2.72 KB
6.61 KB
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:id="@+id/layoutPubFragment"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:background="@color/grey"
8+
tools:context=".UIActivity" >
9+
10+
<RelativeLayout
11+
android:id="@+id/publisherWidget"
12+
android:layout_width="48dp"
13+
android:layout_height="fill_parent"
14+
android:layout_alignParentRight="true"
15+
android:layout_centerVertical="true">
16+
17+
<ImageButton
18+
android:id="@+id/mutePublisher"
19+
android:layout_width="fill_parent"
20+
android:layout_height="90dp"
21+
android:layout_alignParentTop="true"
22+
android:layout_centerHorizontal="true"
23+
android:background="@drawable/button_background"
24+
android:src="@drawable/mute_pub" />
25+
26+
<ImageButton
27+
android:id="@+id/swapCamera"
28+
android:layout_width="fill_parent"
29+
android:layout_height="90dp"
30+
android:layout_alignParentBottom="true"
31+
android:layout_centerHorizontal="true"
32+
android:background="@drawable/button_background"
33+
android:onClick="onCameraSwap"
34+
android:src="@drawable/camera" />
35+
36+
<Button
37+
android:id="@+id/endCall"
38+
android:layout_width="fill_parent"
39+
android:layout_height="wrap_content"
40+
android:layout_above="@+id/swapCamera"
41+
android:layout_below="@+id/mutePublisher"
42+
android:background="@drawable/button_background"
43+
android:lines="1"
44+
android:onClick="onEndCall"
45+
android:paddingLeft="1dp"
46+
android:paddingRight="1dp"
47+
android:text="@string/endCall2"
48+
android:textColor="@color/white"
49+
android:textSize="18sp"
50+
android:typeface="normal" />
51+
52+
<View
53+
android:layout_width="match_parent"
54+
android:layout_height="1dp"
55+
android:layout_below="@+id/mutePublisher"
56+
android:background="@color/trans_white" />
57+
58+
<View
59+
android:layout_width="match_parent"
60+
android:layout_height="1dp"
61+
android:layout_above="@+id/swapCamera"
62+
android:background="@color/trans_white" />
63+
</RelativeLayout>
64+
65+
</RelativeLayout>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:id="@+id/layoutPubFragment"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:background="@null"
8+
tools:context=".UIActivity" >
9+
10+
<RelativeLayout
11+
android:id="@+id/publisherStatusWidget"
12+
android:layout_width="wrap_content"
13+
android:layout_height="48dp"
14+
android:layout_alignParentBottom="true"
15+
android:layout_alignParentLeft="true"
16+
android:layout_centerHorizontal="true" >
17+
18+
<ImageButton
19+
android:id="@+id/archiving"
20+
android:layout_width="48dp"
21+
android:layout_height="fill_parent"
22+
android:layout_alignParentRight="true"
23+
android:layout_alignParentTop="true"
24+
android:background="@null"
25+
android:src="@drawable/archiving_off" />
26+
27+
<TextView
28+
android:id="@+id/statusLabel"
29+
android:layout_width="wrap_content"
30+
android:layout_height="match_parent"
31+
android:layout_toLeftOf="@+id/archiving"
32+
android:gravity="center_vertical|right"
33+
android:paddingLeft="10dp"
34+
android:paddingRight="10dp"
35+
android:text="@string/archivingOff"
36+
android:textColor="@color/white" />
37+
38+
<View
39+
android:layout_width="1dp"
40+
android:layout_height="match_parent"
41+
android:layout_toLeftOf="@+id/archiving"
42+
android:background="@color/trans_white" />
43+
44+
<View
45+
android:layout_width="1dp"
46+
android:layout_height="match_parent"
47+
android:layout_toLeftOf="@+id/connectionStatus"
48+
android:background="@color/trans_white" />
49+
50+
<View
51+
android:id="@+id/line1"
52+
android:layout_width="match_parent"
53+
android:layout_height="1dp"
54+
android:layout_alignParentBottom="true"
55+
android:background="@color/trans_white" />
56+
57+
<View
58+
android:id="@+id/line1"
59+
android:layout_width="match_parent"
60+
android:layout_height="1dp"
61+
android:layout_alignParentTop="true"
62+
android:background="@color/trans_white" />
63+
</RelativeLayout>
64+
65+
</RelativeLayout>

0 commit comments

Comments
 (0)