{"id":22329124,"url":"https://github.com/realtime-framework/titaniumpush","last_synced_at":"2025-07-29T18:31:47.953Z","repository":{"id":33895944,"uuid":"37609642","full_name":"realtime-framework/TitaniumPush","owner":"realtime-framework","description":"Titanium example for a cross-platform Realtime app using push notifications from GCM and APNS","archived":false,"fork":false,"pushed_at":"2015-06-17T17:37:59.000Z","size":14692,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-08-04T19:03:23.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/realtime-framework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-17T17:22:28.000Z","updated_at":"2016-05-27T13:46:23.000Z","dependencies_parsed_at":"2022-08-17T19:55:20.738Z","dependency_job_id":null,"html_url":"https://github.com/realtime-framework/TitaniumPush","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FTitaniumPush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FTitaniumPush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FTitaniumPush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FTitaniumPush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realtime-framework","download_url":"https://codeload.github.com/realtime-framework/TitaniumPush/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228034799,"owners_count":17859246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T03:14:32.639Z","updated_at":"2024-12-04T03:14:33.075Z","avatar_url":"https://github.com/realtime-framework.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Titanium Push Notifications with Realtime\nThis project shows how to build an Android and iOS Titanium app able to receive push notifications. This project uses the Realtime Titanium modules and Push Notifications from GCM and APNS.\n\n## Realtime + Android push notifications guide\n\n- Create a Google project, more info [here](http://messaging-public.realtime.co/documentation/starting-guide/mobilePushGCM.html).\n\n- Set the notification title to be displayed in the notification manager:\n\n\t\tortc.setNotificationTitle('[App name for example]');\n\n\n- Before connect set your Google Project Number: \n\n\t\tortc.setGoogleProjectId('462540995476');\n\t\tortc.clusterUrl = 'http://ortc-developers.realtime.co/server/2.1';\n\t\tif(taAuthToken.value != '') {\n\t\t\tortc.connect(taAppKey.value, taAuthToken.value);\n\t\t} else {\n\t\t\tortc.connect(taAppKey.value);\n\t\t}\n\t\t\n- Set the onNotification eventListener: \n\n\t\tortc.addEventListener('onNotification', function(e) {\n\t\t\taddRowToEvents('(onNotification Channel: '+e.channel+') Message received: '+e.message+' Payload received: '+e.payload);\n\t\t\tTitanium.API.log('(onNotification Channel: '+e.channel+') Message received: '+e.message);\n\t\t});\n\t\t\n- Use subscribeWithNotifications to subscribe the channel:\n\t\t\n\t\tortc.subscribeWithNotifications(taChannel.value, true);\n\t\t\n- Add the following entries to your application TiApp.xml, replace **[Titanium project identifier]** :\n\n\t    \u003candroid xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n\t        \u003cmanifest\u003e\n\t            \u003cpermission\n\t                android:name=\"[Titanium project identifier].permission.C2D_MESSAGE\" android:protectionLevel=\"signature\"/\u003e\n\t            \u003cuses-permission android:name=\"[Titanium project identifier].permission.C2D_MESSAGE\"/\u003e\n\t            \u003cuses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/\u003e\n\t            \u003cuses-permission\n\t                android:name=\"android.permission.GET_TASKS\"/\u003e //detect if app is running from service\n\t            \u003cuses-permission android:name=\"com.google.android.c2dm.permission.RECEIVE\"/\u003e\n\t            \u003cuses-permission android:name=\"android.permission.WAKE_LOCK\"/\u003e\n\t            \u003capplication android:debuggable=\"true\"\u003e\n\t                \u003cservice android:name=\"co.realtime.ortc.BackgroundService\"/\u003e\n\t                \u003cservice android:name=\"ibt.ortc.extensibility.GcmOrtcIntentService\"/\u003e\n\t                \u003creceiver\n\t                    android:name=\"ibt.ortc.extensibility.GcmOrtcBroadcastReceiver\" android:permission=\"com.google.android.c2dm.permission.SEND\"\u003e\n\t                    \u003cintent-filter\u003e\n\t                        \u003caction android:name=\"com.google.android.c2dm.intent.RECEIVE\"/\u003e\n\t                        \u003caction android:name=\"android.intent.action.BOOT_COMPLETED\"/\u003e\n\t                        \u003ccategory android:name=\"[Titanium project identifier]\"/\u003e\n\t                    \u003c/intent-filter\u003e\n\t                    \u003cintent-filter\u003e\n\t                        \u003caction android:name=\"com.google.android.c2dm.intent.REGISTRATION\"/\u003e\n\t                        \u003ccategory android:name=\"[Titanium project identifier]\"/\u003e\n\t                        \u003caction android:name=\"android.intent.action.BOOT_COMPLETED\"/\u003e\n\t                    \u003c/intent-filter\u003e\n\t                \u003c/receiver\u003e\n\t            \u003c/application\u003e\n\t        \u003c/manifest\u003e\n\t    \u003c/android\u003e\n\n## Realtime + iOS push notifications guide\n\n- Setup iOS push notifications on iOS Dev Center, more info [here](http://messaging-public.realtime.co/documentation/starting-guide/mobilePushAPNS.html).\n\n- Include 'co.realtime.ortc.apns.js' in your Titanium project.\n\n- Set the onNotification eventListener: \n\n\t\tortc.addEventListener('onNotification', function(e) {\n\t\t\taddRowToEvents('(onNotification Channel: '+e.channel+') Message received: '+e.message+' Payload received: '+e.payload);\n\t\t\tTitanium.API.log('(onNotification Channel: '+e.channel+') Message received: '+e.message);\n\t\t});\n\t\t\n- Use subscribeWithNotifications to subscribe the channel:\n\t\t\n\t\tortc.subscribeWithNotifications(taChannel.value, true);\n\t\t\n- On your run configuration set the application provision profile.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtime-framework%2Ftitaniumpush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtime-framework%2Ftitaniumpush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtime-framework%2Ftitaniumpush/lists"}