Skip to content

Commit 25c9770

Browse files
author
geremy
committed
adding new phonegap demo
1 parent 7fe289a commit 25c9770

82 files changed

Lines changed: 12752 additions & 230 deletions

Some content is hidden

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

modern/pubnub.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var nextorigin = (function() {
4040
/**
4141
* Build Url
4242
* =======
43-
*
43+
*
4444
*/
4545
function build_url(url_components, url_params) {
4646
var url = url_components.join(URLBIT);
@@ -53,7 +53,7 @@ function build_url(url_components, url_params) {
5353
}
5454
url += params.join(PARAMSBIT);
5555
}
56-
return url;
56+
return url;
5757
}
5858

5959
/**
@@ -238,7 +238,7 @@ function PN_API(setup) {
238238

239239
if (jsonp != '0') data['callback'] = jsonp;
240240

241-
241+
242242
xdr({
243243
blocking : blocking || SSL,
244244
timeout : 2000,
@@ -258,7 +258,7 @@ function PN_API(setup) {
258258
});
259259
*/
260260
'history' : function( args, callback ) {
261-
var callback = args['callback'] || callback
261+
var callback = args['callback'] || callback
262262
, count = args['count'] || args['limit'] || 100
263263
, reverse = args['reverse'] || "false"
264264
, err = args['error'] || function(){}
@@ -569,7 +569,7 @@ function PN_API(setup) {
569569
SUB_RESTORE &&
570570
db['get'](SUBSCRIBE_KEY) || messages[1];
571571

572-
572+
573573
if (backfill) {
574574
Timetoken = 10000;
575575
backfill = 0;
@@ -622,7 +622,7 @@ function PN_API(setup) {
622622
},
623623

624624
'here_now' : function( args, callback ) {
625-
var callback = args['callback'] || callback
625+
var callback = args['callback'] || callback
626626
, err = args['error'] || function(){}
627627
, channel = args['channel']
628628
, jsonp = jsonp_cb()
@@ -632,7 +632,7 @@ function PN_API(setup) {
632632
if (!channel) return error('Missing Channel');
633633
if (!callback) return error('Missing Callback');
634634
if (!SUBSCRIBE_KEY) return error('Missing Subscribe Key');
635-
635+
636636
if (jsonp != '0') {
637637
data = {};
638638
data['callback'] = jsonp;
@@ -645,7 +645,7 @@ function PN_API(setup) {
645645
fail : err,
646646
url : [
647647
STD_ORIGIN, 'v2', 'presence',
648-
'sub_key', SUBSCRIBE_KEY,
648+
'sub_key', SUBSCRIBE_KEY,
649649
'channel', encode(channel)
650650
]
651651
});
@@ -725,7 +725,7 @@ THE SOFTWARE.
725725
* UTIL LOCALS
726726
*/
727727
var NOW = 1
728-
, PNSDK = 'PubNub-JS-' + 'Modern' + '/' + '3.4.4'
728+
, PNSDK = 'PubNub-JS-' + 'Modern' + '/' + '3.4.4'
729729
, XHRTME = 310000;
730730

731731

@@ -802,7 +802,7 @@ function xdr( setup ) {
802802

803803
// Send
804804
try {
805-
xhr = typeof XDomainRequest !== 'undefined' &&
805+
xhr = typeof XDomainRequest !== 'undefined' &&
806806
new XDomainRequest() ||
807807
new XMLHttpRequest();
808808

@@ -967,21 +967,21 @@ function PN(setup) {
967967
SELF['bind'] = bind;
968968
SELF['css'] = css;
969969
SELF['create'] = create;
970-
970+
971971

972972
// Add Leave Functions
973973
bind( 'beforeunload', window, function() {
974974
SELF['each-channel'](function(ch){ SELF['LEAVE']( ch.name, 1 ) });
975975
return true;
976976
} );
977977

978-
// Return without Testing
978+
// Return without Testing
979979
if (setup['notest']) return SELF;
980980

981981
bind( 'offline', window, SELF['_reset_offline'] );
982982
bind( 'offline', document, SELF['_reset_offline'] );
983983

984-
SELF['ready']();
984+
SELF['ready']();
985985
return SELF;
986986
}
987987

@@ -1025,7 +1025,7 @@ var WS = PUBNUB['ws'] = function( url, protocols ) {
10251025
self['CLOSE_ABNORMAL'] = 1006; // Abnormal Disconnect.
10261026

10271027
// Events Default
1028-
self['onclose'] = self['onerror'] =
1028+
self['onclose'] = self['onerror'] =
10291029
self['onmessage'] = self['onopen'] =
10301030
self['onsend'] = function(){};
10311031

modern/pubnub.min.js

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

modern/unassembled/platform.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ THE SOFTWARE.
3333
* UTIL LOCALS
3434
*/
3535
var NOW = 1
36-
, PNSDK = 'PubNub-JS-' + PLATFORM + '/' + VERSION
36+
, PNSDK = 'PubNub-JS-' + PLATFORM + '/' + VERSION
3737
, XHRTME = 310000;
3838

3939

@@ -110,7 +110,7 @@ function xdr( setup ) {
110110

111111
// Send
112112
try {
113-
xhr = typeof XDomainRequest !== 'undefined' &&
113+
xhr = typeof XDomainRequest !== 'undefined' &&
114114
new XDomainRequest() ||
115115
new XMLHttpRequest();
116116

@@ -275,21 +275,21 @@ function PN(setup) {
275275
SELF['bind'] = bind;
276276
SELF['css'] = css;
277277
SELF['create'] = create;
278-
278+
279279

280280
// Add Leave Functions
281281
bind( 'beforeunload', window, function() {
282282
SELF['each-channel'](function(ch){ SELF['LEAVE']( ch.name, 1 ) });
283283
return true;
284284
} );
285285

286-
// Return without Testing
286+
// Return without Testing
287287
if (setup['notest']) return SELF;
288288

289289
bind( 'offline', window, SELF['_reset_offline'] );
290290
bind( 'offline', document, SELF['_reset_offline'] );
291291

292-
SELF['ready']();
292+
SELF['ready']();
293293
return SELF;
294294
}
295295

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
20+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
21+
package="org.apache.cordova.example" android:versionName="1.0" android:versionCode="1"
22+
android:hardwareAccelerated="true">
23+
<uses-sdk android:minSdkVersion="14"/>
24+
<supports-screens
25+
android:largeScreens="true"
26+
android:normalScreens="true"
27+
android:smallScreens="true"
28+
android:xlargeScreens="true"
29+
android:resizeable="true"
30+
android:anyDensity="true"
31+
/>
32+
33+
<uses-permission android:name="android.permission.CAMERA"/>
34+
<uses-permission android:name="android.permission.VIBRATE"/>
35+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
36+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
37+
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
38+
<uses-permission android:name="android.permission.INTERNET"/>
39+
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
40+
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
41+
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
42+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
43+
<uses-permission android:name="android.permission.READ_CONTACTS"/>
44+
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
45+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
46+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
47+
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
48+
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
49+
50+
51+
<application android:icon="@drawable/icon" android:label="@string/app_name"
52+
android:hardwareAccelerated="true"
53+
android:debuggable="true">
54+
<activity android:name="cordovaExample" android:label="@string/app_name"
55+
android:theme="@android:style/Theme.Black.NoTitleBar"
56+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
57+
<intent-filter>
58+
<action android:name="android.intent.action.MAIN"/>
59+
<category android:name="android.intent.category.LAUNCHER"/>
60+
</intent-filter>
61+
</activity>
62+
</application>
63+
64+
</manifest>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="android" name="Android">
5+
<configuration />
6+
</facet>
7+
</component>
8+
<component name="NewModuleRootManager" inherit-compiler-output="true">
9+
<exclude-output />
10+
<content url="file://$MODULE_DIR$">
11+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
12+
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
13+
</content>
14+
<orderEntry type="jdk" jdkName="Android 4.2.2 Google APIs" jdkType="Android SDK" />
15+
<orderEntry type="sourceFolder" forTests="false" />
16+
<orderEntry type="library" name="cordova-2.6.0" level="project" />
17+
</component>
18+
</module>
19+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used to override default values used by the Ant build system.
2+
#
3+
# This file must be checked into Version Control Systems, as it is
4+
# integral to the build system of your project.
5+
6+
# This file is only used by the Ant script.
7+
8+
# You can use this to override default values such as
9+
# 'source.dir' for the location of your java source folder and
10+
# 'out.dir' for the location of your output folder.
11+
12+
# You can also use it define how the release builds are signed by declaring
13+
# the following properties:
14+
# 'key.store' for the location of your keystore and
15+
# 'key.alias' for the name of the key to use.
16+
# The password will be asked during the build when you use the 'release' target.
17+

0 commit comments

Comments
 (0)