# nfc-chcker-app **Repository Path**: ThreeArcMan/nfc-chcker-app ## Basic Information - **Project Name**: nfc-chcker-app - **Description**: NFC巡检APP - **Primary Language**: Android - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-05 - **Last Updated**: 2025-02-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README package com.example.myapp; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; public class TargetActivity extends AppCompatActivity { private TextView textView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_target); textView = findViewById(R.id.textView); // 获取隐式 Intent 传递的 URI 数据 Intent intent = getIntent(); if (intent != null) { Uri uri = intent.getData(); if (uri != null) { String url = uri.toString(); // 获取完整的 URL String host = uri.getHost(); // 获取主机名 (例如 example.com) String path = uri.getPath(); // 获取路径部分 (例如 /somepath) // 获取查询参数(比如 key=value) String keyValue = uri.getQueryParameter("key"); // 显示提取的数据 String displayText = "URL: " + url + "\nHost: " + host + "\nPath: " + path + "\nKey Value: " + keyValue; textView.setText(displayText); } } } }