| | |
| | | return instance; |
| | | } |
| | | |
| | | public void initData(Activity activity, String appKey, String secretKey, boolean isChina) { |
| | | public void initData(Activity activity, String appKey, String secretKey,String url) { |
| | | this.activity = activity; |
| | | MediaPlayHelper.initContext(activity.getApplication().getApplicationContext()); |
| | | ClassInstanceManager.newInstance().init(activity.getApplication()); |
| | | String mUrl; |
| | | if (isChina) { |
| | | // mAppSecret = "f869433de68a4a06bb8f9bb89118fc"; |
| | | // mAppid = "lc2ea929282d5f4636"; |
| | | mUrl = CONST.Envirment.CHINA_TEST.url; |
| | | ProviderManager.getAppProvider().setAppType(0); |
| | | } else { |
| | | ClassInstanceManager.newInstance().init(activity.getApplication().getApplicationContext()); |
| | | // if (isChina) { |
| | | //// mAppSecret = "f869433de68a4a06bb8f9bb89118fc"; |
| | | //// mAppid = "lc2ea929282d5f4636"; |
| | | // mUrl = CONST.Envirment.CHINA_TEST.url; |
| | | // ProviderManager.getAppProvider().setAppType(0); |
| | | // } else { |
| | | // mAppSecret = "017fc27bb987496f9a677e4e6f0c88"; |
| | | // mAppid = "lc0285433bc7e8423d"; |
| | | // mUrl = CONST.Envirment.OVERSEAS_PRO.url; |
| | | mUrl=CONST.Envirment.CHINA_TEST.url; |
| | | ProviderManager.getAppProvider().setAppType(1); |
| | | } |
| | | ProviderManager.getAppProvider().setAppType(1); |
| | | // } |
| | | |
| | | |
| | | |
| | | try { |
| | | CommonParam commonParam = new CommonParam(); |
| | | commonParam.setEnvirment(mUrl);//云端连接 |
| | | commonParam.setEnvirment(url);//云端连接 |
| | | commonParam.setContext(activity.getApplication()); |
| | | commonParam.setAppId(appKey); |
| | | commonParam.setAppSecret(secretKey); |