|
| 1 | +# InApp Update |
| 2 | + |
| 3 | +{>> Non-Visible component<<} |
| 4 | + |
| 5 | +| Category | Requires | Version | |
| 6 | +|:--------:|:-------:|:--------:| |
| 7 | +|**Google**|<span class="chip chip-any">API 21, Android 5.0 Lollipop</span>|<span class="chip chip-number">2</span>| |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +A non-visible component that lets the user download app updates from within the app. |
| 12 | +Note\: For this component to work correctly, set the MIN API to 21 (Android 5). |
| 13 | + |
| 14 | +## Events |
| 15 | + |
| 16 | +### Initialized |
| 17 | + |
| 18 | +Use this event to check if updates from Google Play Store are available for your app. |
| 19 | + |
| 20 | +<div class="block" ai2-block="event" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Initialized%22,%20%22param%22:%20%5B%5D%7D"></div> |
| 21 | + |
| 22 | +### Update Canceled |
| 23 | + |
| 24 | +Event will be invoked when the update was canceled. |
| 25 | + |
| 26 | +<div class="block" ai2-block="event" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Update%20Canceled%22,%20%22param%22:%20%5B%5D%7D"></div> |
| 27 | + |
| 28 | +### Update Downloaded |
| 29 | + |
| 30 | +Event will be invoked when the update is downloaded. |
| 31 | + |
| 32 | +<div class="block" ai2-block="event" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Update%20Downloaded%22,%20%22param%22:%20%5B%5D%7D"></div> |
| 33 | + |
| 34 | +### Update Downloading |
| 35 | + |
| 36 | +Event will be invoked when the update is still in downloading progress. |
| 37 | + |
| 38 | +<div class="block" ai2-block="event" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Update%20Downloading%22,%20%22param%22:%20%5B%5D%7D"></div> |
| 39 | + |
| 40 | +### Update Failed |
| 41 | + |
| 42 | +Event will be invoked when there was a update fail. |
| 43 | + |
| 44 | +<div class="block" ai2-block="event" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Update%20Failed%22,%20%22param%22:%20%5B%5D%7D"></div> |
| 45 | + |
| 46 | +### Update Installed |
| 47 | + |
| 48 | +Event will be invoked when the update is installed. |
| 49 | + |
| 50 | +<div class="block" ai2-block="event" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Update%20Installed%22,%20%22param%22:%20%5B%5D%7D"></div> |
| 51 | + |
| 52 | +### Update Installing |
| 53 | + |
| 54 | +Event will be invoked when the update is still in installing progress. |
| 55 | + |
| 56 | +<div class="block" ai2-block="event" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Update%20Installing%22,%20%22param%22:%20%5B%5D%7D"></div> |
| 57 | + |
| 58 | +## Methods |
| 59 | + |
| 60 | +### Install Flexible Update Now |
| 61 | + |
| 62 | +Use this block to install a flexible update after it was downloaded. |
| 63 | + |
| 64 | +<div class="block" ai2-block="method" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Install%20Flexible%20Update%20Now%22,%20%22output%22:%20false,%20%22param%22:%20%5B%5D%7D"></div> |
| 65 | + |
| 66 | +### Is Flexible Update Available |
| 67 | + |
| 68 | +<span class="chip chip-boolean">Returns: <i>Boolean</i></span> |
| 69 | + |
| 70 | +Returns true if a flexible update is available for your app. |
| 71 | + |
| 72 | +<div class="block" ai2-block="method" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Is%20Flexible%20Update%20Available%22,%20%22output%22:%20true,%20%22param%22:%20%5B%5D%7D"></div> |
| 73 | + |
| 74 | +### Is Immediate Update Available |
| 75 | + |
| 76 | +<span class="chip chip-boolean">Returns: <i>Boolean</i></span> |
| 77 | + |
| 78 | +Returns true if an immediate update is available for your app. |
| 79 | + |
| 80 | +<div class="block" ai2-block="method" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Is%20Immediate%20Update%20Available%22,%20%22output%22:%20true,%20%22param%22:%20%5B%5D%7D"></div> |
| 81 | + |
| 82 | +### Start Flexible Update |
| 83 | + |
| 84 | +Start the process for flexible in-app updates. The update will be done in the background. Your users can still use your app in this time. After the update download is done you must restart your app. |
| 85 | + |
| 86 | +<div class="block" ai2-block="method" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Start%20Flexible%20Update%22,%20%22output%22:%20false,%20%22param%22:%20%5B%5D%7D"></div> |
| 87 | + |
| 88 | +### Start Immediate Update |
| 89 | + |
| 90 | +Start the process for immediate in-app updates. In this time your app user can NOT use your app. After the update download is done your app will be restarted automatically. |
| 91 | + |
| 92 | +<div class="block" ai2-block="method" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Start%20Immediate%20Update%22,%20%22output%22:%20false,%20%22param%22:%20%5B%5D%7D"></div> |
| 93 | + |
| 94 | +## Properties |
| 95 | + |
| 96 | +### Is Update Available |
| 97 | + |
| 98 | +:warning: ==**Deprecated**== |
| 99 | + |
| 100 | +<span style="user-select: none; white-space:pre-wrap;"><span class="chip chip-boolean">Boolean</span> :heavy_minus_sign: <span class="chip chip-rw">Read</span> - <span class="chip chip-bd">Blocks</span></span> |
| 101 | + |
| 102 | +Returns true if a update is available for your app. |
| 103 | + |
| 104 | +<div class="block" ai2-block="property" not-rendered="true" value="%7B%22componentName%22:%20%22InApp%20Update%22,%20%22name%22:%20%22Is%20Update%20Available%22,%20%22getter%22:%20true%7D"></div> |
0 commit comments