I have an instant app, and its working nice, but if I add this line to my base/build.gradle then I cant run my app/installed, note that I can run it with a url.
api 'com.google.firebase:firebase-core:16.0.1'
The error is "Default activity not found".
Removing the compile firebase, voilá the activity is found.
Using implementation instead of api the app runs nice, but firebase says "installation unsucessful" but using api and running it as a instant app firebase says "successful"
My build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.example.android.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCodeInstalled
versionName rootProject.ext.versionNameInstalled
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation project(':feature')
implementation project(':base')
}
Manifest app:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.app" />
Manifest base:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="aia-compat-api-min-version"
android:value="1" />
</application>
</manifest>
Any idea?
This solution worked for me:
In the base/manifest
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="aia-compat-api-min-version"
android:value="1" />
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="com.menuymenu.android.app.firebaseinitprovider"
android:exported="false"
tools:node="merge"/>
</application>
Related
i did not any receive fcm when my app is closed
in foreground and open state i received but in background state not working
i think all my code is ok but not receive
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.sample_project">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="#style/AppTheme"
>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="#string/default_notification_channel_id"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#mipmap/ic_launcher"/>
<receiver android:name="io.invertase.firebase.notifications.RNFirebaseNotificationReceiver"/>
<receiver android:enabled="true" android:exported="true" android:name="io.invertase.firebase.notifications.RNFirebaseNotificationsRebootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON"/>
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.infuy.toshisanapp" />
</intent-filter>
</receiver>
<service android:name="io.invertase.firebase.notifications.RNFirebaseBackgroundNotificationActionsService"/>
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
<service android:name="io.invertase.firebase.messaging.RNFirebaseInstanceIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
android:launchMode="singleTop"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
and in index file i put this
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import {firebaseBackgroundMessage} from "./res/Global/FcmManager";
AppRegistry.registerComponent(appName, () => App);
AppRegistry.registerHeadlessTask('RNFirebaseBackgroundMessage', () => firebaseBackgroundMessage);
and in firebaseBackgroundMessage i have this code
export async function firebaseBackgroundMessage(message: RemoteMessage) {
console.log("firebaseBackgroundMessage::::::::::::::::::::::::::::::");
let notif=message['data'];
console.log(JSON.stringify(message));
const groupNotificationId = 'test';
const body = 'Chats list';
const smallIcon = 'ic_launcher';
const channel = new firebase.notifications.Android.Channel(
"reminder", // channelId
"Reminders Channel", // channel name
firebase.notifications.Android.Importance.High // channel importance
).setDescription("Used for getting reminder notification"); // channel description
firebase.notifications().android.createChannel(channel);
const groupNotification = new firebase.notifications.Notification()
.setNotificationId(groupNotificationId)
.setSubtitle(body)
.setTitle(Data.data.title)
.setBody(Data.data.text)
groupNotification
.android.setGroup(groupNotificationId)
.android.setGroupSummary(true)
.android.setChannelId('reminder')
.android.setSmallIcon(smallIcon)
.android.setAutoCancel(true);
firebase.notifications().displayNotification(groupNotification);
return Promise.resolve();
}
plz help me
i did test more a lot of sample code and permission but not working
i am tired
and sample of package.json
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-firebase": "^5.5.6",
"react-navigation": "^4.1.0",
"react-navigation-stack": "^2.1.0",
You should created receiver which handles on device boot event and then create a background service which connects to firebase. In this case even if app terminated by user, service will work.
boot receiver sample:
public class MyReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
// do your coed
}
}
Which module you are using for push Notification?
Push Notification is working on iOS?
When sending from FCM i.e Firebase console in react native it is easily coming in iOS and Android both but when i am sending notification from admin or backend side it is not coming when app is in kill state.
I am using react-native-fcm .
Thanx .
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="#string/app_name"
android:icon="#mipmap/brainbg"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<service android:name="com.evollu.react.fcm.MessagingService" android:enabled="true" android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name="com.evollu.react.fcm.InstanceIdService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<receiver android:name="com.evollu.react.fcm.FIRLocalMessagingPublisher"/>
<receiver android:enabled="true" android:exported="true" android:name="com.evollu.react.fcm.FIRSystemBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON"/>
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
</application>
I had the same issue, resolved it by adding the code below after receiving the fcm token,
FCM.setBadgeNumber(0);
Above is for android for iOS you need to turn on background notifications in Xcode. In Xcode select your project and open capabilities and see if background modes in on. Refer to the screenshot
Here is the snippet of the code i used
export const MyNotificationReceiver = props => {
FCM.getInitialNotification().then(notif => {
});
FCM.setBadgeNumber(0); //Add this for background notification
this.notificationListener = FCM.on(FCMEvent.Notification, async notif => {
var notification_messgae = "";
try {
notification_messgae = notif.default;
} catch (error) {
notification_messgae = JSON.stringify(notif);
}
if (osDetection) {
switch (notif._notificationType) {
case NotificationType.Remote:
notif.finish(RemoteNotificationResult.NewData) //other types available: RemoteNotificationResult.NewData, RemoteNotificationResult.ResultFailed
break;
case NotificationType.NotificationResponse:
notif.finish();
break;
case NotificationType.WillPresent:
notif.finish(WillPresentNotificationResult.All) //other types available: WillPresentNotificationResult.None
break;
}
}
if (!osDetection()) {
if(notif.default)
{
FCM.presentLocalNotification({
body: notif.default,
priority: "high",
show_in_foreground: true,
large_icon: "noti_icon", // Android only
icon: "noti_icon", // as FCM payload, you can relace this with custom icon you put in mipmap
android_actions: JSON.stringify([{
id: "view",
title: 'view'
}, {
id: "dismiss",
title: 'dismiss'
}]) // for android, take syntax similar to ios's. only buttons are supported
});
}
}
});
};
This has been the biggest headache for me. I've been following the tutorial at
https://developers.google.com/maps/documentation/android-api/start?hl=en
but I always get a
android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class fragment
ONLY on api 23. This is the most confusing part. Other APIs over 18 work fine.
I believe I've covered all the basic components,
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
My google play version is up to date.(8487000)
I've tried placing the map fragment everywhere. Nothing seems to work.
activity_maps.xml
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/maps"
class ="com.google.android.gms.maps.SupportMapFragment" />
MapsActivity:
package com.example.michael.myapplication;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
public class MapsActivity extends android.support.v4.app.FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.maps);
mapFragment.getMapAsync(this);
}
#Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
// Add a marker in Sydney, Australia, and move the camera.
LatLng sydney = new LatLng(-34, 151);
mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}
For anyone stumbling on this:
Reinstall your emulator. Seriously. That fixed it for me.
If you are testing on emulator, try removing and creating AVD again. I was also facing that issue and that fixed for me.
I had configured gcm pushnotification client receiver for android. The server is receiving send success response from google but the message is not receiving at the client side device. The app server uses gcm_on_rails gem for sending push notification (gcm_on_rails link: https://github.com/dondeng/gcm_on_rails implemenntation). I am stuck at this point for several days, any helps will be appreciate.
This is my Manifest file :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.glympse.android.sendlite"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- GLYMPSE API - Needed to send Glympses via SMS -->
<uses-permission android:name="android.permission.SEND_SMS" />
<!-- GLYMPSE API - Needed to read contacts if using the Recipients editor from the Send Wizard -->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- GLYMPSE API - Used to query network connection status before attempting network activity -->
<!-- Docs: Allows applications to access information about networks -->
<!-- Install: View network connections -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- GLYMPSE API - Used to create a default user profile (nickname/avatar) -->
<!-- Optional but highly recommended -->
<!-- Docs: Allows an application to read the user's contacts data. -->
<!-- Install: Read your contacts -->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- GLYMPSE API - Used to create a default user profile (nickname/avatar) -->
<!-- Optional but highly recommended -->
<!-- Docs: Allows an application to read the user's personal profile data. -->
<!-- Install: Read your own contact card -->
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission
android:name="com.glympse.android.sendlite.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.glympse.android.sendlite.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:theme="#style/AppTheme"
android:label="#string/app_name" >
<activity
android:name=".ChaffeoSplash"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.glympse.android.login.MainActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.glympse.android.home.Home"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.glympse.android.acceptrejectrides.ShowMyList"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".IndividualBookings"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".NoRidesAccRej"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.glympse.android.yourrides.YourRides"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".DetailsActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name=".StartRide"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".FullscreenActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".NoRidesYourRides"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".TabGroupActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".TabGroup1Activity"
android:screenOrientation="portrait" >
</activity>
<activity android:name=".TabsActivity" >
</activity>
<activity
android:name=".TabsActivity2"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".TabsActivity1"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".GlympseSendLiteDemoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:screenOrientation="portrait" >
</activity>
<!-- GLYMPSE API - This is required to make the GlympseSendWizard configurator work. -->
<activity
android:name="com.glympse.android.kit.send.GlympseSendWizard"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize" >
</activity>
<!-- GLYMPSE API - This is required to be notified, when Glympse service is restarted. -->
<receiver
android:name=".GlympseLiteWrapper$ServiceReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.glympse.android.hal.service.STARTED" />
</intent-filter>
</receiver>
<activity
android:name=".EndRide" >
</activity>
<receiver
android:name="com.glympse.android.notifications.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.glympse.android.sendlite" />
</intent-filter>
</receiver>
<service android:name="com.glympse.android.notifications.GCMNotificationIntentService" />
</application>
</manifest>
This is my Broadcast receiver :
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.WakefulBroadcastReceiver;
import android.widget.Toast;
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
// Explicitly specify that GcmIntentService will handle the intent.
ComponentName comp = new ComponentName(context.getPackageName(),
GCMNotificationIntentService.class.getName());
// Start the service, keeping the device awake while it is launching.
startWakefulService(context, (intent.setComponent(comp)));
setResultCode(Activity.RESULT_OK);
}
}
This is my GCM service class :
public class GCMNotificationIntentService extends IntentService {
public static final int NOTIFICATION_ID = 1;
private NotificationManager mNotificationManager;
NotificationCompat.Builder builder;
public GCMNotificationIntentService() {
super("GcmIntentService");
}
public static final String TAG = "GCMNotificationIntentService";
#Override
protected void onHandleIntent(Intent intent) {
Bundle extras = intent.getExtras();
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
String messageType = gcm.getMessageType(intent);
String msg = intent.getStringExtra("message");
System.out.println("###############GCM Message type---> " + messageType);
System.out.println("GCM intent.getStringExtra()---> " + msg);
if (!extras.isEmpty()) {
if (GoogleCloudMessaging.MESSAGE_TYPE_SEND_ERROR
.equals(messageType)) {
sendNotification("Send error: " + extras.toString());
}
else if (GoogleCloudMessaging.MESSAGE_TYPE_DELETED
.equals(messageType)) {
sendNotification("Deleted messages on server: "
+ extras.toString());
}
else if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE
.equals(messageType)) {
for (int i = 0; i < 3; i++) {
Log.i(TAG,
"Working... " + (i + 1) + "/5 # "
+ SystemClock.elapsedRealtime());
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
}
Log.i(TAG, "Completed work # " + SystemClock.elapsedRealtime());
// sendNotification(""+extras.get(DriverUtils.MESSAGE_KEY));
sendNotification(""+extras.get("message"));
Log.i(TAG, "Received: " + extras.toString());
System.out.println("GCM GCM GCM" + extras.toString());
}
}
GcmBroadcastReceiver.completeWakefulIntent(intent);
}
#SuppressLint("NewApi")
private void sendNotification(String msg) {
System.out.println("MESSAGE : " + msg);
// Prepare intent which is triggered if the
// notification is selected
Intent intent = new Intent(this, ChaffeoSplash.class);
PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);
// Build notification
// Actions are just fake
Notification noti = new Notification.Builder(this)
.setContentTitle("Chaffeo")
.setContentText(msg)
.setSmallIcon(R.drawable.icon)
.setContentIntent(pIntent).build();
noti.flags |= Notification.FLAG_AUTO_CANCEL;// hide the notification after its selected
noti.defaults |= Notification.DEFAULT_VIBRATE;
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
// hide the notification after its selected
notificationManager.notify(0, noti);
}
}
Could any one help me solving this problem, thanks in advance.
Note that in the following code :
// Explicitly specify that GcmIntentService will handle the intent.
ComponentName comp = new ComponentName(context.getPackageName(),
GCMNotificationIntentService.class.getName());
you are saying that the GCMNotificationIntentService is located in the main package of the application. However, your GCMNotificationIntentService is located in com.glympse.android.notifications, while the main package of your app is com.glympse.android.sendlite.
You can fix it this way :
// Explicitly specify that GcmIntentService will handle the intent.
ComponentName comp = new ComponentName(GCMNotificationIntentService.class.getPackage().getName(),
GCMNotificationIntentService.class.getName());
I am an Android newbie,
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.exaggmple.sadgh"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
</application>
</manifest>
thıs ıs my manıfest.xml, but ı stıll get the error lıke no launcher :( , please help. thanks!