2

In worklight it seems that the android package name is set by the varible ${packageName}.

Where is this variable set? And how can I change it?

Right now the default seems to be com.applicationName.
In the app im working on, this package name already exists in Google Play, so I would like to change it to com.corperationName.applicationName.

I know I can do this via Ant during Android project compilation, but I was wondering if there was somewhere within Worklight I can do this.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
tik27
  • 2,698
  • 1
  • 16
  • 25

1 Answers1

2

I was able to do this for Shell and Inner projects by making the following changes to the Shell project (check in or backup the shell and test before committing changes):

  • Add the following dir structure to the ShellApp/android/native/src directory: com/corpname/{$appName}
  • Copy the contents of the ${packageDirectory} directory into the new {$appName} directory (for me it was ${appName}.java.wltemplate.wluser, ForegroundService.java.wltemplate, GCMIntentService.java.wltemplate).
  • In the files copied, every reference to ${packageName} needs to be replaced with com.corpname.{$appName}
  • In AndroidManifest.xml.wltemplate.wluser, every reference to ${packageName} needs to be replaced with com.corpname.{$appName}.
  • Remove the ${packageDirectory} from the project.

Every inner project created from this Shell project should now have the package structure as com.corpname.appname

Sam Nunnally
  • 2,291
  • 2
  • 19
  • 30