You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d2f87fc
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: android/README.md
+16-21Lines changed: 16 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,30 +16,24 @@ C2DM is hard to implement, and it imposes artificial limits for you to reach you
16
16
C2DM is not recommended as it is a "broadcast" mechanism according to Google. C2DM is Slow, and limited to 1 message at a time.
17
17
Use PubNub Instead!
18
18
19
-
#####Getting started with Pubnub in your app
20
-
To use Pubnub, you need to place Pubnub-Android-3.4.jar and bcprov-jdk15on-1.47.jar in libs directory under the android app
21
-
project directory.
19
+
### Getting started with Pubnub in your app
20
+
To use Pubnub, simply copy the Pubnub-Android-3.4.jar and bcprov-jdk15on-1.47.jar files in to your project's libs directory.
21
+
These files can be found at pubnub/java/android/3.4/Pubnub-Android-3.4.jar and pubnub/java/java/3.4/libs/bcprov-jdk15on-1.47.jar.
22
22
23
-
Pubnub-Android-3.4.jar is available at pubnub/java/android/3.4/Pubnub-Android-3.4.jar
24
-
and bcprov-jdk15on-1.47.jar is available at pubnub/java/java/3.4/libs/bcprov-jdk15on-1.47.jar.
23
+
## Checkout the demo apps for examples on how to use the Android API!
25
24
26
-
#####PubNub Android Sample App
25
+
### PubNub Android Sample App
27
26
28
-
This is a full android sample app with the ability to Subscribe and UnSubscribe from PubNub channels.
29
-
By UnSubscribing from channels, you can save resources and ultimately save billing costs.
27
+
This app demonstrates all PubNub features and functionality. It can be found in 3.4/examples/PubnubExample directory.
30
28
31
-
Checkout the example app for examples on how to use the API!
32
-
It can be found in 3.4/examples/PubnubExample directory.
29
+
### Pubnub Auto-subscribing, Auto-startup App
30
+
This is a sample app which subscribes to channel **"hello_world"** on receiving the **android.intent.action.BOOT_COMPLETED** intent.
31
+
The user is alerted about events like connect, message received etc. via notifications.
33
32
33
+
Code for this app can be found in the 3.4/examples/SubscribeAtBoot directory.
34
34
35
-
##### Pubnub Android Sample App ( Subscribes at Boot )
36
-
This is a sample app which subscribes to channel **"hello_world"** on receiving **android.intent.action.BOOT_COMPLETED** .
37
-
The user is alerted about events like connect, message received etc. by notifications.
35
+
## Building the Pubnub library jar
38
36
39
-
Code for the app can be found in 3.4/examples/SubscribeAtBoot directory.
40
-
41
-
42
-
### Building Pubnub library jar :
43
37
Pubnub library jar can be built by running following commands. ( Jar is already present in repository )
44
38
```
45
39
$ ant clean
@@ -52,9 +46,10 @@ $ ant clean
52
46
$ and debug-build
53
47
```
54
48
55
-
##Durability - Reconnecting / Resuming when a connection is lost or changed
56
-
As the mobile device loses a connection, changes IP, etc, any current in-process subscribe operations can be forced
57
-
to abort, then reconnect given that a change has occured in the network environment. This is done by calling the
49
+
##Connection Durability: Reconnecting & Resuming when a connection is lost or changed
50
+
51
+
As a mobile device may lose its connection under many different circumstances (IP change, roaming, etc), any current in-process subscribe operations can be forced
52
+
to reconnect (and optionally catchup where left off) when any change has occured in the network environment. This is done by calling the
58
53
**disconnectAndResubscribe()** method on the PubNub instance.
59
54
60
55
The demo application has examples of setting up a broadcast receiver for the **ConnectivityManager.CONNECTIVITY_ACTION**.
@@ -92,7 +87,7 @@ If it **is able** to recover network, then the subscribe will "catchup", or resu
92
87
if isResumeOnReconnect() is true, otherwise, it will restart and grab only new messages since it reconnected.
0 commit comments