Skip to content

Commit cfb9bf7

Browse files
committed
Android GCM tiapp.xml example
1 parent 75ca709 commit cfb9bf7

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

README.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Integrate Intercom.io with Appcelerator. iOS module available here https://github.com/markive/TiIntercom . Tested with 5.1.1GA SDK
44

5-
Example
5+
### Example
66
```
77
var TiIntercom = require('intercom');
88
TiIntercom.initialize(<API KEY>,<APP ID>);
99
TiIntercom.startSession("[email protected]");
1010
```
1111

12-
/lib/intercom.js
12+
### /lib/intercom.js
1313
```
1414
var TiIntercom = require('ti.intercom.android');
1515
@@ -47,14 +47,43 @@ exports.setDeviceToken = function(token, appicon /* 'device-token', Ti.App.Andro
4747
4848
```
4949

50-
Author
51-
========
50+
### tiapp.xml changes for Android GCM support
51+
```
52+
<android xmlns:android="http://schemas.android.com/apk/res/android">
53+
<manifest>
54+
<application>
55+
<service
56+
android:name="io.intercom.android.sdk.gcm.GcmIntentService"
57+
android:enabled="false" />
58+
59+
<!-- GCM setup -->
60+
<receiver
61+
android:name="io.intercom.android.sdk.gcm.GcmBroadcastReceiver"
62+
android:enabled="false"
63+
android:permission="com.google.android.c2dm.permission.SEND" >
64+
<intent-filter>
65+
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
66+
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
67+
68+
<category android:name="io.intercom.intercomsdk.gcm" />
69+
</intent-filter>
70+
</receiver>
71+
72+
<meta-data
73+
android:name="com.google.android.gms.version"
74+
android:value="@integer/google_play_services_version" />
75+
76+
</application>
77+
</manifest>
78+
</android>
79+
```
5280

81+
#### Author
5382
Jerod
5483
5584

5685

57-
## License
86+
#### License
5887

5988
The MIT License (MIT) Copyright © 2015
6089

0 commit comments

Comments
 (0)