Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push kit is configured in AndroidManifest even when push kit is not enabled #220

Closed
user1767 opened this issue Nov 15, 2021 · 5 comments
Closed

Comments

@user1767
Copy link

The below gets inserted into AndroidManifest even if push kit is not enabled. This causes the app to crash at times.

         <activity android:name="org.m0skit0.android.hms.unity.activity.NativeBridgeActivity"/>
         <service android:exported="false" android:name="org.m0skit0.android.hms.unity.push.HMSPushService">
             <intent-filter>
                 <action android:name="com.huawei.push.action.MESSAGING_EVENT"/>
             </intent-filter>
         </service>
@sametguzeldev
Copy link
Collaborator

Hello there.
I am trying to fix this behavior. Can you tell me when it crashes? Just out of curiosity :)

@user1767
Copy link
Author

user1767 commented Nov 16, 2021

This was the exception that was reported about a crash:

java.lang.RuntimeException: Unable to instantiate service org.m0skit0.android.hms.unity.push.HMSPushService: java.lang.ClassNotFoundException: Didn't find class "org.m0skit0.android.hms.unity.push.HMSPushService" on path: DexPathList[...

Because the AndroidManifest had the only reference to HMSPushService, I assumed that was the cause, but that's actually all I know.

When I tried to instantiate that class from our code it gave an error about missing push kit related class instead. Maybe I had a different error because in the above error HMSPushService was obfuscated I'm not sure.

@sametguzeldev
Copy link
Collaborator

Okay got it. I will be releasing a new version on Wednesday that fixes this problem.

@sametguzeldev
Copy link
Collaborator

Hello again.
Please check the 2.0.13 version that is recently released. It should fix this issue.

sametguzeldev added a commit to sametguzeldev/hms-unity-plugin that referenced this issue Nov 19, 2021
… Java thread due to callbacks are not being called when they should be. Please don't use Unity API-related code in these callbacks.

Added OnRewardAdStarted, OnRewardAdCompleted and OnRewardAdLeftApp callbacks. (EvilMindDevs#214)
Moved the Resources and Plugins folder under the Huawei folder. (EvilMindDevs#215)
Added functionality for enabling the plugin programmatically. You can check example usage under Huawei/Utils menu item or HMSMainWindow.cs file. (EvilMindDevs#215)
Added PushKit as a new native plugin and enabled/disabled whenever push kit is enabled/disabled. (EvilMindDevs#220)
Added Splash Ad type into the plugin!!!.
@user1767
Copy link
Author

HMSPushService is gone from the manifest, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants