Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to you this ane(com.mm.ane)? #1

Open
ajhonson opened this issue Apr 23, 2014 · 1 comment
Open

how to you this ane(com.mm.ane)? #1

ajhonson opened this issue Apr 23, 2014 · 1 comment

Comments

@ajhonson
Copy link

why i make the project with flash cs6,the ane can't be init?

when is call "MMExtension.getInstance().MMInit("300007180353", "956434F022E4872D", "0000000000", 1, "Paycode", "ProductNUM", 1);",the app will trace the Error"init

handler_status
level:MMBillInit:try_init:null,code:MMBillInit
------------------"
then i call "MMExtension.getInstance().MMBilling(30000718035301);" the app will trace the Error"handler_status
level:MMBill:Another request is processing,code:MMBill
------------------"
I have make the "mmiap" folder into the app

can you tell me where is wrong?

my source is:
package {

import flash.display.MovieClip;
import flash.events.Event;
import com.mm.ane.MMExtension;
import flash.events.*;
//import com.sg.ane.mm.*;
public class Main extends MovieClip {


    public function Main() {
        // constructor code
        this.addEventListener(MouseEvent.CLICK, sdk_handle);
        //for()
        this.addEventListener(Event.ADDED_TO_STAGE, addet);
    }
    private function addet(e:Event) {
        MMExtension.getInstance().addEventListener(StatusEvent.STATUS,handler_status);
    }
    private function handler_status($evt:StatusEvent):void
    {
        showInfo('------------------');
        showInfo('handler_status');
        showInfo('level:', $evt.level, ',code:', $evt.code);
        showInfo('------------------');
    }
    protected function handler_getStorageBTNclick($evt:MouseEvent):void
    {
        clearInfo();
        showInfo('====================');
        showInfo('====================');
        showInfo('====================');
    }


    protected function handler_getSystemInfoBTNclick($evt:MouseEvent):void
    {
        clearInfo();

    }

    protected function handler_getPackageInfoBTNclick($evt:MouseEvent):void
    {
        showInfo('====================');

    }
    private function showInfo(...$args):void
    {
        var __info:String = '';
        for (var i:int = 0; i < $args.length; i++) 
        {
            __info += $args[i] ;
        }
        trace(i)
        infoTA.appendText(__info);
        infoTA.appendText("\n");
    }



    private function clearInfo():void
    {
        infoTA.text = '';
    }
    protected function sdk_handle(event:MouseEvent):void
        {
            var b = event.target;
            trace(b.name)
            //return;
            switch(b.name)
            {

                case "init":
                    showInfo("init");
                    //MMExtension.getInstance().MMInit("00000000000","00000000000","00000000000",1,"Paycode","ProductNUM",1);
                    MMExtension.getInstance().MMInit("300007180353", "956434F022E4872D", "0000000000", 1, "Paycode", "ProductNUM", 1);

                    break;

                case "bill":
                    showInfo("bill");
                    //MMExtension.getInstance().MMBilling(0);
                    MMExtension.getInstance().MMBilling(30000718035301);
                    break;



                case "query":
                    showInfo("query");
                    //MMExtension.getInstance().MMQuery(0);
                    MMExtension.getInstance().MMQuery(30000718035301);
                    break;

                case "billnext":
                    showInfo("billnext");
                    //MMExtension.getInstance().MMBillingNext(0);
                    MMExtension.getInstance().MMBillingNext(30000718035301);
                    break;

                case "clean":
                    showInfo("clean");
                    //MMExtension.getInstance().MMClean(0);
                    MMExtension.getInstance().MMClean(30000718035301);
                    break;


                case "exits":
                    showInfo("exits");
                    //MMExtension.getInstance().MMUnusb(0);
                    MMExtension.getInstance().MMUnusb(30000718035301);
                    break;

            }
        }
}

}

@recter
Copy link
Contributor

recter commented Apr 24, 2014

@ajhonson
我检查了你给我发的附件,发现你的APK根目录没有相应文件.详细的你可以对比:
https://github.com/platformanes/androidMM/blob/master/aneTest/mmNew.apk 根目录
和你打包的APK根目录

然后你会发现你有三个文件没打包进APK:
CopyrightDeclaration.xml
mmiap.xml
VERSION

把这三个文件打包进APK跟目录的方法有很多中.详细查看README中就有一种:
https://github.com/platformanes/androidMM/blob/master/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants