pushwoosh-xamarin's Introduction
pushwoosh-xamarin's People
Forkers
0xtea paulramshaw rhyspartlett arthuralvesif machinarius rdelrosario idcruz arrebagrove phdkeytree dottorpagliaccius repoforks llenroc softwareanswers vedikagujar-stormgeo ruhanijeb michaelstonis swatiburnwal-stormgeopushwoosh-xamarin's Issues
Plans to support MAUI
What are your plans to support a .net MAUI wrapper just like for Xamarin? As far I can see should be fairly simple as already the Xamarin wrapper does not really add anything special on top beside the auto generated bindings.
https://learn.microsoft.com/en-us/events/dotnetconf-focus-on-maui/binding-native-libraries-for-dotnet-maui
dotnet/maui#1340 (comment)
https://www.dynamsoft.com/codepool/dotnet-android-ios-nuget-package.html
problems trying to compile version play service
Unhandled Exception: Java.Lang.UnsupportedOperationException: Google Play Services framework is missing or out of date
What do I do ?
PushNotificationDelegate is missing in Xamarin.iOS Assembly
It appears either the wrong version of Pushwoosh for iOS is up on Nuget or the version is not updated to 5.3.1. Can you guys check this?
NuGET / repo version mismatch
Hi. I went across to the NuGET package page (https://www.nuget.org/packages/Pushwoosh.Xamarin.iOS/5.4.0) and it seems there is a version ahead of the one in this repo. Also the .nuspec file still specifies 5.3.1 but the commit says 5.3.5. Is it possible to tidy up the versioning. Just we can be clear on the API. Thank you
app opens automatically when device receives notification
- environment =
xamarin.android
- pushwoosh sdk =
Pushwoosh.Xamarin.Droid
5.9.0
Whenever device receives a notification, it opens the app forcefully. This is the error I'm receiving when app is in background.
2018-11-16 13:45:37.898 26223-26223/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.adda52.rummyapp.free, PID: 26223
java.lang.RuntimeException: Unable to start receiver com.google.android.gms.gcm.GcmReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=com.adda52.rummyapp.free cmp=com.adda52.rummyapp.free/com.pushwoosh.GCMListenerService (has extras) }: app is in background uid UidRecord{c21962 u0a246 RCVR idle procs:1 seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3350)
at android.app.ActivityThread.-wrap17(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6673)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=com.adda52.rummyapp.free cmp=com.adda52.rummyapp.free/com.pushwoosh.GCMListenerService (has extras) }: app is in background uid UidRecord{c21962 u0a246 RCVR idle procs:1 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1520)
at android.app.ContextImpl.startService(ContextImpl.java:1476)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at android.support.v4.content.WakefulBroadcastReceiver.startWakefulService(WakefulBroadcastReceiver.java:91)
at com.google.android.gms.gcm.GcmReceiver.doStartService(Unknown Source:22)
at com.google.android.gms.gcm.GcmReceiver.zze(Unknown Source:0)
at com.google.android.gms.gcm.GcmReceiver.onReceive(Unknown Source:98)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3343)
at android.app.ActivityThread.-wrap17(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6673)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
2018-11-16 17:03:39.999 27788-27788/com.adda52.rummyapp.free E/Pushwoosh: You have firebase instance.
Please, remove 'com.pushwoosh:pushwoosh-gcm' library from your app build.gradle.
Or disable firebase from your project by removing "apply plugin: 'com.google.gms.google-services'" line.
Otherwise pushwoosh library can work incorrect.
2018-11-16 17:03:43.043 27788-27861/com.adda52.rummyapp.free E/Pushwoosh: [RequestManager] ERROR: {"status_code":210,"status_message":"No hwid given","response":null}
com.pushwoosh.internal.network.NetworkException: {"status_code":210,"status_message":"No hwid given","response":null}
at com.pushwoosh.internal.network.e.a(Unknown Source:173)
at com.pushwoosh.internal.network.e.a(Unknown Source:0)
at com.pushwoosh.internal.network.f.run(Unknown Source:8)
at com.pushwoosh.PushwooshService.onHandleWork(Unknown Source:47)
at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:391)
at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:382)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Getting error after Upgrading Nuget Library to v5.23.1
I recently upgraded nuget packages in my app to latest stable version , after the update my application is launching and is throwing exception.
I am using Pushwoosh v5.23.1 and Pushwoosh.Xamarin.Droid v5.22.6
Java.Lang.RuntimeException: 'Unable to get provider com.pushwoosh.PushwooshSharedDataProvider: java.lang.ClassNotFoundException: Didn't find class "com.pushwoosh.PushwooshSharedDataProvider" on path: DexPathList[[zip file "/data/app/com.myapp.Utility-T73MmYblItshh-eJ47RSYw==/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp.Utility-T73MmYblItshh-eJ47RSYw==/lib/arm64, /data/app/com.myapp.Utility-T73MmYblItshh-eJ47RSYw==/base.apk!/lib/arm64-v8a, /system/lib64]]'
Android - Java Ilegal exception
When the app start it throws the following exception:
Method 'void android.support.v4.content.ContextCompat.()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in /data/app/package-1/base.apk)
packages:
. . . . . . . . . . . .Update Pushwoosh for Xamarin
I want to update my app to use the latest standard and drop support for the Android.Support libraries.
The current bindings are 8 months old and do not support AndroidX.
Is it possible to update the bindings and support AndroidX?
Thanks in advance!
Pushwoosh Xamarin dependencies
Dear Pushwoosh Xamarin SDK Team,
Please confirm whether the latest released version on Nuget i.e. 5.23.1 is dependent on older versions of Xamarin libraries. We will get back with precise errors thrown during compilation (if required).
To summarize we get version conflicts with existing installed (updated) Nuget packages. We are working around this problem by resolving the dependency chain. However please note that the size of our Android App apk seems to have increased from around 30MB to 65MB when we added support for Pushwoosh based push and resolved all the dependencies.
However since we do not see others reporting such problems on the internet, we are wondering whether there could be something wrong or missing in our steps. Looking forward to your guidance.
Regards,
Dhiraj.
Empty project is crashing on Android 12 with Pushwoosh.Firebase.Xamarin.Droid package is added
I'm having trouble migrating my Android app to API 31. It keeps crashing on Android 12 devices because of the Pushwoosh.Firebase.Xamarin.Droid package.
So I created an empty Android project and I added only Pushwoosh.Firebase.Xamarin.Droid to the project. When running the project on a device with API >= 31, it crashed.
The exception message is as follow:
Java.Lang.IllegalArgumentException: com.nicolastremblay.test: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Any chance you will update the package to support API 31?
Thank you,
problems trying to compile
compiler is with the following error:
`Unhandled Exception:
problem, resolved
Unable to set custom language registering device
When registering a device through this SDK we are unable to set a custom language. Though this is possible in the remote API registerDevice call, it's not implemented in the SDK. In this specific case we want the user to receive their messages in the app's language, not the device language.
Custom NotificationServiceExtension due to duplicate meta-data
Hello,
I found (and worked around) an issue with the library, which prevents a custom NotificationServiceExtension from working.
The file Library/Pushwoosh.Droid/PushwooshNotificationServiceExtension.cs contains the following line
[assembly: MetaData("com.pushwoosh.notification_service_extension",Value = "com.pushwoosh.plugin.PushwooshNotificationServiceExtension")]
This will cause a meta-data tag to be added to AndroidManifest.xml
<meta-data android:name="com.pushwoosh.notification_service_extension" android:value="com.pushwoosh.plugin.PushwooshNotificationServiceExtension"/>
As the instructions for a custom NotificationServiceExtension tell you to also use the assembly: MetaData
code for your custom extension. This will add a second meta-data tag to AndroidManifest.xml. But it appears this meta-data tag is ignored, only the first one in the Pushwoosh library is used.
Therefore the custom NotificationServiceExtension will never work.
If you comment out the assembly: MetaData line in the library, rebuild the library and use it in your project the custom NotificationServiceExtension will work.
I have not tested what the implications are of skipping the NotificationServiceExtension of the library itself, but this fixes the custom NotificationServiceExtension.
Just thought I'd post this here in case someone else bumps into this issue.
Problem trying to upload to App Store.
Good night, I was trying to upload my App developed with Xamarin Forms to the App Store and they are rejecting my app, doing some analysis I noticed that Pushwoosh.iOS.Bindings is still using UIKit.UIWebView.
So I would like to know what are you doing about this situations.
The current NuGet Version is Pushwoosh 5.23.0 .0 and Xamarin Forms 4.6.0.726
This is the console output:
MTOUCH : warning MT1502: One or more reference(s) to type 'UIKit.UIWebView' already exists inside 'Pushwoosh.iOS.Bindings, Version=5.23.0.0, Culture=neutral, PublicKeyToken=null' before linking
Component not yet in store
I can't find the component in the Xamarin Component Store, is it possible that the component hasn't been released yet?
Android 13 Not prompting to enable notifications
I am guessing that the bindings libraries just need to be updated here as I believe the same issue has been reported (Pushwoosh/pushwoosh-android-sdk#180).
Right now, you have to go into the app's settings and enable them manually.
Android - PushManager return null
Hi,
I implemented the pushwoosh configuration for Droid project and de PushManager return null, I tested on Moto X2 device.
Main activity code:
`using System;
using Android.App;
using Android.Support.V4.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Org.Json;
using Pushwoosh;
using Xfx;
using Acr.UserDialogs;
using Prism;
using Prism.Unity;
using Microsoft.Practices.Unity;
using Android.Content.PM;
namespace XXX.Droid
{
public class LocalMessageBroadcastReceiver : BasePushMessageReceiver
{
///
/// Gets or sets the activity.
///
/// The activity.
public MainActivity Activity { get; set; }
/// <summary>
/// Ons the message receive.
/// </summary>
/// <param name="p0">P0.</param>
protected override void OnMessageReceive(Intent p0)
{
Activity.DoOnMessageReceive(p0.GetStringExtra(BasePushMessageReceiver.JsonDataKey));
}
}
public class LocalRegisterBroadcastReceiver : BaseRegistrationReceiver
{
/// <summary>
/// Gets or sets the activity.
/// </summary>
/// <value>The activity.</value>
public MainActivity Activity { get; set; }
/// <summary>
/// Ons the register action receive.
/// </summary>
/// <param name="p0">P0.</param>
/// <param name="p1">P1.</param>
protected override void OnRegisterActionReceive(Context p0, Intent p1)
{
Activity.CheckMessage(p1);
}
}
[Activity(Label = "XXXXX", Icon = "@drawable/icon", MainLauncher = true, Theme = "@style/MyTheme", ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
/// <summary>
/// The m message receiver.
/// </summary>
LocalMessageBroadcastReceiver mMessageReceiver;
/// <summary>
/// The m register receiver.
/// </summary>
LocalRegisterBroadcastReceiver mRegisterReceiver;
bool mBroadcastPush = true;
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
XfxControls.Init();
global::Xamarin.Forms.Forms.Init(this, bundle);
UserDialogs.Init(() => this);
LoadApplication(new App(new AndroidInitializer()));
RegisterPushWoosh();
}
#region pushhwoosh
/// <summary>
/// Register pushwoosh.
/// </summary>
private void RegisterPushWoosh()
{
try
{
//pushwoosh
mMessageReceiver = new LocalMessageBroadcastReceiver()
{
Activity = this
};
mRegisterReceiver = new LocalRegisterBroadcastReceiver()
{
Activity = this
};
RegisterReceivers();
PushManager manager = PushManager.GetInstance(this);
if (manager != null)
{
manager.OnStartup(this);
//Register for push!
manager.RegisterForPushNotifications();
}
CheckMessage(Intent);
}
catch (Exception e)
{
System.Diagnostics.Debug.Write(e.StackTrace);
}
}
/// <summary>
/// Ons the new intent.
/// </summary>
/// <param name="intent">Intent.</param>
protected override void OnNewIntent(Intent intent)
{
CheckMessage(intent);
}
/// <summary>
/// Checks the message.
/// </summary>
/// <param name="intent">Intent.</param>
public void CheckMessage(Intent intent)
{
if (null != intent)
{
if (intent.HasExtra(PushManager.PushReceiveEvent))
{
DoOnMessageReceive(intent.Extras.GetString(PushManager.PushReceiveEvent));
}
else if (intent.HasExtra(PushManager.RegisterEvent))
{
DoOnRegistered(intent.Extras.GetString(PushManager.RegisterEvent));
}
else if (intent.HasExtra(PushManager.UnregisterEvent))
{
DoOnUnregisteredError(intent.Extras.GetString(PushManager.UnregisterEvent));
}
else if (intent.HasExtra(PushManager.RegisterErrorEvent))
{
DoOnRegisteredError(intent.Extras.GetString(PushManager.RegisterErrorEvent));
}
else if (intent.HasExtra(PushManager.UnregisterErrorEvent))
{
DoOnUnregistered(intent.Extras.GetString(PushManager.UnregisterErrorEvent));
}
ResetIntentValues();
}
}
/// <summary>
/// Dos the on registered.
/// </summary>
/// <param name="registrationId">Registration identifier.</param>
public void DoOnRegistered(String registrationId)
{
Helpers.Settings.PushWooshToken = registrationId;
}
/// <summary>
/// Dos the on registered error.
/// </summary>
/// <param name="errorId">Error identifier.</param>
public void DoOnRegisteredError(String errorId)
{
// run if device failed to register
}
/// <summary>
/// Dos the on unregistered.
/// </summary>
/// <param name="registrationId">Registration identifier.</param>
public void DoOnUnregistered(String registrationId)
{
}
/// <summary>
/// Dos the on unregistered error.
/// </summary>
/// <param name="errorId">Error identifier.</param>
public void DoOnUnregisteredError(String errorId)
{
// run if device failed to unregister properly
}
/// <summary>
/// Dos the on message receive.
/// </summary>
/// <param name="message">Message.</param>
public void DoOnMessageReceive(String message)
{
// run when device receives notification
}
/// <summary>
/// Resets the intent values. Will check main Activity intent and if it contains any Pushwoosh data, will clear it
/// </summary>
private void ResetIntentValues()
{
Intent mainAppIntent = Intent;
if (mainAppIntent.HasExtra(PushManager.PushReceiveEvent))
{
mainAppIntent.RemoveExtra(PushManager.PushReceiveEvent);
}
else if (mainAppIntent.HasExtra(PushManager.RegisterEvent))
{
mainAppIntent.RemoveExtra(PushManager.RegisterEvent);
}
else if (mainAppIntent.HasExtra(PushManager.UnregisterEvent))
{
mainAppIntent.RemoveExtra(PushManager.UnregisterEvent);
}
else if (mainAppIntent.HasExtra(PushManager.RegisterErrorEvent))
{
mainAppIntent.RemoveExtra(PushManager.RegisterErrorEvent);
}
else if (mainAppIntent.HasExtra(PushManager.UnregisterErrorEvent))
{
mainAppIntent.RemoveExtra(PushManager.UnregisterErrorEvent);
}
Intent = mainAppIntent;
}
/// <summary>
/// Ons the resume.
/// </summary>
protected override void OnResume()
{
base.OnResume();
RegisterReceivers();
}
/// <summary>
/// Ons the pause.
/// </summary>
protected override void OnPause()
{
base.OnPause();
UnregisterReceivers();
}
/// <summary>
/// Registers the receivers.
/// </summary>
public void RegisterReceivers()
{
IntentFilter intentFilter = new IntentFilter(PackageName + ".action.PUSH_MESSAGE_RECEIVE");
if (mBroadcastPush)
{
RegisterReceiver(mMessageReceiver, intentFilter);
}
RegisterReceiver(mRegisterReceiver, new IntentFilter(PackageName + "." + PushManager.RegisterBroadCastAction));
}
/// <summary>
/// Unregisters the receivers.
/// </summary>
public void UnregisterReceivers()
{
UnregisterReceiver(mMessageReceiver);
UnregisterReceiver(mRegisterReceiver);
}
#endregion
}
public class AndroidInitializer : IPlatformInitializer
{
public void RegisterTypes(IUnityContainer container)
{
}
}
}
`
Android - Crash with RegisterForPushNotifications
Hello,
i installed the NuGet Package v 5.4.1 (Pushwoosh.Xamarin.Droid) and i followed the guide from docs but after
PushNotificationsManager.Instance.RegisterForPushNotifications();
i receive from the console this message:
Pushwoosh] Exception occurred [Pushwoosh] java.lang.IllegalArgumentException: Please set the mAppId constant and recompile the app. [Pushwoosh] at com.pushwoosh.internal.platform.utils.GeneralUtils.checkNotNullOrEmpty(Unknown Source) [Pushwoosh] at com.pushwoosh.gcm.b.a.a$a.a(Unknown Source) [Pushwoosh] at com.pushwoosh.gcm.b.a.a.checkDevice(Unknown Source) [Pushwoosh] at com.pushwoosh.notification.e.a(Unknown Source) [Pushwoosh] at com.pushwoosh.Pushwoosh.registerForPushNotifications(Unknown Source) ....
Firebase is correctly configured because we use crash report inside it and also our app in the PW application manager site.
Is a bug or a misconfig?
there isn't anywhere a constant which i can set called mAppId.
thank you
Cant reset badges count to 0
I can't find any method like this one setApplicationIconBadgeNumber(0). How could I reset badges count to 0?
App Removal due to SDK
Hi,
Earlier this week I was contacted by Google Play - informing us that our app is non compliant with the Google Play Developer Policies.
During review, we found that your app doesn’t comply with the User Data and Mobile Unwanted Software policies. We don’t allow apps that are potentially harmful to the user experience. You can read through the User Data and Mobile Unwanted Software policy pages for more details and examples of common violations.
Your app is using the Pushwoosh SDK/Library which collects Android ID and Location. Persistent device identifiers may not be linked to other personal and sensitive user data or resettable device identifiers.
We are running the most up-to-date package available via Nuget, 6.0.6
Google have advised us that the issue must be resolved within 7 days of the notice being received - or that our app may be removed from the play store.
I notice Pushwoosh/pushwoosh-android-sdk#181 mentions some work towards the issue - but we are not using the Pushwoosh Android SDK - only the Pushwoosh Xamarin SDK.
Could you please urgently address this.
pushwoosh error, is not finding functions of java
My project Xamarin android, is not finding the functions of java embodied in PushWooshSDK.Droid project, I added the references and tried to compile both projects, and tried to rebuild PushWooshSDK.Droid
How detect when user open notification? (Android and iOS)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.