在app內(nèi)調(diào)用oppo默認(rèn)瀏覽器時(shí),發(fā)現(xiàn)url重定向時(shí)無(wú)法調(diào)起, 我是這樣做的
Intent intent = Intent.parseUri(url, 0);
startActivity(intent);
測(cè)試發(fā)現(xiàn):
1.url換成“http://www.baidu.com”時(shí)能正常調(diào)起oppo的默認(rèn)瀏覽器
2.在oppo手機(jī)中設(shè)置其他第三方瀏覽器如UC瀏覽器、QQ瀏覽器等為默認(rèn)瀏覽器時(shí),均正常調(diào)起
3.拷貝帶有重定向的url,直接粘貼在oppo默認(rèn)瀏覽器的地址欄,可以正常打開(kāi)
4.使用Intent.createChooser調(diào)起選擇器時(shí),選擇oppo默認(rèn)瀏覽器時(shí)會(huì)打開(kāi)其他瀏覽器而非默認(rèn)
5.僅oppo無(wú)法調(diào)起,其他手機(jī)均正常?。?!
當(dāng)然,僅在測(cè)試中發(fā)現(xiàn)這種現(xiàn)象,不清楚直接原因是不是由url重定向引起的
注:以上說(shuō)的默認(rèn)瀏覽器都是指oppo手機(jī)自帶的oppo瀏覽器
測(cè)試手機(jī)是oppo R9m,Android版本號(hào)5.1,其他版本oppo應(yīng)該可重現(xiàn)
提供一個(gè)測(cè)試url=
"http://e.cn.miaozhen.com/r/k=2069565&p=7CPXn&dx=__IPDX__&rt=2&ns=__IP__&ni=__IESID__&v=__LOC__&xa=__ADPLATFORM__&tr=__REQUESTID__&mo=__OS__&m0=__OPENUDID__&m0a=__DUID__&m1=__ANDROIDID1__&m1a=__ANDROIDID__&m2=__IMEI__&m4=__AAID__&m5=__IDFA__&m6=__MAC1__&m6a=__MAC__&vo=3400c408&vr=2&o=http%3A%2F%2Fcnydigital.ferrero-praline.com.cn%2Fenter%3Fmz_ca%3D2069565%26mz_sp%3D7CPXn"
請(qǐng)問(wèn)是我調(diào)起方式不對(duì)還是有其他原因
默認(rèn)瀏覽器:
Intent intent = new Intent(ACTION_VIEW, Uri.parse("網(wǎng)址"));
startActivity(intent);
外部瀏覽器:
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.setData(Uri.parse("鏈接"));
intent.setClassName("com.android.browser","com.android.browser.BrowserActivity"); startActivity(intent);
幾個(gè)常見(jiàn)
uc瀏覽器":"com.uc.browser", "com.uc.browser.ActivityUpdate"
opera:"com.opera.mini.android", "com.opera.mini.android.Browser"
qq瀏覽器:"com.tencent.mtt", "com.tencent.mtt.MainActivity"
北大青鳥(niǎo)APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國(guó)家
北大青鳥(niǎo)中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開(kāi)發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_(kāi)發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開(kāi)發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開(kāi)發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開(kāi)發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。