1

I have been trying to incorporate support for Parse Push in my app, following the instructions from this wiki at GitHub. When building for Android, the last stumbling block was this error message in the build log:

Attribute "name" bound to namespace "http://schemas.android.com/apk/res/android" was already specified for element "application".

It turned out that the combination of the build hint

codename1.arg.android.multidex=true

and

codename1.arg.android.xapplication_attr=android\:name\="com.parse4cn1.nativeinterface.CN1AndroidApplication"

caused this problem. With multidex turned on, the application name becomes android.support.multidex.MultiDexApplication

I solved it by setting multidex to false, but what if I needed it to be true?

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
Yngve Moe
  • 410
  • 2
  • 8

2 Answers2

1

I don't think it's related to the multi-dex process. The parse4cn1 wiki mentions changing android.xapplication_attr which I'm assuming you added the name attribute to. This is incorrect as it will inject the name into an activity that is already named.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • I guess I haven't read the wiki thoroughly enough. It mentions the case where you already have an application class, which seems to be the case when `multidex=true`. – Yngve Moe Apr 16 '16 at 07:48
1

Glad to see that you found a solution to the problem. You mentioned that you're using Parse.com for push notifications. Please be aware that Parse.com is shutting down soon. At the moment, the open source Parse Server only supports push notifications for Android and iOS (not Windows Phone). Moreover, Parse Server introduces a constraint that is not present in Parse.com, namely: The need to provide your app's master key in order to trigger push notifications from client side.

By design, parse4cn1 does not perform any operations requiring the master key for security consideration. So if this constraint remains and client-triggered push is an interesting use case for you, you'll probably need to write server-side Javascript cloud code that you can then call using parse4cn1 to trigger your push requests.

I'm currently in the process of updating parse4cn1 to enable support for Parse Server. However, I don't think I'll update the push-related functionality in the next release. So please bear these possible constraints in mind as you move forward. If you're only interested in push notifications, you might also want to consider other dedicated push providers.

All the best.

  • Thank you, I wasn't aware of the master key issue in Parse Server. Maybe I will look into some of the other providers. – Yngve Moe Apr 23 '16 at 13:50