Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.util.Log;

public class Main {
    private static final String TAG = "BridgeUtil";
    final static String PANDO_RETURN_DATA = "pando://invoke/";
    final static String EMPTY_STR = "";
    final static String SPLIT_MARK = "/";

    public static String getFunctionFromReturnUrl(String url) {

        Log.e(TAG, "getFunctionFromReturnUrl  url=>" + url);

        String temp = url.replace(PANDO_RETURN_DATA, EMPTY_STR);
        String[] fuctionAndData = temp.split(SPLIT_MARK);
        if (fuctionAndData != null && fuctionAndData.length >= 1) {
            return fuctionAndData[0];
        }
        return null;
    }
}