這期內(nèi)容當中小編將會給大家?guī)碛嘘P(guān)Android開發(fā)中怎么獲取瀏覽器當前頁面的截圖,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
首先,新建一個 BrowserScreenShotActivity.java,在 AndroidManifest.xml 注冊一下 <intent-filter>。
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.littlejie.demo"> <!-- 讀寫權(quán)限 --> <!-- 用于讀取瀏覽器分享時生成的屏幕截圖 --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <application android:name=".modules.DemoApplication" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <!-- some other thing --> <!-- 注冊 Intent,用于接受瀏覽器分享 --> <activity android:name=".modules.advance.BrowserScreenShotActivity" android:launchMode="singleTask"> <intent-filter> <action android:name="android.intent.action.SEND"/> <!-- 發(fā)送多個數(shù)據(jù) --> <action android:name="android.intent.action.SEND_MULTIPLE"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="*/*"/> </intent-filter> </activity> </application> </manifest>
網(wǎng)站標題:Android開發(fā)中怎么獲取瀏覽器當前頁面的截圖-創(chuàng)新互聯(lián)
當前URL:http://www.rwnh.cn/article46/ddoeeg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、定制網(wǎng)站、企業(yè)網(wǎng)站制作、自適應(yīng)網(wǎng)站、外貿(mào)網(wǎng)站建設(shè)、網(wǎng)站策劃
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容