I don't like hardcoded code, could it be calculated via API?

navigator.mozApps.getSelf().onsuccess = function gotSelfSuccess(evt) {
      COMMS_APP_ORIGIN = evt.target.result.origin
};

navigator.mozApps.getSelf().onerror = function gotSelfError(evt) {
      COMMS_APP_ORIGIN = = 'app://communications.gaiamobile.org';
};