网络浏览器:如何调用android app QR Code扫描仪以获取扫描结果

时间:2019-07-19 19:32:23

标签: android google-chrome web qr-code

网络浏览器:如何调用Android应用QR码扫描仪以获取扫描结果?

USE [Test_DB]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Chains]
(
    **[Chain_ID]** [INT] IDENTITY(1001,1) NOT NULL,
    [Chain_Name] [NVARCHAR](50) NOT NULL,

    CONSTRAINT [PK__ChainID] 
        PRIMARY KEY CLUSTERED ([Chain_ID] ASC)
                    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, 
                          IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, 
                          ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Stores]
(
    **[Chain_ID]** [INT] NOT NULL,
    **[Store_ID]** [INT] NOT NULL,
    [Store_Name] [NVARCHAR](50) NULL,

    CONSTRAINT [PK__ChainID_StoreID] 
        PRIMARY KEY CLUSTERED ([Chain_ID] ASC, [Store_ID] ASC)
                    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, 
                          IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, 
                          ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Machines]
(
    [Machine_ID] [INT] IDENTITY(10001,1) NOT NULL,
    **[Chain_ID]** [INT] NOT NULL,
    **[Store_ID]** [INT] NOT NULL,
    [Status] [NVARCHAR](10) NULL,
    [Comments] [NVARCHAR](200) NULL,

    CONSTRAINT [PK__MachineID] 
        PRIMARY KEY CLUSTERED ([Machine_ID] ASC)
                    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, 
                          IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, 
                          ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Machines] WITH CHECK 
    ADD CONSTRAINT [FK__Machines_Stores] 
        FOREIGN KEY ([Chain_ID], [Store_ID])
        REFERENCES [dbo].[Stores] ([Chain_ID], [Store_ID])
            ON UPDATE CASCADE
GO

ALTER TABLE [dbo].[Machines] CHECK CONSTRAINT [FK__Machines_Stores]
GO

CREATE TABLE [dbo].[Assemblies]
(
    [Serial_Number] [NVARCHAR](11) NOT NULL,
    [Machine_ID] [INT] NOT NULL,
    **[Chain_ID]** [INT] NOT NULL,
    **[Store_ID]** [INT] NOT NULL,
    [Equipment_Type] [NVARCHAR](42) NULL,
    [Status] [NVARCHAR](10) NULL,

    CONSTRAINT [PK__Serial_Number] 
        PRIMARY KEY CLUSTERED ([Serial_Number] ASC)
                    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, 
                          IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, 
                          ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Assemblies]  WITH CHECK 
    ADD CONSTRAINT [FK__Assemblies_Machines] 
        FOREIGN KEY([Machine_ID])
        REFERENCES [dbo].[Test_DB] ([Machine_ID])
            ON UPDATE CASCADE
GO

ALTER TABLE [dbo].[Assemblies] CHECK CONSTRAINT [FK__Assemblies_Machines]
GO

网络能否从Android原生应用获取结果?

1 个答案:

答案 0 :(得分:0)

您需要解释有关您问题的更多信息,但是我想您需要在用户单击链接时打开QR Code应用程序。因此,请在您的应用程序中尝试此操作,并设置一个特定的链接以打开您的应用程序

 <activity
            android:name=".Activity"
            android:label="NAME"
            android:parentActivityName=".MainActivity">
            <intent-filter
                android:autoVerify="true"
                android:label="App Name">
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="webpagelink.in"
                    android:path="/qrcode"
                    android:scheme="http" />
            </intent-filter>
        </activity>