How to share a photo from gallery via My application - java

I just want my application make available for user to share a Photo from gallery using Share Via Intent Chooser. Additionally i want to perform basic action of my application just after choosing my application from share via Screen like watsapp. I don't have any idea about how to do. I searched around the Internet but i didn't get any satisfactory Solution. Infect i tried with this
but unfortunately using this code in manifest my application is got disappeared from the Home Screen Application list in my device.
have a look over my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.myAppName"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="preferExternal"
>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.RECORD_AUDIO" >
</uses-permission>
<!-- 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" />
<!--
Creates a custom permission so only this app can receive its messages.
NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
where PACKAGE is the application's package name.
-->
<permission
android:name="com.app.myAppName.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.app.myAppName.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Keeps the device on vibrating mode when a message is received. -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.camera.front" />
<application
android:name="com.app.myAppName.TwitterApplication"
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.app.myAppName.SplashScreen"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<!--
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
-->
<action android:name="android.intent.action.SEND" >
</action>
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" >
</data>
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
<service
android:name=".TimelinesService"
android:label="Timelines Service" />
<service
android:name=".NotificationService"
android:label="NotificationService" />
<activity
android:name="com.facebook.LoginActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name="LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="tweeter"
android:scheme="callback" />
</intent-filter>
</activity>
<activity android:name="com.app.myAppName.TweetsActivity" >
</activity>
<activity
android:name="HomeActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name="TwitterLogin"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name="AddUser"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="AddmyAppName"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="AddMemberTransparent"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name="AddAFriendActivity"
android:screenOrientation="portrait" >
</activity>
</application>

You application 'disappeared' because you commented these lines at SplashActivity section:
<!--
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
-->
as for share provider, which part are you stuck at?

Related

How to fix error in android studio project? [duplicate]

This question already has answers here:
Manifest merger failed : Attribute application#appComponentFactory - Androidx
(14 answers)
Closed 1 year ago.
This is my project error (project was build in android studio 3.6, but my version is 4.1.2 )
Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.5.0-beta01] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:34:5-155:19 to override.
My manifest file is code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:replace="android:appComponentFactory"
package="com.efendi.coffee"
android:versionCode="9"
android:versionName="1.0">
<!-- Always Required to get content and check if internet is available -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Always Required for image coaching & maps -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- Required for notifications & radio -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Required for maps -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Required for visualizer & radio -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- Required for tumblr -->
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:name="com.efendi.coffee.App"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:theme="#style/AppTheme"
tools:replace="android:icon"
tools:ignore="GoogleAppIndexingWarning">
<!-- Activities -->
<activity
android:name="com.efendi.coffee.MainActivity"
android:configChanges="orientation|screenSize"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.efendi.coffee.providers.rss.ui.RssDetailActivity" />
<activity android:name="com.efendi.coffee.providers.youtube.ui.YoutubeDetailActivity" />
<activity android:name="com.efendi.coffee.providers.wordpress.ui.WordpressDetailActivity" />
<activity android:name="com.efendi.coffee.providers.woocommerce.ui.ProductActivity" />
<activity
android:name="com.efendi.coffee.comments.CommentsActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name="com.efendi.coffee.HolderActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name="com.efendi.coffee.attachmentviewer.ui.AttachmentActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name="com.efendi.coffee.attachmentviewer.ui.AudioPlayerActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name="com.efendi.coffee.attachmentviewer.ui.VideoPlayerActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name="com.efendi.coffee.providers.woocommerce.ui.CheckoutActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name="com.efendi.coffee.providers.woocommerce.ui.WooCommerceLoginActivity"
android:configChanges="orientation|screenSize"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"/>
<activity
android:name="com.efendi.coffee.providers.tumblr.ui.TumblrPagerActivity"
android:theme="#android:style/Theme.Holo.NoActionBar" />
<activity
android:name="com.efendi.coffee.providers.youtube.player.YouTubePlayerActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="sensor"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<activity android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="#style/Theme.AppCompat.DayNight.DarkActionBar"/>
<activity android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:theme="#style/Theme.AppCompat.DayNight.DarkActionBar"/>
<!-- Services -->
<service
android:name="com.efendi.coffee.providers.soundcloud.player.player.PlaybackService"
android:exported="false" />
<service android:name="com.efendi.coffee.providers.radio.player.RadioService" />
<service android:name="com.efendi.coffee.attachmentviewer.MusicService" />
<!--
A receiver that will receive media buttons and send as
intents to your MediaBrowserServiceCompat implementation.
Required on pre-Lollipop. More information at
http://developer.android.com/reference/android/support/v4/media/session/MediaButtonReceiver.html
-->
<receiver android:name="android.support.v4.media.session.MediaButtonReceiver">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<receiver android:name="com.efendi.coffee.providers.soundcloud.player.media.MediaSessionReceiver">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<!--<receiver android:name=".providers.soundcloud.player.player.PlayerReceiver">
<intent-filter>
<action android:name="android.media.AUDIO_BECOMING_NOISY" />
</intent-filter>
</receiver>-->
<!-- Meta Data -->
<meta-data
android:name="com.onesignal.NotificationOpened.DEFAULT"
android:value="DISABLE" />
<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_android_key" />
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths" />
</provider>
<provider android:authorities="${applicationId}.firebaseinitprovider"
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:exported="false"
tools:node="remove"/>
</application>
</manifest>
It suggests itself in log,do this
Suggestion
tools:replace="android:appComponentFactory" to element at AndroidManifest.xml

Tag <uses-permission> attribute name has invalid character ' '

I am getting an error in manifest continiously.
Tried a lot but unable to fix it.
Manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bot.pokego"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="23" />
<uses-permission android:name="com.example.googlemaps.permission.MAPS_RECEIVE" />
<permission
android:name="com.bot.pokego.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<!-- Optional permission for Analytics to run. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.bot.pokego.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.bot.pokego.permission.C2D_MESSAGE" />
<application
android:name="com.bot.pokego.Utils.CommonForApp"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<activity
android:name="com.bot.pokego.main.StartActivity"
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>
<activity
android:name="com.bot.pokego.main.AboutActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
android:theme="#style/AppTheme.NoActionBar" >
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyAO9xX_OX2vwdUwPWVuPk2dHgzNpH3YKw8" />
<!-- Include the AdActivity and InAppPurchaseActivity configChanges and themes. -->
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<activity
android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
android:theme="#style/Theme.IAPTheme" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name="com.google.android.gms.appinvite.PreviewActivity"
android:exported="true"
android:theme="#style/Theme.AppInvite.Preview" >
<intent-filter>
<action android:name="com.google.android.gms.appinvite.ACTION_PREVIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:excludeFromRecents="true"
android:exported="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<!--
Service handling Google Sign-In user revocation. For apps that do not integrate with
Google Sign-In, this service will never be started.
-->
<service
android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
android:exported="true"
android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
<receiver android:name="com.google.android.gms.cast.framework.media.MediaIntentReceiver" />
<service android:name="com.google.android.gms.cast.framework.media.MediaNotificationService" />
<service android:name="com.google.android.gms.cast.framework.ReconnectionService" />
<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" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.bot.pokego" />
</intent-filter>
</receiver>
<!--
Internal (not exported) receiver used by the app to start its own exported services
without risk of being spoofed.
-->
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />
<!--
FirebaseInstanceIdService performs security checks at runtime,
no need for explicit permissions despite exported="true"
-->
<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true" >
<intent-filter android:priority="-500" >
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="com.bot.pokego.firebaseinitprovider"
android:exported="false"
android:initOrder="100" />
<service
android:name="com.google.firebase.crash.internal.service.FirebaseCrashReceiverService"
android:process=":background_crash" />
<service
android:name="com.google.firebase.crash.internal.service.FirebaseCrashSenderService"
android:process=":background_crash" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false" />
<!--
FirebaseMessagingService performs security checks at runtime,
no need for explicit permissions despite exported="true"
-->
<service
android:name="com.google.firebase.messaging.FirebaseMessagingService"
android:exported="true" >
<intent-filter android:priority="-500" >
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name="com.google.android.gms.tagmanager.TagManagerService"
android:enabled="true"
android:exported="false" />
<activity
android:name="com.google.android.gms.tagmanager.TagManagerPreviewActivity"
android:noHistory="true" >
<!-- optional, removes the previewActivity from the activity stack. -->
<intent-filter>
<data android:scheme="tagmanager.c.com.bot.pokego" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
</application>
</manifest>
My efforts:
I tried to remove error by myself but failed again and again !
Searched on google ....searched all possible links for it.
Any help wil be appreciated ! Thanks in advance :)
..
Problem is with debug/AndroidManifest.xml.
My suspicion is that it has to do with the com.google.android.providers.gsf.permission.READ_GSERVICES permission. The newer documentation does not show that it's a requirement for location stuff: https://developers.google.com/maps/documentation/android-api/location
I was able to solve this issue by taking out all of the permissions and adding them one by one, rebuilding the project each time I added a permission back. The permission that gave me an issue, caused the error. Good luck :)

logcat report of push not being enabled correclty

I'm using Parse as a back end for my app and I used their quick start guide to setup push notifications.
I've followed it step by step and do not get pushes. Also I get this report in logcat when I start the app
08-22 18:46:34.785 4325-4325/maxbleggi.afstudentplanner D/com.parse.ParsePushChannelsController﹕ Tried to subscribe or unsubscribe from a channel, but push is not enabled correctly. Push is not configured for this app because the app manifest is missing required declarations. Please add the following declarations to your app manifest to use GCM for push: make sure that these permissions are declared as children of the root <manifest> element:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="maxbleggi.afstudentplanner.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="maxbleggi.afstudentplanner.permission.C2D_MESSAGE" />
Also, please make sure that these services and broadcast receivers are declared as children of the <application> element:
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.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="maxbleggi.afstudentplanner" />
</intent-filter>
</receiver>
<receiver android:name="com.parse.ParsePushBroadcastReceiver" android:exported=false>
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.OPEN" />
<action android:name="com.parse.push.intent.DELETE" />
</intent-filter>
</receiver>
But I followed the guide and I believe my manifest is correct
here it is
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="maxbleggi.afstudentplanner" >
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="maxbleggi.afstudentplanner.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="maxbleggi.afstudentplanner.permission.C2D_MESSAGE" />
<application
android:name=".utils.InitializeParse"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.RegisterActivity"
android:label="#string/title_activity_register" >
</activity>
<activity
android:name=".activities.RegisterPart_2Activity"
android:label="#string/title_activity_register_part_2" >
</activity>
<activity
android:name=".activities.RegisterPart2TeacherActivity"
android:label="#string/title_activity_register_part2_teacher" >
</activity>
<activity
android:name=".activities.SplashScreenActivity"
android:label="#string/title_activity_splash_screen" >
</activity>
<activity
android:name=".activities.RegisterPart_3TeacherActivity"
android:label="#string/title_activity_register_part_3_teacher" >
</activity>
<!--<meta-data android:name="com.parse.push.notification_icon"/>
android:resource="#drawable/ic_stat_bt"-->
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.RECEIVE_BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.OPEN" />
<action android:name="com.parse.push.intent.DELETE" />
</intent-filter>
</receiver>
<receiver android:name="com.parse.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="maxbleggi.afstudentplanner" />
</intent-filter>
</receiver>
</application>
</manifest>
here is where I start parse
...
Parse.setLogLevel(Parse.LOG_LEVEL_DEBUG);
ParseInstallation.getCurrentInstallation().saveInBackground();
ParsePush.subscribeInBackground("", new SaveCallback()
{
#Override
public void done(ParseException e)
{
if (e == null)
{
} else
{
}
}
});
When I use my device I do not receive this logcat report but I do receive it when I use an emulator
If using Genymotion as emulator and it does not have Google Apps installed on it, that might cause the issue. Try to Install ARM translation and check again. For more see Unable to get push notification when using Genymotion as my emulator of my android app
I know there could be complex emulator problems but picking a simple one you seem to be missing a permission
<uses-permission android:name="maxbleggi.afstudentplanner.permission.C2D_MESSAGE" />

Multiple applications in task manager

a lot of times when I minimize my application I see two windows in task manager, example below:
Don't know if issue is related, but when I get only one application in task manager (as it should be) I don't see correct preview of it, it shows up as the top field in my example.
What could be the issue, anything specific I'm doing wrong and should look into?
Thank you for any help!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.app.android"
android:installLocation="auto"
android:versionCode="101"
android:versionName="1.01" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.WRITE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<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="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/MyAppTheme"
android:allowBackup="true" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="******************************"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".LoginActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".SmsListener" android:permission="android.permission.BROADCAST_SMS" android:exported="true">
<intent-filter android:priority="5822">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
<action android:name="android.provider.Telephony.SMS_SENT" />
</intent-filter>
</receiver>
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:excludeFromRecents="true"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:launchMode="singleTask"
android:taskAffinity=""
android:windowSoftInputMode="stateHidden" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="*"
android:pathPrefix=""
android:scheme="my.app.android" />
<data
android:host="return"
android:pathPrefix=""
android:scheme="my.app.android" />
</intent-filter>
</activity>
<activity android:name=".UserActivity"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:screenOrientation="portrait"
/>
<activity android:name=".HistoryActivity"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:screenOrientation="portrait"
/>
<activity android:name=".PaymentActivity"
android:theme="#style/Theme.Transparent"
android:screenOrientation="portrait"
/>
<service android:name=".CheckService" />
</application>
Your activities are using different settings for taskAffinity. Most of then use the default (no task affinity given), but one of them specifies the empty string as its taskAffinity.
Remove the line
android:taskAffinity=""

Project 'MyApp' is missing required Java project: 'google-play-services_lib'

I got an app from internet and I want to run it on my eclipse emulator. but after I imported, it had a problem on error log said : Project 'MobileAssistant' is missing required Java project:'google-play-services_lib'.
I've looking for the solution and I got :
Import google service form Project -> Properties -> Android -> Add google play
but I couldn't add it coz it had a cross sign on it.
here the android manifest :
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.sample.mobileassistant"
android:versionCode="2"
android:versionName="2.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<permission
android:name="com.google.sample.mobileassistant.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.sample.mobileassistant.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.google.sample.mobileassistant.SignInActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.sample.mobileassistant.MainActivity" >
</activity>
<activity android:name="com.google.sample.mobileassistant.PlaceDetailsActivity" >
</activity>
<service android:name=".GCMIntentService" />
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.google.sample.mobileassistant" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.google.sample.mobileassistant" />
</intent-filter>
</receiver>
</application>
</manifest>
pleaze help me, how can I solve this and what cause it?
tq be4...

Categories