Girish Uppal Power Apps Wrap Android

Power Apps Wrap – Android

The Wrap feature in Power Apps provides an ability to wrap canvas apps as custom branded Android / iOS apps for native distribution. The below article lists down the high level steps involved in setting up the infrastructure to generate an APK file for distribution in Android ecosystem.  

  1. SET THE STAGE
    1. Open Power Platform Admin Centre 
    2. Navigate to Dynamics 365 Apps and Search for ‘Wrap for Power Apps’ 
    3. Install ‘Wrap for Power Apps’ 
    4. Create a new solution  
    5. Create new app 
    6. Select the App and on toolbar select ‘Wrap’ command to edit configuration settings 
    7. Collect Configuration Parameters and keep it handy 
      1. Azure Active Directory App Registration 
        1. Tenant ID  
        2. Client ID 
      2. App Center 
        1. Bundle ID 
        2. App Center URL 
        3. App Center API Token 
      3. Code Signing 
        1. Generate Certificate (.pfx, .jks) 
        2. Export Certificate (keyhash generation for platform registration) 
        3. Get Signature Hash 
  2. APP CENTER CONFIGURATION 
    1. Navigate to appcenter.ms/apps 
    2. Add new App 
    3. Copy App center URL and save it somewhere safe (replace ‘users’ with ‘orgs’) 
    4. Generate API token and save it somewhere safe 
  3. RUN POWERSHELL COMMANDS 
    1. Install module for Power Apps and Power Apps Administration 
    2. Execute command to allow Third Party Apps 
    3. Execute command to enable Azure API Connections 
  4. APP REGISTRATION CONFIGURATION 
    1. Navigate to Azure Active Directory >> App registration 
    2. Create new App registration 
    3. Under Overview of App registration note down the Client ID and Tenant ID 
    4. Under Authentication > Add a platform (iOS / Android) 
    5. Specify the bundle ID and save 
    6. Configure API Permissions 
      1. Dynamics CRM  
      2. Power Apps Service 
      3. Azure API Connections 
  5. CODE SIGNING PROCESS (Android) 
    1. Tools – Pre-requisites 
      1. Install Android Studio 
      2. Install Open SSL Toolkit (I used GIT Open SSL) 
      3. APKSigner Tool (comes with Android Studio) 
    2. Generate Certificate 
      1. Use keytool.exe to generate the certificate (.pfx or .jks) 
      2. Use keytool.exe to export the generated certificate (Store the hash value) 
      3. Use the hash value to register the platform (android) in the App registration process 
    3. Azure AD App Registration Settings 
      1. Navigate to Azure Active Directory > App Registration 
      2. Under Authentication > Add a Platform
      3. Select ‘Android’ 
      4. Specify the package name 
      5. Under Signature hash type in the value returned by executing keytool exportcert command (Step iii) 
  6. WRAP SETTINGS CONFIGURATION 
    1. Fill up the values collected earlier and populate in the sections below 
    2. General Section 
      1. Specify the Display Name 
      2. Specify the Bundle ID & Client ID 
    3. Publishing Section 
      1. Specify the App Center URL 
      2. Specify the App Center API Token 
    4. Save and Build the configuration 
    5. Download the .apk file from ‘Releases’ of App Center 
    6. Proceed for Code Signing Process 
  7. SIGN, INSTALL & TEST .apk file