Skip to content

Commit d57364f

Browse files
committed
audiomob v0.0.1
1 parent 06fdcdf commit d57364f

File tree

101 files changed

+4431
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+4431
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
Updating your application descriptor will insert the required `extensionID`'s and generate the manifest and info additions for your application.
4+
5+
You update your application descriptor by running:
6+
7+
```
8+
apm generate app-descriptor src/MyApp-app.xml
9+
```
10+
11+
Change the path (`src/MyApp-app.xml`) to point to your application descriptor.
12+
13+
:::caution
14+
This will modify your application descriptor replacing the manifest additions and info additions with the ones generated from `apm`.
15+
16+
You should backup your application descriptor before running this command to ensure you don't lose any information.
17+
18+
If you need to insert custom data into these sections see the guides for [Android](https://github.com/airsdk/apm/wiki/Usage-Generate#android) and [iOS](https://github.com/airsdk/apm/wiki/Usage-Generate#ios)
19+
:::
20+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
3+
4+
:::info
5+
Note: All of the commands below should be run in a terminal / command prompt in the root directory of your application, generally the level above your source directory.
6+
:::
7+
8+
import SetupAPM from '../../_includes/apm/setup-apm.mdx'
9+
10+
<SetupAPM />
11+
12+
13+
### Install the extension
14+
15+
Install the extension by running:
16+
17+
```
18+
apm install com.audiomob
19+
```
20+
21+
This will download and install the extension, required assets, and all dependencies.
22+
23+
Once complete `apm` will have created something like the following file structure:
24+
25+
```
26+
.
27+
|____ ane
28+
| |____ com.distriqt.Audiomob.ane # Audiomob extension
29+
| |____ [dependencies]
30+
|____ apm_packages # cache directory - ignore
31+
|____ project.apm # apm project file
32+
```
33+
34+
- Add the `ane` directory to your IDE. *See the tutorials located [here](/docs/tutorials/getting-started) on adding an extension to your IDE.*
35+
36+
37+
:::info
38+
We suggest you use the locations directly in your builds rather than copying the files elsewhere. The reason for this is if you ever go to update the extensions using `apm` that these updates will be pulled into your build automatically.
39+
:::
40+
41+
42+
43+
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
## Extension IDs
3+
4+
The following should be added to your `extensions` node in your application descriptor to identify all the required ANEs in your application:
5+
6+
```xml
7+
<extensions>
8+
<extensionID>com.audiomob</extensionID>
9+
10+
<extensionID>com.distriqt.Core</extensionID>
11+
<extensionID>androidx.core</extensionID>
12+
<extensionID>androidx.media3</extensionID>
13+
<extensionID>com.bumptech.glide</extensionID>
14+
<extensionID>com.distriqt.playservices.AdsIdentifier</extensionID>
15+
<extensionID>com.distriqt.playservices.Auth</extensionID>
16+
<extensionID>com.distriqt.playservices.Location</extensionID>
17+
<extensionID>com.distriqt.square.okhttp3</extensionID>
18+
<extensionID>com.distriqt.square.retrofit2</extensionID>
19+
<extensionID>com.google.android.material</extensionID>
20+
</extensions>
21+
```
22+
23+
24+
25+
## iOS
26+
27+
28+
### Info Additions
29+
30+
31+
The following additions are for the `InfoAdditions` node of the iPhone section in your application descriptor:
32+
33+
```xml
34+
<iPhone>
35+
<InfoAdditions><![CDATA[
36+
37+
HERE
38+
39+
]]></InfoAdditions>
40+
</iPhone>
41+
```
42+
43+
44+
45+
## Android
46+
47+
### Manifest Additions
48+
49+
The Audiomob extension requires a few additions to the manifest to be able to start certain activities.
50+
You should add the listing below to your manifest.
51+
52+
```xml
53+
<manifest android:installLocation="auto">
54+
55+
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="35" />
56+
57+
<uses-permission android:name="android.permission.INTERNET"/>
58+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
59+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
60+
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
61+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
62+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
63+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
64+
65+
<application android:hardwareAccelerated="true">
66+
</application>
67+
68+
</manifest>
69+
```
70+
71+
72+
73+
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
2+
:::info
3+
The following guide is used to manually install the extension, download dependencies and update the application descriptor. We highly recommend installing extensions using `apm`. Using `apm` will automate the installation and automatically handle updates and dependencies along with greatly simplifying the application descriptor generation.
4+
:::
5+
6+
7+
First step is always to add the extension to your development environment. Download the extension from the repository and then follow the tutorial located [here](/docs/tutorials/getting-started) to add the extension to your development environment.
8+
9+
10+
11+
12+
## Dependencies
13+
14+
Many of our extensions use some common libraries, for example, the Android Support libraries.
15+
16+
We have to separate these libraries into separate extensions in order to avoid multiple versions of the libraries being included in your application and causing packaging conflicts. This means that you need to include some additional extensions in your application along with the main extension file.
17+
18+
You will add these extensions as you do with any other extension, and you need to ensure it is packaged with your application.
19+
20+
21+
### Core
22+
23+
The Core extension is required by this extension. You must include this extension in your application.
24+
25+
The Core extension doesn't provide any functionality in itself but provides support libraries and frameworks used by our extensions.
26+
It also includes some centralised code for some common actions that can cause issues if they are implemented in each individual extension.
27+
28+
You can access this extension here: [https://github.com/distriqt/ANE-Core](https://github.com/distriqt/ANE-Core).
29+
30+
31+
32+
### Android Support
33+
34+
The Android Support libraries encompass the Android Support, Android X and common Google libraries.
35+
36+
These libraries are specific to Android. There are no issues including these on all platforms, they are just **required** for Android.
37+
38+
This extension requires the following extensions:
39+
40+
- [androidx.core](https://github.com/distriqt/ANE-AndroidSupport/raw/master/lib/androidx.core.ane)
41+
- [androidx.media3](https://github.com/distriqt/ANE-AndroidSupport/raw/master/lib/androidx.media3.ane)
42+
- [com.bumptech.glide](https://github.com/distriqt/ANE-AndroidSupport/raw/master/lib/com.bumptech.glide.ane)
43+
- [com.google.android.material](https://github.com/distriqt/ANE-AndroidSupport/raw/master/lib/com.google.android.material.ane)
44+
45+
You can access these extensions here: [https://github.com/distriqt/ANE-AndroidSupport](https://github.com/distriqt/ANE-AndroidSupport).
46+
47+
48+
49+
#### Square Libs
50+
51+
Due to several of our extensions using the [Square open source libraries](http://square.github.io) the libraries have been separated into separate extensions allowing you to avoid conflicts and duplicate definitions. This means that you need to include the some of the square native extensions in your application along with this extension.
52+
53+
You will add these extensions as you do with any other extension, and you need to ensure it is packaged with your application.
54+
55+
This extension requires the following Square extensions:
56+
57+
- [`com.distriqt.square.okhttp3`](https://github.com/distriqt/ANE-SquareLibs/raw/master/lib/com.distriqt.square.okhttp3.ane)
58+
- [`com.distriqt.square.retrofit2`](https://github.com/distriqt/ANE-SquareLibs/raw/master/lib/com.distriqt.square.retrofit2.ane)
59+
60+
You can access these extensions here: [https://github.com/distriqt/ANE-SquareLibs](https://github.com/distriqt/ANE-SquareLibs).
61+
62+
63+
64+
65+
### Google Play Services
66+
67+
This extension requires usage of certain aspects of the Google Play Services client library.
68+
The client library is available as a series of extensions that you add into your applications packaging options.
69+
Each separate extension provides a component(s) from the Play Services client library and are used by different extensions.
70+
71+
These client libraries aren't packaged with this extension as they are used by multiple ANEs and separating them
72+
will avoid conflicts, allowing you to use multiple extensions in the one application.
73+
74+
This extension requires the following Google Play Services:
75+
76+
- [com.distriqt.playservices.AdsIdentifier.ane](https://github.com/distriqt/ANE-GooglePlayServices/raw/master/lib/com.distriqt.playservices.AdsIdentifier.ane)
77+
- [com.distriqt.playservices.Auth.ane](https://github.com/distriqt/ANE-GooglePlayServices/raw/master/lib/com.distriqt.playservices.Auth.ane)
78+
- [com.distriqt.playservices.Location.ane](https://github.com/distriqt/ANE-GooglePlayServices/raw/master/lib/com.distriqt.playservices.Location.ane)
79+
80+
You must include the above native extensions in your application along with this extension,
81+
and you need to ensure they are packaged with your application.
82+
83+
You can access the Google Play Services client library extensions here:
84+
[https://github.com/distriqt/ANE-GooglePlayServices](https://github.com/distriqt/ANE-GooglePlayServices).
85+
86+
87+
> **Note:** The Google Play Services and Android Support ANEs are only **required** on Android devices.
88+
> There are no issues packaging these extensions with all platforms as there are default implementations available which will allow your code to package without errors however if you are only building an iOS application feel free to remove the Google Play Services and Android Support ANEs from your application.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Add the Extension
3+
sidebar_label: AIR
4+
---
5+
6+
import Tabs from '@theme/Tabs'
7+
import TabItem from '@theme/TabItem'
8+
9+
import InstallAPM from './_includes/add-apm.mdx'
10+
import InstallManual from './_includes/add-manual.mdx'
11+
12+
import AppDescriptorAPM from './_includes/add-apm-appdescriptor.mdx'
13+
import AppDescriptorManual from './_includes/add-manual-appdescriptor.mdx'
14+
15+
16+
17+
The simplest way to install and manage your AIR native extensions and libraries is to use the AIR Package Manager (`apm`). We highly recommend using `apm`, as it will handle downloading all required dependencies and manage your application descriptor (Android manifest additions, iOS info additions etc).
18+
19+
However you can choose to install it manually, as you would have done in the past.
20+
21+
22+
## Install
23+
24+
<Tabs
25+
Id="packagemanager"
26+
defaultValue="apm"
27+
values={[
28+
{label: 'APM', value: 'apm'},
29+
{label: 'Manual', value: 'manual'},
30+
]}>
31+
32+
<TabItem value="apm" >
33+
<InstallAPM/>
34+
</TabItem>
35+
<TabItem value="manual" >
36+
<InstallManual/>
37+
</TabItem>
38+
39+
</Tabs>
40+
41+
42+
## Application Descriptor
43+
44+
<Tabs
45+
Id="packagemanager"
46+
defaultValue="apm"
47+
values={[
48+
{label: 'APM', value: 'apm'},
49+
{label: 'Manual', value: 'manual'},
50+
]}>
51+
52+
<TabItem value="apm" >
53+
<AppDescriptorAPM/>
54+
</TabItem>
55+
<TabItem value="manual" >
56+
<AppDescriptorManual/>
57+
</TabItem>
58+
59+
</Tabs>
60+
61+
62+
63+
## Checking for Support
64+
65+
You can use the `isSupported` flag to determine if this extension is supported on the current platform and device.
66+
67+
This allows you to react to whether the functionality is available on the device and provide an alternative solution if not.
68+
69+
70+
```actionscript
71+
if (Audiomob.isSupported)
72+
{
73+
// Functionality here
74+
}
75+
```
76+
77+
78+

0 commit comments

Comments
 (0)