Xamarin.Android Exception with FCM & Parse - parse-platform

I'm able to implement Firebase Notifications and send notifications to the client from the Firebase console successfully. The problem arises when I'm using the Parse SDK to send the notification via the Parse Dashboard. I'm using Xamarin.Android, and the documentation isn't quite there with Native Android with FCM & Parse. I noticed when sending the notification via the Parse Dashboard, I get the following exception on the client:
Java.Lang.RuntimeException: Unable to instantiate service com.parse.fcm.ParseFirebaseMessagingService: java.lang.ClassNotFoundException: Didn't find class
When the parse documentation tells me to implement the following manifest below:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.xamarin.fcmexample" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="20" android:targetSdkVersion="25" />
<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" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application android:allowBackup="true" android:icon="#mipmap/ic_launcher" android:label="g" android:roundIcon="#mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="#style/AppTheme">
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
<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="${applicationId}" />
</intent-filter>
</receiver>
<service android:name="com.parse.fcm.ParseFirebaseInstanceIdService" android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service android:name="com.parse.fcm.ParseFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<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.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
</application>
</manifest>
Wondering if I'm missing anything to get Xamarin.Android + Parse SDK + FCM working. Thanks.

Related

Published app not showing in Play Store on Chromebook devices

We have published an education app on Google Play Store. It shows in Play Store but not on any Chromebook devices. We tried every Chromebook-specific setting in Unity as well as in the custom manifest file. Here is the published app manifest, can anyone help out with what we are missing that is making it incompatible with Chromebook devices? NOTE: We sideloaded the APK file on the actual Chromebook device and it's working fine.
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="46"
android:versionName="1.7.46"
android:installLocation="0"
android:compileSdkVersion="32"
android:compileSdkVersionCodename="12"
package="com.medcerts.aandp"
platformBuildVersionCode="32"
platformBuildVersionName="12">
<application
android:label="(reference) #0x7f030005"
android:icon="(reference) #0x7f020000"
android:debuggable="false"
android:extractNativeLibs="true">
<meta-data
android:name="unity.allow-resizable-window"
android:value="false"/>
<meta-data
android:name="unity.launch-fullscreen"
android:value="true"/>
<meta-data
android:name="unity.splash-enable"
android:value="true"/>
<meta-data
android:name="unity.splash-mode"
android:value="0"/>
<receiver
android:name="com.unity.androidnotifications.UnityNotificationRestartOnBootReceiver"
android:enabled="false"
android:exported="false"/>
<receiver
android:name="com.unity.androidnotifications.UnityNotificationManager"
android:exported="false"/>
<activity
android:theme="(reference) #0x7f040001"
android:name="com.unity3d.player.UnityPlayerActivity"
android:exported="true"
android:launchMode="2"
android:screenOrientation="0"
android:configChanges="40003fff"
android:hardwareAccelerated="false"
android:resizeableActivity="false">
<meta-data
android:name="unityplayer.UnityActivity"
android:value="true"/>
<intent-filter>
<category
android:name="android.intent.category.LAUNCHER"/>
<action
android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
</application>
<uses-feature
android:name="android.hardware.camera"
android:required="false"/>
<uses-permission
android:name="android.permission.INTERNET"/>
<uses-feature
android:name="org.chromium.arc"/>
<uses-feature
android:glEsVersion="30000"/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
<uses-feature
android:name="android.hardware.touchscreen.multitouch"
android:required="false"/>
<uses-feature
android:name="android.hardware.touchscreen.multitouch.distinct"
android:required="false"/>
<supports-screens
android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-sdk
android:minSdkVersion="26"
android:targetSdkVersion="32"/>

.Net Maui unable to deploy on Android Emulator Using Visual Studio for Mac Preview 17.4

I'm building a cross platform line of business app on .Net Maui. Everything was working (mostly) fine(ish) until today when I updated the .net core sdk from version 6.0.400-preview.22330.6 to 6.0.400. To my knowledge that is the only thing I have changed.
Now any time I attempt to debug the app, the build succeeds however VS for Mac displays an error message after "Deploying to Device". The Error message is: "Cannot execute "Users/xxxx/src/Mobile/bin/Debug/net6.0-android/Mobile.dll
I can't tell what is causing it. It appears like the all the steps succeed in the "Deploying to Device" window. Zero Errors and Zero warnings.
I have noticed that most of the targets are skipped because "all output files are up-to-date with respect to the input files". Thusly, I have cleaned both from the command line and in VS for Mac with no luck.
Finally, I can run the application in the emulator if I use the command:
dotnet build -t:Run -f:net6.0-android
UPDATE:
I pulled up the VS for Mac Logs and found this:
ERROR [2022-08-15 15:48:19Z]: Error loading android manifest '/Users/xxxx/src/Mobile/obj/Debug/net6.0-android/android/AndroidManifest.xml'
System.ArgumentNullException: Value cannot be null. (Parameter 'versions')
at Xamarin.Android.Tools.AndroidAppManifest.Load(String filename, AndroidVersions versions) in /Users/runner/work/1/s/MonoDevelop.MonoDroid/external/androidtools/external/xamarin-android-tools/src/Xamarin.Android.Tools.AndroidSdk/AndroidAppManifest.cs:line 84
at MonoDevelop.MonoDroid.ProjectSystem.AndroidApplicationManifest..ctor(String manifestFile, AndroidProjectProperties projectProperties) in /Users/runner/work/1/s/MonoDevelop.MonoDroid/MonoDevelop.MonoDroid/ProjectSystem/PropertiesProviders/AndroidApplicationManifest.cs:line 13
at MonoDevelop.MonoDroid.ProjectSystem.AndroidManifestCache.CreateNewManifest(String filename) in /Users/runner/work/1/s/MonoDevelop.MonoDroid/MonoDevelop.MonoDroid/ProjectSystem/PropertiesProviders/AndroidManifestCache.cs:line 33
INFO [2022-08-15 15:48:19Z]: Add-in loaded: DotNetCore.Debugger
INFO [2022-08-15 15:48:19Z]: Add-in loaded: MonoDevelop.Debugger.Soft.AspNet
ERROR [2022-08-15 15:48:19Z]: Cannot execute "/Users/xxxx/src/Mobile/bin/Debug/net6.0-android/Mobile.dll"
So for some reason it appears to be linked to the android manifest not being available in the obj folder. I did check the folder and the manifest is indeed in that location. However, I'm not certain if its a race condition or something that makes the file not there at the time the tooling attempts to load the manifest.
UPDATE 2:
I created a new app just to see if there was something wrong with my current app. Same issue. As requested here is the app manifest located in the obj/Debug/net6.0-android folder of the project. I'm not certain this matters or not, but there is not an app manifest in the bin/Debug/net6.0-android folder.
<?xml version="1.0" encoding="utf-8"?>
<!--
This code was generated by a tool.
It was generated from /Users/xxxx/src/NewTest/Platforms/Android/AndroidManifest.xml
Changes to this file may cause incorrect behavior and will be lost if
the contents are regenerated.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" package="com.companyname.newtest" android:versionName="1.0">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:allowBackup="true" android:icon="#mipmap/appicon" android:roundIcon="#mipmap/appicon_round" android:supportsRtl="true" android:name="crc64035c0982af6367fe.MainApplication" android:label="NewTest" android:debuggable="true" android:extractNativeLibs="true">
<activity android:configChanges="density|orientation|smallestScreenSize|screenLayout|screenSize|uiMode" android:theme="#style/Maui.SplashTheme" android:name="crc64035c0982af6367fe.MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:configChanges="orientation|screenSize" android:exported="true" android:name="crc6468b6408a11370c2f.WebAuthenticatorIntermediateActivity" />
<provider android:authorities="com.companyname.newtest.fileProvider" android:exported="false" android:grantUriPermissions="true" android:name="microsoft.maui.essentials.fileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/microsoft_maui_essentials_fileprovider_file_paths" />
</provider>
<receiver android:enabled="true" android:exported="false" android:label="Essentials Connectivity Broadcast Receiver" android:name="crc64e53d2f592022988e.ConnectivityBroadcastReceiver" />
<activity android:configChanges="orientation|screenSize" android:exported="true" android:name="crc64ba438d8f48cf7e75.IntermediateActivity" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Battery Broadcast Receiver" android:name="crc640a8d9a12ddbf2cf2.BatteryBroadcastReceiver" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Energy Saver Broadcast Receiver" android:name="crc640a8d9a12ddbf2cf2.EnergySaverBroadcastReceiver" />
<service android:name="crc64396a3fe5f8138e3f.KeepAliveService" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="1999999999" android:authorities="com.companyname.newtest.mono.MonoRuntimeProvider.__mono_init__" />
</application>
</manifest>
Here is the original app manifest file located in the Platforms/Android directory of the project (the one visible in the solution explorer)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="#mipmap/appicon" android:roundIcon="#mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
UPDATE 3:
I just unpacked the signed app file from the Bin folder and got the contents out of that app manifest.
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="31" android:compileSdkVersionCodename="12" package="com.companyname.newtest" platformBuildVersionCode="31" platformBuildVersionName="12">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application android:allowBackup="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:debuggable="true" android:extractNativeLibs="true" android:icon="#mipmap/appicon" android:label="NewTest" android:name="crc64035c0982af6367fe.MainApplication" android:roundIcon="#mipmap/appicon_round" android:supportsRtl="true">
<activity android:configChanges="density|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:exported="true" android:name="crc64035c0982af6367fe.MainActivity" android:theme="#style/Maui.SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:configChanges="orientation|screenSize" android:exported="true" android:name="crc6468b6408a11370c2f.WebAuthenticatorIntermediateActivity"/>
<provider android:authorities="com.companyname.newtest.fileProvider" android:exported="false" android:grantUriPermissions="true" android:name="microsoft.maui.essentials.fileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/microsoft_maui_essentials_fileprovider_file_paths"/>
</provider>
<receiver android:enabled="true" android:exported="false" android:label="Essentials Connectivity Broadcast Receiver" android:name="crc64e53d2f592022988e.ConnectivityBroadcastReceiver"/>
<activity android:configChanges="orientation|screenSize" android:exported="true" android:name="crc64ba438d8f48cf7e75.IntermediateActivity"/>
<receiver android:enabled="true" android:exported="false" android:label="Essentials Battery Broadcast Receiver" android:name="crc640a8d9a12ddbf2cf2.BatteryBroadcastReceiver"/>
<receiver android:enabled="true" android:exported="false" android:label="Essentials Energy Saver Broadcast Receiver" android:name="crc640a8d9a12ddbf2cf2.EnergySaverBroadcastReceiver"/>
<service android:name="crc64396a3fe5f8138e3f.KeepAliveService"/>
<provider android:authorities="com.companyname.newtest.mono.MonoRuntimeProvider.__mono_init__" android:exported="false" android:initOrder="1999999999" android:name="mono.MonoRuntimeProvider"/>
<provider android:authorities="com.companyname.newtest.androidx-startup" android:exported="false" android:name="androidx.startup.InitializationProvider">
<meta-data android:name="androidx.emoji2.text.EmojiCompatInitializer" android:value="androidx.startup"/>
<meta-data android:name="androidx.lifecycle.ProcessLifecycleInitializer" android:value="androidx.startup"/>
</provider>
<uses-library android:name="androidx.window.extensions" android:required="false"/>
<uses-library android:name="androidx.window.sidecar" android:required="false"/>
</application>
</manifest>

xamarin.android [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

I am developing an App with Google Maps and I have some difficulties in making it run on a Genymotion Emulator (Nexus 5 API 22)
Here's the message I got :
Installing application on device
Deployment failed because of an internal error: Unexpected install output: pkg:
/data/local/tmp/com.companyname.progettocomputergraphics-Signed.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
Deployment failed. Internal error.
and thats my android manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.progettocomputergraphics">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<permission android:name="com.companyname.progettocomputergraphics.MAPS_RECEIVE" android:protectionLevel="signature" />
<uses-sdk android:targetSdkVersion="22" android:minSdkVersion="15" />
<application android:label="progettocomputergraphics" android:icon="#drawable/Icon">
<meta-data android:name="com.google.android.gsm.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="my_API_Key" />
<service android:name=".ItineraryService"></service>
<receiver android:name=".RoutesRecevier" />
<activity android:name=".MapActivity">
<intent-filler>
<category android:name="android.intnet.category.LAUNCHER" />
</intent-filler>
</activity>
<activity android:name=".InfoActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY" android:value="MapActivity" />
</activity>
</application>
</manifest>
Can anyone help me?
I've got the same issue (in my case using App Center Push SDK).
The issue was solved by avoiding uppercase on first letter of application/package name.
The first thing I will try to modify uses-permission tag:
<permission android: name = "com.companyname.progettocomputergraphics.MAPS_RECEIVE" android: ProtectionLevel = "signature" />
In my case I had to use
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBFdb7p_3FTSQWX-sfOniZmQrsBHnM0Bu.."/>
in manifest

why my published app wont shows upp in google play/butik

i have uploaded an app to google play but after two days stil cant find it available to download.
i dont know if there is any problem with my AndroidManifest.xml but here come my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.PforD.remmember.me"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Home"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="webbadd"></activity>
<activity android:name="db_web_show"></activity>
<activity android:name="who_is_this"></activity>
<activity android:name="help_show"></activity>
<activity android:name="request_answer"></activity>
<activity android:name="delete"></activity>
</application>
thx for any help
reg.
It should be up there , I was able to find my app after some 6-8 hrs I think
You can manually search
https://play.google.com/store/apps/details?id=org.lockerz.compare
replace org.lockerz.compare with your package name and try opening the link

Market requires the minSdkVersion to be set to a positive 32-bit integer in AndroidManifest.xml

We get this message every time time we try to upload our apk.
"Market requires the minSdkVersion to be set to a positive 32-bit integer in AndroidManifest.xml."
We have search and found many answer but none seem to fit our code. Any help would very accepted. Thank You.
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="1" android:versionName="1.0" package="com.app.MobileClient"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="#string/app_name" android:icon="#drawable/icon">
<activity android:label="#string/app_name" android:name=".MobileClient"
android:configChanges="keyboardHidden|orientation" android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
immediatly under the tag add a tag such as:
<uses-sdk android:minSdkVersion="9"
android:targetSdkVersion="9" />

Resources