Skip to content

Commit

Permalink
MOSYNC-2269 C2DM migration to GCM
Browse files Browse the repository at this point in the history
  • Loading branch information
emmaTresanszki committed Jul 10, 2012
1 parent 09a71e6 commit 764efec
Show file tree
Hide file tree
Showing 29 changed files with 591 additions and 590 deletions.
16 changes: 10 additions & 6 deletions libs/Notification/NotificationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,17 @@ namespace Notification
* See PushNotificationType for valid bit-mask values.
* This param is applied only on iOS platform. Android platform will
* ignore this value.
* @param accountID Is the ID of the account authorized to send messages
* to the application, typically the email address of an account set up
* by the application's developer.
* @param senderId Your projectId obtained from here:
* http://developer.android.com/guide/google/gcm/gs.html#create-proj
* For old applications, this param was set as the ID of the account
* authorized to send messages to the application, typically the email
* address of an account set up by the application's developer.
* Even though setting the senderId as the accountID was deprecated, old
* Android applications still support it.
* On iOS platform this param is ignored.
*
* Example: Notification::getInstance->registerPushNotification(
* PUSH_NOTIFICATION_TYPE_BADGE | PUSH_NOTIFICATION_TYPE_ALERT, "");
* PUSH_NOTIFICATION_TYPE_BADGE | PUSH_NOTIFICATION_TYPE_ALERT, "yoursenderId_here");
*
* @return One of the next result codes:
* - #MA_NOTIFICATION_RES_OK if no error occurred.
Expand All @@ -245,9 +249,9 @@ namespace Notification
*/
int NotificationManager::registerPushNotification(
const int types,
const MAUtil::String& accountID)
const MAUtil::String& senderId)
{
return maNotificationPushRegister(types, accountID.c_str());
return maNotificationPushRegister(types, senderId.c_str());
}

/**
Expand Down
14 changes: 9 additions & 5 deletions libs/Notification/NotificationManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,17 @@ namespace Notification
* See PushNotificationType for valid bit-mask values.
* This param is applied only on iOS platform. Android platform will
* ignore this value.
* @param accountID Is the ID of the account authorized to send messages
* to the application, typically the email address of an account set up
* by the application's developer.
* @param senderId Your projectId obtained from here:
* http://developer.android.com/guide/google/gcm/gs.html#create-proj
* For old applications, this param was set as the ID of the account
* authorized to send messages to the application, typically the email
* address of an account set up by the application's developer.
* Even though setting the senderId as the accountID was deprecated, old
* Android applications still support it.
* On iOS platform this param is ignored.
*
* Example: Notification::getInstance->registerPushNotification(
* PUSH_NOTIFICATION_TYPE_BADGE | PUSH_NOTIFICATION_TYPE_ALERT, "");
* PUSH_NOTIFICATION_TYPE_BADGE | PUSH_NOTIFICATION_TYPE_ALERT, "yoursenderId_here");
*
* @return One of the next result codes:
* - #MA_NOTIFICATION_RES_OK if no error occurred.
Expand All @@ -230,7 +234,7 @@ namespace Notification
*/
int registerPushNotification(
const int types,
const MAUtil::String& accountID);
const MAUtil::String& senderId);

/**
* Unregister application for push notifications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
</activity>
<service android:name=".MoSyncService"/>
<service android:name="com.mosync.internal.android.notifications.LocalNotificationsService"/>
<service android:name=".C2DMReceiver" />
<!-- Only C2DM servers can send messages for the app. If permission is
<service android:name=".GCMIntentService" />
<!-- Only GCM/C2DM servers can send messages for the app. If permission is
not set - any other app can generate it -->
<receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver"
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 764efec

Please sign in to comment.