Skip to content

Instantly share code, notes, and snippets.

View marchbold's full-sized avatar
🚲
making stuff...

Michael marchbold

🚲
making stuff...
View GitHub Profile
@marchbold
marchbold / distriqt.firebase.storage.listall.as
Created July 1, 2022 02:14
Listing storage references in a Firebase storage bucket using distriqt's Firebase extension
var ref:StorageReference = FirebaseStorage.service.getReference();
ref.addEventListener( StorageReferenceListEvent.SUCCESS, listSuccessHandler );
ref.listAll();
function listSuccessHandler( event:StorageReferenceListEvent ):void
{
// Contains a list of "items" - each represents a storage item
for each (var item:String in event.items)
{
@marchbold
marchbold / resign.sh
Created December 13, 2021 10:22
Resign Script for Adobe AIR applications using dynamic frameworks in an ANE
#!/bin/bash
#####################################
## CONFIG
# You need to set the values below for your application
# We suggest they are full paths to the files.
# The path to the ipa generated from your AIR application packaging
IPA="/path/to/your/dist_app.ipa"
@marchbold
marchbold / distriqt_gamecircle_manifestadditions.xml
Last active October 21, 2021 08:05
Game Circle manifest additions
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<application>
<!-- AMAZON GAME CIRCLE -->
<activity android:name="com.amazon.ags.html5.overlay.GameCircleUserInterface" android:theme="@style/GCOverlay" android:hardwareAccelerated="false"></activity>
<activity android:name="com.amazon.ags.html5.overlay.GameCircleAlertUserInterface" android:theme="@style/GCAlert" android:hardwareAccelerated="false"></activity>
@marchbold
marchbold / ExampleApp-app.xml
Created September 21, 2021 09:56
An Introduction to APM generated application descriptor
<application xmlns="http://ns.adobe.com/air/application/33.1">
<id>com.example.app</id>
<versionNumber>1.0.0</versionNumber>
<filename>ExampleApp</filename>
<name>Example App</name>
<initialWindow>
<content>[]</content>
<visible>true</visible>
<fullScreen>false</fullScreen>
<autoOrients>false</autoOrients>
@marchbold
marchbold / ExampleApp.as
Created September 21, 2021 09:54
An Introduction to APM ExampleApp source
package
{
import com.distriqt.extension.idfa.IDFA;
import com.distriqt.extension.idfa.TrackingAuthorisationStatus;
import com.distriqt.extension.idfa.events.IDFAEvent;
import flash.display.Sprite;
public class ExampleApp extends Sprite
{
public function ExampleApp()
@marchbold
marchbold / MyApplicaiton-app.xml
Created September 1, 2021 03:07
Example application descriptor generated with APM using manifest merging
<application xmlns="http://ns.adobe.com/air/application/33.1">
<id>com.my.app</id>
<versionNumber>1.0.0</versionNumber>
<filename>MyApplication</filename>
<name>My Application</name>
<initialWindow>
<content>[]</content>
<visible>true</visible>
<fullScreen>false</fullScreen>
<autoOrients>false</autoOrients>
@marchbold
marchbold / distriqt.extension.adverts.initialisation.as
Created December 1, 2020 00:58
Adverts AdMob Open Bidding initialisation
Adverts.service.addEventListener( AdvertsEvent.INITIALISED, initialisedHandler );
Adverts.service.initialise();
function initialisedHandler( event:AdvertsEvent ):void
{
for each (var adapterStatus:AdapterStatus in e.adapterStatus)
{
trace( "adapter: " + adapterStatus.name + " : " + adapterStatus.state + " [" + adapterStatus.latency + "] - " + adapterStatus.description );
}
@marchbold
marchbold / keyboardtest.as
Created November 27, 2020 03:21
Simple starling text input test case for the Application ANE keyboard show helper
// Init keyboard monitoring
Application.service.display.setDisplayMode( DisplayMode.NORMAL );
Application.service.keyboard.init();
FeathersControl.defaultTextEditorFactory = function():ITextEditor {
var editorMobile:StageTextTextEditor = new StageTextTextEditor();
editorMobile.fontSize = 50;
editorMobile.maintainTouchFocus = true;
return editorMobile;
};
@marchbold
marchbold / WebViewNative.as
Created October 2, 2020 06:50
Feathers WebView implementation utilising the NativeWebView for improved compatibility and performance
/**
* __ __ __
* ____/ /_ ____/ /______ _ ___ / /_
* / __ / / ___/ __/ ___/ / __ `/ __/
* / /_/ / (__ ) / / / / / /_/ / /
* \__,_/_/____/_/ /_/ /_/\__, /_/
* / /
* \/
* http://distriqt.com
*
@marchbold
marchbold / distriqt.extension.inappbilling.inappupdates.as
Created September 22, 2020 06:09
Use InAppBilling to check for updates
InAppBilling.service.inAppUpdates.addEventListener( InAppUpdatesEvent.CHECK_APP_UPDATES_SUCCESS, successHandler );
// Perform the updates check
InAppBilling.service.inAppUpdates.checkAppUpdate();
function successHandler( event:InAppUpdatesEvent ):void
{
if (event.updateAvailability == InAppUpdateAvailablity.UPDATE_AVAILABLE)
{