<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="project.com. holobech" > <uses-permission android:name="android. permission. INTERNET" /> <uses-permission android:name="android. permission. WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android. permission. READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android. permission. READ_PHONE_STATE" /> <uses-permission android:name="android. permission. ACCESS_NETWORK_STATE" /> <!-- GCM requires a Google account. --> <uses-permission android:name="android. permission. GET_ACCOUNTS" /> <!-- Keeps the processor from sleeping when a message is received. --> <uses-permission android:name="android. permission. WAKE_LOCK" /> <uses-permission android:name="android. permission. VIBRATE" /> <!-- Creates a custom permission so only this app can receive its messages. --> <permission android:name="project.com. holobech. permission. C2D_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="project.com. holobech. permission. C2D_MESSAGE" /> <!-- This app has permission to register and receive data message. --> <uses-permission android:name="com. google. android. c2dm. permission. RECEIVE" /> <!-- Network State Permissions to detect Internet status --> <uses-permission android:name="android. permission. ACCESS_NETWORK_STATE" /> <!-- Permission to vibrate --> <uses-permission android:name="android. permission. VIBRATE" /> <uses-permission android:name="com. google. android. providers. gsf. permission. READ_GSERVICES" /> <!-- The ACCESS_COARSE/FINE_LOCATION permissions are not required to use Google Maps Android API v2, but are recommended. --> <uses-permission android:name="android. permission. ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android. permission. ACCESS_FINE_LOCATION" /> <application android:name=". app. AppController" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/MyMaterialTheme" > <activity android:name=". activity. LoginActivity" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" > <intent-filter> <action android:name="android. intent. action. MAIN" /> <category android:name="android. intent. category. LAUNCHER" /> </intent-filter> </activity> <activity android:name=". activity. RegisterActivity" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" /> <activity android:name=". MainActivity" android:label="@string/app_name" android:screenOrientation="portrait" /> <activity android:name=". activity. FullImageActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme. Holo. NoActionBar" > </activity> <activity android:name=". activity. PrivacyActivity" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" /> <activity android:name=". activity. AboutUsActivity" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" /> <activity android:name=". activity. SupportActivity" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" /> <activity android:name=". activity. PaypalActivity" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" > </activity> <activity android:name="com. paypal. android. MEP. PayPalActivity" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" /> <activity android:name=". activity. TermsActivity" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" /> <service android:name="com. paypal. android. sdk. payments. PayPalService" android:exported="false" /> <activity android:name="com. paypal. android. sdk. payments. PaymentActivity" /> <activity android:name="com. paypal. android. sdk. payments. LoginActivity" /> <activity android:name="com. paypal. android. sdk. payments. PaymentMethodActivity" /> <activity android:name="com. paypal. android. sdk. payments. PaymentConfirmActivity" /> <activity android:name="io. card. payment. CardIOActivity" android:configChanges="keyboardHidden|orientation" /> <activity android:name="io. card. payment. DataEntryActivity" /> <meta-data android:name="com. google. android. gms. version" android:value="@integer/google_play_services_version" /> <receiver android:name=". services. GcmBroadcastReceiver" android:permission="com. google. android. c2dm. permission. SEND" > <intent-filter> <!-- Receives the actual messages. --> <action android:name="com. google. android. c2dm. intent. RECEIVE" /> <!-- Receives the registration id. --> <action android:name="com. google. android. c2dm. intent. REGISTRATION" /> <category android:name="project.com. holobech" /> </intent-filter> </receiver> <service android:name=". services. GCMNotificationIntentService" /> </application> </manifest> public class GcmBroadcastReceiver extends WakefulBroadcastReceiver { @Override public void onReceive } public class GCMNotificationIntentService extends IntentService { public static final int NOTIFICATION_ID = 1; private NotificationManager mNotificationManager; NotificationCompat. Builder builder; public GCMNotificationIntentService public static final String TAG = "GCMNotificationIntentService"; @Override protected void onHandleIntent { Bundle extras = intent. getExtras ; GoogleCloudMessaging gcm = GoogleCloudMessaging. getInstance ; String messageType = gcm. getMessageType ; if (! extras. isEmpty { if (GoogleCloudMessaging. MESSAGE_TYPE_SEND_ERROR. equals else if (GoogleCloudMessaging. MESSAGE_TYPE_DELETED. equals else if (GoogleCloudMessaging. MESSAGE_TYPE_MESSAGE. equals } GcmBroadcastReceiver.completeWakefulIntent ; } private void sendNotification }MAIN ACTIVITY : // Make sure the device has the proper dependencies. GCMRegistrar. checkDevice ;// Make sure the manifest was properly set - comment out this line// while developing the app, then uncomment it when it's ready. GCMRegistrar. checkManifest ;// Get GCM registration idfinal String regId = GCMRegistrar. getRegistrationId ;GCMRegistrar. unregister ;GCMRegistrar. register ;String rregId = GCMRegistrar. getRegistrationId ;// Check if regid already presentsif (regId. equals else { // Device is already registered on GCM if (GCMRegistrar. isRegisteredOnServer else { // Try to register again, but not in the UI thread. // It's also necessary to cancel the thread onDestroy , // hence the use of AsyncTask instead of a raw thread. final Context context = this; mRegisterTask = new AsyncTask<Void, Void, Void> { @Override protected Void doInBackground @Override protected void onPostExecute }; mRegisterTask. execute ; }}GCM register her seferinde boş geliyor, sebebini bulamadım. Kanser etti. Yardımcı olabilecek var mıdır?Ek olarak :project.com. holobech, main package adıproject.com. holobech. services ise, gcmintentservice ile broadcast' ın bulunduğu package. mainactivity, main package' da. ozgunlu tarafından 06/Oca/16 15:49 tarihinde düzenlenmiştir Hello, i am nothing. I come from Neverland.