Skip to content

Commit 50d3b74

Browse files
committed
init
0 parents  commit 50d3b74

File tree

14 files changed

+568
-0
lines changed

14 files changed

+568
-0
lines changed

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.DS_Store
2+
tmp
3+
bin
4+
build
5+
6+
*/*/modules
7+
*/*/modules*
8+
.apt_generated
9+
build.properties
10+
.svn
11+
*.pyc
12+
*~.nib/
13+
*.pbxuser
14+
*.perspective
15+
*.perspectivev3
16+
xcuserdata
17+
*.xcuserstate
18+
*.xcuserdata*
19+
20+
.idea/
21+
libs/
22+
23+
android/clean
24+
android/ant_clean
25+
android/.classpath
26+
android/.gradle
27+
android/gradle/
28+
android/.settings
29+
android/dist/
30+
android/launch-*
31+
android/example/
32+
nbproject
33+
/metadata.json
34+
/ios/metadata.json
35+
36+
android/java-sources.txt
37+
android/local.properties
38+
android/build.properties
39+
android/.project
40+
android/platform/README.md
41+
/ios/dist
42+
/android/.gradle

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2020 Michael Gangolf
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Vonage module for Appcelerator Titanium
2+
3+
## Requirements
4+
5+
* Titanium SDK 9+
6+
* Vonage <small>(formerly OpenTok)</small> account
7+
8+
## API
9+
10+
### Properties
11+
* apiKey
12+
* sessionId
13+
* token
14+
15+
### Methods
16+
* connect
17+
* disconnect
18+
19+
### Events
20+
* ready
21+
* disconnected
22+
* streamReceived
23+
* streamDropped
24+
* sessionError
25+
* streamCreated
26+
* streamDestroyed
27+
* error
28+
29+
## Example
30+
31+
```xml
32+
<modules>
33+
<module platform="android">ti.vonage</module>
34+
</modules>
35+
```
36+
37+
index.xml
38+
```xml
39+
<Alloy>
40+
<Window onOpen="onOpen">
41+
<VonageView module="ti.vonage" id="vonage"/>
42+
<TextField hintText="api key" id="tf_api" value=""/>
43+
<TextField hintText="session id" id="tf_session" value=""/>
44+
<TextField hintText="token" id="tf_token" value=""/>
45+
<Button id="btn" title="connect" onClick="onClickConnect"/>
46+
<Button id="btn" title="disconnect" onClick="onClickDisconnect"/>
47+
</Window>
48+
</Alloy>
49+
50+
```
51+
52+
index.js
53+
```javascript
54+
$.index.open();
55+
56+
function onOpen(e) {
57+
$.vonage.initialize();
58+
}
59+
60+
$.vonage.addEventListener("ready", function() {
61+
console.log("ready");
62+
})
63+
64+
function onClickConnect(e) {
65+
$.vonage.apiKey = $.tf_api.value;
66+
$.vonage.sessionId = $.tf_session.value;
67+
$.vonage.token = $.tf_token.value;
68+
69+
$.vonage.connect();
70+
}
71+
72+
function onClickDisconnect(e) {
73+
$.vonage.disconnect();
74+
}
75+
```
76+
77+
index.tss
78+
```
79+
".container" : {
80+
backgroundColor: "white"
81+
}
82+
"TextField" : {
83+
borderWidth: 1,
84+
borderColor: "#000",
85+
left: 10,
86+
right: 10,
87+
backgroundColor: "transparent",
88+
color: "#000"
89+
}
90+
"#vonage" : {
91+
height: 400,
92+
width: Ti.UI.FILL,
93+
top: 0
94+
}
95+
```
96+
97+
build.gradle
98+
```
99+
repositories {
100+
google()
101+
jcenter()
102+
maven { url 'https://tokbox.bintray.com/maven' }
103+
}
104+
105+
dependencies {
106+
implementation 'com.opentok.android:opentok-android-sdk:2.16.6'
107+
implementation 'pub.devrel:easypermissions:3.0.0'
108+
}
109+
```

android/.clang-format

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
Language: Java
3+
AccessModifierOffset: -4
4+
AllowShortBlocksOnASingleLine: false
5+
AllowShortFunctionsOnASingleLine: None
6+
AllowShortIfStatementsOnASingleLine: false
7+
AllowShortLoopsOnASingleLine: false
8+
# class, constructor, method should be next line
9+
BreakBeforeBraces: Linux
10+
# Keep '=' at end of line when wrapping, but move things like '&&', '||' to beginning of newline
11+
BreakBeforeBinaryOperators: NonAssignment
12+
# FIXME: break for brace after synchronized block, anonymous class declarations
13+
BreakAfterJavaFieldAnnotations: true
14+
ColumnLimit: 120
15+
IndentCaseLabels: true
16+
IndentWidth: 4
17+
MaxEmptyLinesToKeep: 1
18+
SpaceBeforeAssignmentOperators: true
19+
SpaceBeforeParens: ControlStatements
20+
SpacesInParentheses: false
21+
TabWidth: 4
22+
UseTab: ForContinuationAndIndentation
23+
SpaceAfterCStyleCast: true
24+
# Spaces inside {} for array literals, i.e. "new Object[] { args }"
25+
Cpp11BracedListStyle: false
26+
ReflowComments: false

android/Resources/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
Files in this directory are copied to the APK's `assets/Resources` when doing an app build.
3+
This is the same directory a Titanium app's `Resources` files are copied to. The app's
4+
`Resources` files take priority and will be copied over module `Resources` files having
5+
the same name.

android/android.iml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.id=":" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="android-gradle" name="Android-Gradle">
5+
<configuration>
6+
<option name="GRADLE_PROJECT_PATH" value=":" />
7+
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" />
8+
<option name="LAST_KNOWN_AGP_VERSION" />
9+
</configuration>
10+
</facet>
11+
</component>
12+
<component name="NewModuleRootManager" inherit-compiler-output="true">
13+
<exclude-output />
14+
<content url="file://$MODULE_DIR$" />
15+
<orderEntry type="inheritedJdk" />
16+
<orderEntry type="sourceFolder" forTests="false" />
17+
</component>
18+
</module>

android/build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
repositories {
3+
google()
4+
jcenter()
5+
maven { url 'https://tokbox.bintray.com/maven' }
6+
}
7+
8+
dependencies {
9+
implementation 'com.opentok.android:opentok-android-sdk:2.16.6'
10+
implementation 'pub.devrel:easypermissions:3.0.0'
11+
}

android/lib/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
You can place your `*.jar` and `*.aar` library dependencies in this directory.
3+
4+
Note that its best to reference dependencies in the module's "build.gradle" file
5+
instead if you can. This avoids class name collision in case another module uses
6+
the same library.

android/local.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## This file must *NOT* be checked into Version Control Systems,
2+
# as it contains information specific to your local configuration.
3+
#
4+
# Location of the SDK. This is only used by Gradle.
5+
# For customization when using a Version Control System, please read the
6+
# header note.
7+
#Thu Apr 30 23:39:10 CEST 2020
8+
sdk.dir=/home/miga/tools/Android/sdk

android/manifest

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# this is your module manifest and used by Titanium
3+
# during compilation, packaging, distribution, etc.
4+
#
5+
version: 1.0.0
6+
apiversion: 4
7+
architectures: arm64-v8a armeabi-v7a x86
8+
description: Vonage (formerly OpenTok) Titanium module
9+
author: Michael Gangolf
10+
license: Specify your license
11+
copyright: Copyright (c) 2020 by Michael Gangolf
12+
13+
# these should not be edited
14+
name: ti.vonage
15+
moduleid: ti.vonage
16+
guid: 6fa5bf8b-7ee1-4f72-bf06-03b8e4d34e1d
17+
platform: android
18+
minsdk: 9.0.1.GA

0 commit comments

Comments
 (0)