package com.zzliaoyuan.decorate_touch.activity;

import android.net.Uri;
import android.os.Bundle;
import android.util.Log;

import com.zzliaoyuan.decorate_touch.MainApplication;
import com.zzliaoyuan.decorate_touch.R;

import androidx.appcompat.app.AppCompatActivity;

public class JumpActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_jump);

        Log.d("JumpActivity", "********************JumpActivity");
        Uri uri = getIntent().getData();
        if (uri != null) {
            //String url = uri.toString();
            String type = uri.getQueryParameter("type");
            String id = uri.getQueryParameter("id");

            String msg = "?type="+type+"&id="+id;

            Log.d("JumpActivity", msg);

            MainApplication.GetReactPackage().reactModule.sendMsgToRN("JumpFromAndroid", msg);
        }
        finish();
    }
}
