diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 1c489749b..7e8d30e7b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -86,7 +86,7 @@ - @@ -109,7 +109,7 @@ - + @@ -117,7 +117,7 @@ - + diff --git a/src/org/linphone/gcm/GCMReceiver.java b/src/org/linphone/gcm/GCMReceiver.java new file mode 100644 index 000000000..39ba73eb4 --- /dev/null +++ b/src/org/linphone/gcm/GCMReceiver.java @@ -0,0 +1,36 @@ +package org.linphone.gcm; +/* +GCMReceiver.java +Copyright (C) 2012 Belledonne Communications, Grenoble, France + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +import org.linphone.core.Log; + +import android.content.Context; + +import com.google.android.gcm.GCMBroadcastReceiver; + +/** + * @author Sylvain Berfini + */ +public class GCMReceiver extends GCMBroadcastReceiver { + @Override + protected String getGCMIntentServiceClassName(Context context) { + Log.e("Broadcasting GCM = " + context.getPackageName() + ".gcm.GCMService"); + return context.getPackageName() + ".gcm.GCMService"; + } +} \ No newline at end of file diff --git a/src/org/linphone/GCMIntentService.java b/src/org/linphone/gcm/GCMService.java similarity index 92% rename from src/org/linphone/GCMIntentService.java rename to src/org/linphone/gcm/GCMService.java index 1a4b9ca1e..b08a1f545 100644 --- a/src/org/linphone/GCMIntentService.java +++ b/src/org/linphone/gcm/GCMService.java @@ -1,6 +1,6 @@ -package org.linphone; +package org.linphone.gcm; /* -GCMIntentService.java +GCMService.java Copyright (C) 2012 Belledonne Communications, Grenoble, France This program is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +import org.linphone.LinphoneManager; +import org.linphone.R; import org.linphone.core.LinphoneCoreException; import org.linphone.core.Log; @@ -32,9 +34,9 @@ import com.google.android.gcm.GCMBaseIntentService; * @author Sylvain Berfini */ // Warning ! Do not rename the service ! -public class GCMIntentService extends GCMBaseIntentService { +public class GCMService extends GCMBaseIntentService { - public GCMIntentService() { + public GCMService() { }