跳到主要內容

AndroidManifest的小技巧

當在設定推播時,在 AndroidManifest.xml 上需要指定不同application id時該怎麼辦呢?(可能會有xxx.yyy.com.debug與xxx.yyy.com兩個版本)
有個簡單的小技巧可以實現這件事情。
<permission android:name="${applicationId}.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />

參考資料:Using build types in Gradle to run same app that uses ContentProvider on one device

留言

這個網誌中的熱門文章

What is phpize

What is phpize According to the PHP official document : The phpize command is used to prepare the build environment for a PHP extension. If you need to build such an extension that from github or another code repositories, you can use  build tools to perform the build manually.