4 different packages

9 views
Skip to first unread message

Alexandre LocowL

unread,
Dec 1, 2015, 10:42:18 AM12/1/15
to plot-users
Hi,
I've a question about "Notification handling".
Event are built like : [package_name]+.plot.OpenNotification

We have several "buildType" (debug/release) and several "productFlavors" (flavorsA / flavorsB) in our Gradle configuration.

In debug case, we have applicationIdSuffix ".debug" and for the productFlavor :
productFlavors {
    flavorA {
        applicationId "package_a"
    }
    flavorB {
        applicationId "package_b"
    }
}

So we have 4 different packages:
package_a
package_a.debug
package_b
package_b.debug

But only one manifest.

However, we can't define an event like
<action android:name=".plot.OpenNotification" />
or
<action android:name="@string/plot_key_action" />

The question is : How to handle events without defining 4 different manifests ? And without hard-coded that.


Regards, 

Alex

Mark van der Tol

unread,
Dec 1, 2015, 10:50:32 AM12/1/15
to plot-users
Hi Alex,

It is possible to have a placeholder for your applicationId in your AndroidManifest. You then specify it like:

<action android:name="${applicationId}.plot.OpenNotification" />

Will this solve your issue?

Kind regards,
Mark van der Tol
Plot Projects

Alexandre LocowL

unread,
Dec 1, 2015, 10:54:53 AM12/1/15
to plot-users
Hi,
Wooooo, you know everything Mark ! ^^

I didn't know this trick.

Thank you !

Alex
Reply all
Reply to author
Forward
0 new messages