| | |
| | | import com.umeng.commonsdk.UMConfigure; |
| | | import com.umeng.socialize.PlatformConfig; |
| | | import com.umeng.socialize.UMShareAPI; |
| | | import com.weikou.beibeivideo.ui.push.PushOpenClickActivity; |
| | | import com.weikou.beibeivideo.util.BeibeiConstant; |
| | | import com.weikou.beibeivideo.util.CrashHandler; |
| | | import com.weikou.beibeivideo.util.FunshionConstant; |
| | | import com.weikou.beibeivideo.util.ad.TTAdManagerHolder; |
| | | import com.weikou.beibeivideo.util.downutil.StringUtils; |
| | | import com.yeshi.push.PushUtil; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | import cn.jpush.android.api.JPushInterface; |
| | | |
| | | public class BeibeiVideoApplication extends Application { |
| | | |
| | |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | //极光推送 |
| | | JPushInterface.setDebugMode(true); |
| | | JPushInterface.init(this); |
| | | //推送 |
| | | PushUtil.inintPush(this, new PushUtil.ITokenListener() { |
| | | |
| | | @Override |
| | | public void onToken(String romType, String regId) { |
| | | BeibeiVideoAPI.pushBindToken(application, romType, regId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | |
| | | } |
| | | },true); |
| | | } |
| | | }); |
| | | |
| | | Intent intent = new Intent(this, PushOpenClickActivity.class); |
| | | intent.putExtra("activity", "test"); |
| | | JSONObject params = new JSONObject(); |
| | | try { |
| | | params.put("id", "123123"); |
| | | } catch (JSONException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | intent.putExtra("params", params.toString()); |
| | | String uriString = intent.toUri(Intent.URI_INTENT_SCHEME); |
| | | Log.i(TAG, uriString); |
| | | } |
| | | |
| | | |