Mister Smith's answer is good, but there's one more piece needed. You mentioned that you wanted the permission alert during installation. In order to get that, you need something else, too.
For BlackBerry apps, you can define alternate entry points. This can create multiple instances of your application. A common reason for this, for example, would be to define one normal UI application, and another background application, to listen for push notifications.
In this case, you can create an application instance to simply run at startup, and run the permissions check (shown in Mister Smith's answer). When you define the entry point for the permission-checking "application", you will set it to Auto-run on startup in the BlackBerry_App_Descriptor.xml file, which will cause it to start as soon as the app installs.
See here for defining alternate entry points.