npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

com.amanotes.acm

v2.1.17

Published

ACM SDK is a free library from Amanotes provides an efficient way to access Amanotes's content store.

Downloads

49

Readme

Amanotes ACM SDK

Before you begin

ACM SDK is a free library from Amanotes provides an efficient way to access Amanotes's content store.

How does it work?

ACM SDK help you to download any content (mp3 files, level design etc.) of your game from Amanotes Content Store, manage content of your game, provide analytics to help you understand your game better. ACM SDK also provide an easy way for your to update your game's content without update a new game version.

Setup ACM SDK for your game

Add npm registry at the top of ./Packages/manifest.json, then add com.amanotes.acm package at the end of dependencies block. You can get lastest version here

{
    "scopedRegistries": [{
        "name": "Amanotes",
        "url": "https://registry.npmjs.org/",
        "scopes": [
            "com.amanotes"
        ]
    }],

    "dependencies": {
        // Others config goes here
        ...
        "com.amanotes.acm" : "<lastest_version>"
    }
}

For Android

Update your AndroidManifest.xml (You can find it in /Assets/Plugins/Android/AndroidManifest.xml. If it's not exist, go to \Editor\Data\PlaybackEngines\AndroidPlayer\Apk, Copy the AndroidManifest.xml file to your Assets\Plugins\Android)

/**
 * Add android:usesCleartextTraffic="true" inside your <application> tag
 * Add uses-library at the end of <application> tag, before </application>
 * Add uses-permission at the end of <manifest> tag, before </manifest>
 */

<manifest>
    <application 
        ... 
        android:usesCleartextTraffic="true"
        ...
    >
        ...
        <uses-library android:name="org.apache.http.legacy" android:required="false" />
    </application>
    
    ...
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

Add ACM SDK to your app

Import ACM package

using Amanotes.ACM;

Init ACM SDK, typically in your very first init scene of you game

/**
 * Init ACM SDK
 * Provide callback functions to listen result from ACM SDK initialize process
 *
 * @param  key   key provided by Amanotes team
 * @param  OnInitFail   callback function when ACM SDK initialize failed
 * @param  OnInitSuccess   callback function when ACM SDK initialize success
 */
ACMSDK.Instance.Initialize(key, OnInitFail , OnInitSuccess);

/**
 * Callback when ACM SDK init failed
 */
public void OnInitFail()
{
}
 
/**
 * Callback when ACM SDK init success
 * @return  config  the config info of your game
 */
public void OnInitSuccess(InitConfig config)
{
}

Download Mp3 content from Amanotes Content Store

/**
 * Download Mp3 content
 *
 * @param  songID   ID of the content which you want to download
 * @param  OnCompleteMp3Fail   callback function when mp3 content download failed
 * @param  OnCompleteMp3Success   callback function when mp3 content download success
 */
ACMSDK.Instance.GetFileMp3(songID, OnCompleteMp3Fail, OnCompleteMp3Success);
 
/**
 * Callback when mp3 content download success
 * @return  extraInfoDownload   the information of downloaded mp3 content
 * @return  path    the local path of your downloaded mp3 content
 */
private void OnCompleteMp3Success(ExtraInfoDownload extraInfoDownload, string path)
{
    Debug.Log("OnCompleteMp3Success " + path);
}
 
/**
 * Callback when mp3 content download failed
 * @return  data    the error message
 */
private void OnCompleteMp3Fail(string data)
{
    Debug.Log("OnCompleteMp3Fail " + data);
}

Download Midi content from Amanotes Content Store

/**
 * Download Midi content
 *
 * @param  songID   ID of the content which you want to download
 * @param  OnCompleteMidiFail   callback function when Midi content download failed
 * @param  OnCompleteMidiSuccess   callback function when Midi content download success
 */
ACMSDK.Instance.GetFileMidi(songID, OnCompleteMidiFail, OnCompleteMidiSuccess);
 
/**
 * Callback when Midi content download success
 * @return  extraInfoDownload   the information of downloaded mp3 content
 * @return  path    the local path of your downloaded mp3 content
 */
private void OnCompleteMidiSuccess(ExtraInfoDownload extraInfoDownload, string path)
{
}
 
/**
 * Callback when Midi content download failed
 * @return  data    the error message
 */
private void OnCompleteMidiFail(string data)
{
}

Log Events

Song Request

Triggered when user choose a song to play

/**
 * Triggered when user choose a song to play
 *
 * @param  songID   ID of the Song you are playing
 */
ACMSDK.Instance.SendEventSongRequest(songID);

Song Start

Triggered when the game finish initializes the Action phase of level/song. Including Action phase in tutorial, tap on Play from Main Screen, Retry. Not including: Revive to continue.

/**
 * Call this function when game is loading finish a game level and start playing
 *
 * @param  songID   ID of the Song you are playing
 * @param  level   the level of this song
 * @param  unlock   unlock condition for the song, with the following values:
 *                  - Default: unlocked automatically.
 *                  - Progression: Unlocked by completing previous level and satisfying the other requirement (percentages/challenges...)
 *                  - Ads: Unlocked by watching a number of reward video ads.
 *                  - SC: bought with soft currency
 *                  - HC: bought with hard currency
 *                  - Gift: songs unlocked by participating in ingame event.
 */
ACMSDK.Instance.SendEventSongStart(songID, level, unlock);

Song End

Triggered when user clear/complete a level (including tutorial). In games with endless mode and the song are looped, fire the event when the song complete in the first time.

/**
 * Call this function when game is loading finish a game level and start playing
 *
 * @param  songID   ID of the Song you are playing
 * @param  level   the level of this song
 * @param  unlock   unlock condition for the song, with the following values:
 *                  - Default: unlocked automatically.
 *                  - Progression: Unlocked by completing previous level and satisfying the other requirement (percentages/challenges...)
 *                  - Ads: Unlocked by watching a number of reward video ads.
 *                  - SC: bought with soft currency
 *                  - HC: bought with hard currency
 *                  - Gift: songs unlocked by participating in ingame event.
 */
ACMSDK.Instance.SendEventSongEnd(songID, level, unlock);

Song Result

Triggered when the player reaches Result Screen.

/**
 * Triggered when the player reaches Result Screen.
 *
 * @param  songID   ID of the Song you are playing
 * @param  level   the level of this song
 * @param  unlock   unlock condition for the song, with the following values:
 *                  - Default: unlocked automatically.
 *                  - Progression: Unlocked by completing previous level and satisfying the other requirement (percentages/challenges...)
 *                  - Ads: Unlocked by watching a number of reward video ads.
 *                  - SC: bought with soft currency
 *                  - HC: bought with hard currency
 *                  - Gift: songs unlocked by participating in ingame event.
 * @param  playtime   Playing time in seconds since the start of the level, not including time spent watching ads
 */
ACMSDK.Instance.SendEventSongResult(songID, level, unlock, playtime);

Song Fail

Triggered every time a player fail in a level (even if he would revive with reward video after), including failing after revival

/**
 * Triggered every time a player fail in a level (even if he would revive with reward video after), including failing after revival.
 *
 * @param  songID   ID of the Song you are playing
 * @param  level   the level of this song
 * @param  unlock   unlock condition for the song, with the following values:
 *                  - Default: unlocked automatically.
 *                  - Progression: Unlocked by completing previous level and satisfying the other requirement (percentages/challenges...)
 *                  - Ads: Unlocked by watching a number of reward video ads.
 *                  - SC: bought with soft currency
 *                  - HC: bought with hard currency
 *                  - Gift: songs unlocked by participating in ingame event.
 */
ACMSDK.Instance.SendEventSongFail(songID, level, unlock);

Versioning

We use SemVer for versioning.

License

This project is licensed under the MIT License - see the LICENSE.md file for details