AndroidManifest.xml custom meta-data tag support

Didn’t see an option in the build.setting or anywhere else in the documentation to create a meta-data tag in the AndroidManifest.xml. See other options such as intentFilters and usesPermissions but this one seems to be missing.

Is there a way set one in the application tag level like the following?

\<application ...\> \<meta-data android:name="custom\_name" android:value="custom\_value" /\> \</application\>

Thanks.

I’m curious. Why do would you want this?

Because in my opinion, these meta-data tags are only useful to native Android developers.  The OS ignores them.

If you want to store custom information, then you can just store it in a Lua file.

There are a few OneSignal plugin settings we haven’t exposed with lua functions and only apply to Android. They are as follows.

https://documentation.onesignal.com/docs/android-notification-customizations#app-icon-badge-counts

https://github.com/one-signal/OneSignal-Android-SDK/releases/tag/2.3.0

Thanks.

I suggest that you ask OneSignal if they have alternative means of enabling/disabling badge support.

Such as via a Lua API in their plugin.  This is in case a solution already exist on their end.

Whoops. I just noticed that you work for OneSignal.  Sorry about that.

Right.  Setting meta-data tags is not something we support in Corona Simulator builds.  It’s never been demanded before.  No one has ever needed it before.

Is this the OneSignal SDK’s only means of enabling/disabling badge support?

Is there no Java API for setting this dynamically?

No problem, currently it is the only way to disable badge support. There is a bug with the count not resetting sometimes and was looking for a quick solution for one of our customers to disable it temporarily until we have a fix.

No need to add support for this for us, just wanted to make sure I wasn’t overlooking something.

I see. Currently, we do provide the plugin developer to hardcode their own XML elements within the <application> block in the manifest file.  You can do so in the plugin’s “metadata.lua” file by setting the “applicatoinChildElements” field as shown here…

   https://docs.coronalabs.com/daily/native/plugin/submission.html#format-for-per-platform-metadata.lua

This was mostly intended for plugin developers to inject their own activities, broadcast receivers, etc.  The injected XML string was not intended to be configurable by plugin users.  But that said, you could hardcode your own meta-data tag and force the badge count to be disabled until this issue is resolved.  Then afterwards you could update the plugin with the newer OneSignal libraries and remove the meta-data tag from the “metadata.lua” file.  Will this work for you?

That should work, thanks!

I’m curious. Why do would you want this?

Because in my opinion, these meta-data tags are only useful to native Android developers.  The OS ignores them.

If you want to store custom information, then you can just store it in a Lua file.

There are a few OneSignal plugin settings we haven’t exposed with lua functions and only apply to Android. They are as follows.

https://documentation.onesignal.com/docs/android-notification-customizations#app-icon-badge-counts

https://github.com/one-signal/OneSignal-Android-SDK/releases/tag/2.3.0

Thanks.

I suggest that you ask OneSignal if they have alternative means of enabling/disabling badge support.

Such as via a Lua API in their plugin.  This is in case a solution already exist on their end.

Whoops. I just noticed that you work for OneSignal.  Sorry about that.

Right.  Setting meta-data tags is not something we support in Corona Simulator builds.  It’s never been demanded before.  No one has ever needed it before.

Is this the OneSignal SDK’s only means of enabling/disabling badge support?

Is there no Java API for setting this dynamically?

No problem, currently it is the only way to disable badge support. There is a bug with the count not resetting sometimes and was looking for a quick solution for one of our customers to disable it temporarily until we have a fix.

No need to add support for this for us, just wanted to make sure I wasn’t overlooking something.

I see. Currently, we do provide the plugin developer to hardcode their own XML elements within the <application> block in the manifest file.  You can do so in the plugin’s “metadata.lua” file by setting the “applicatoinChildElements” field as shown here…

   https://docs.coronalabs.com/daily/native/plugin/submission.html#format-for-per-platform-metadata.lua

This was mostly intended for plugin developers to inject their own activities, broadcast receivers, etc.  The injected XML string was not intended to be configurable by plugin users.  But that said, you could hardcode your own meta-data tag and force the badge count to be disabled until this issue is resolved.  Then afterwards you could update the plugin with the newer OneSignal libraries and remove the meta-data tag from the “metadata.lua” file.  Will this work for you?

That should work, thanks!