Setting custom Appium Desired Capabilities

I want to use some custom capabilities for a job but whenever I do, my tests fail with error message

[BROWSERSTACK_INVALID_APP_PACKAGE] App Package “io.testproject.demo” used to start the app doesn’t exist! Make sure the App Package is correct. Supported App Package for this app is “com.myapp.dev”.

I want to use useResourcesForOrientationDetection capability of UIAutomator2.

It would be great help if someone could share an example of how you are supposed to enter capabilities for browserstack.