[Android]企业多个APP统一Launcher平台方案

2018年02月10日 Android 18条评论 阅读4161次


集团内多个APP,在终端用户手机上安装后出来了多个应用图标,并且应用图标基本都是企业logo,给用户带来了不少麻烦。
基于此场景,希望做一个统一入口,安装个APP后用户手机上只有一个应用,通过该统一的应用,跳转进入到之前的各APP中。各个APP还是有各自开发商负责更新维护。

虽然单独APP有各种各样的开发模式,原生/H5/RN等,但最为这个统一入口的APP,我们还是希望用原生开发,毕竟后续的跳转都要依赖原生的API来实现。
既然必须依靠原生实现,Android和iOS必然是单独写了,本文只介绍Android的实现思路。

问题1:应用安装后隐藏应用图标
 采用的方法,在AndroidManifest.xml文件,为主Activity的<intent-filter>中增加如下设置:


<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="test" android:scheme="xapp" />

最后看起来应该是这个样子的



<activity
    android:name=".MainActivity"
    android:label="@string/app_name">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <action android:name="android.intent.action.VIEW"></action>
        <category android:name="android.intent.category.DEFAULT"></category>
        <category android:name="android.intent.category.BROWSABLE"></category>
        <data android:host="jileniao.net" android:scheme="app" />
    </intent-filter>
</activity>

关于intent-filter中的data内容,解释如下:
data用于把数据规范添加到一个Intent过滤器中,数据规范能够只是数据类型(mimeType属性)、或数据位置标识(URI),也可以是数据类型和数据位置标识(URI)。一个URI(如下格式)被分成几个独立的属性来分别指定:


scheme://host:port/pathorpathPrefix|pathPattern


问题2:通过统一入口APP启动其他APP

自己的APP调用起其他APP,方法很多了,并不是难点。这里仅仅记录下我用到的方法,也是和第1个问题的结合。

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("app://jileniao.net"));
intent.putExtra("JILENIAO_APP", "jileniao.net");
MainActivity.this.startActivity(intent);

如果想传递参数,和正常Intent传值一样,intent中设置即可。

解决了上面两个问题,就基本实现了原始的几个业务APP安装后自动隐藏在用户手机Launcher中,最终的进入是在统一入口APP中。

后话,APP层面是这样解决了,但用户登录如何统一起来仍是个大问题。每个APP都要单独登录一次对用户来说确实虐心。

参考文章:
http://blog.csdn.net/xc765926174/article/details/51397847





分享本文至:

WRITTEN BY

avatar
本文标签:androiddata
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

18 条评论

  1. <a href="http://www.tailflappers.com/kyrie-1-opening-night-for-salg-schuheb">kyrie 1 opening night for salg</a> <a href="http://www.tranhkhoathan.com/nike-free-run-2-marinen-and-hvit-queen-butyf">nike free run 2 marinen and hvit queen</a> <a href="http://www.beachtimenow.com/nike-free-3.0-flyknit-volt-noir-turquoise-vert-zone-butyf">nike free 3.0 flyknit volt noir turquoise vert zone</a> <a href="http://www.blogdalata.com/jordan-7-gold-pack-obuvf">jordan 7 gold pack</a> <a href="http://www.boosnbrews.com/nike-free-run-4.0-marr%C3%B3n-azul-obuve">nike free run 4.0 marr贸n azul</a> <a href="http://www.eventyrklub.com/kd-8-floral-for-venta-jacksonville-fl-kurpesg">kd 8 floral for venta jacksonville fl</a>
    hepalmak http://www.hepalmak.com/

  2. <a href="http://www.bladeid.com/nike-zoom-cabos-guld-lilla-obuvc">nike zoom cabos guld lilla</a> <a href="http://www.bakomoms.com/jordan-4-grau-gelb-kurpesb">jordan 4 grau gelb</a> <a href="http://www.macrackmount.com/adidas-zx-750-gituttio-kitchen-kurpesd">adidas zx 750 gituttio kitchen</a> <a href="http://www.martinsedacca.com/nike-air-max2-cb-94-wei%C3%9F-rot-kurpesc">nike air max2 cb 94 wei脽 rot</a> <a href="http://www.maxibymaxi.com/herren-nike-roshe-run-slip-rot-schwarz-scarped">herren nike roshe run slip rot schwarz</a> <a href="http://www.slatervision.com/nike-kobe-zoom-6-vert-mamba-lite-schuhee">nike kobe zoom 6 vert mamba lite</a>
    jazzoutlaw http://www.jazzoutlaw.com/

  3. <a href="http://www.wuxiangtaichi.com/air-jordan-retro-10-kvinners-himmelen-bl%C3%A5-s%C3%B8lv-obuvl">air jordan retro 10 kvinners himmelen bl氓 s酶lv</a> <a href="http://www.culdesacmag.com/air-jordan-3-retro-lyser%C3%B8d-skoj">air jordan 3 retro lyser酶d</a> <a href="http://www.livinggreedy.com/femminile-nike-zoom-pegasus-31-bianca-oro-scarpel">femminile nike zoom pegasus 31 bianca oro</a> <a href="http://www.clickstroy.com/womens-nike-air-max-tailwind-6-blue-gold-shoesj">womens nike air max tailwind 6 blue gold</a> <a href="http://www.zotorrent.com/air-jordan-retro-13-lilla-s%C3%B8lv-skok">air jordan retro 13 lilla s酶lv</a> <a href="http://www.viptarimas.com/air-jordan-retro-11-rosa-mint-gr%C3%B8nn-obuvp">air jordan retro 11 rosa mint gr酶nn</a>
    cacikvideo http://www.cacikvideo.com/

  4. <a href="http://www.sigaldavid.com/adidas-neo-leisure-blanc-violet-kurpesc">adidas neo leisure blanc violet</a> <a href="http://www.souvkaretbdg.com/air-jordan-12-retro-violet-and-schwarz-pants-obuvf">air jordan 12 retro violet and schwarz pants</a> <a href="http://www.busancitynews.com/air-jordan-true-flight-blau-wei%C3%9F-elephant-scarped">air jordan true flight blau wei脽 elephant</a> <a href="http://www.cigarlogbook.com/nike-air-max-2013-neon-volt-svart-l%C3%B8ping-sko-butya">nike air max 2013 neon volt svart l酶ping sko</a> <a href="http://www.dineet.com/herren-asics-gel-noosa-tri-9-wei%C3%9F-silber-chaussurese">herren asics gel noosa tri 9 wei脽 silber</a> <a href="http://www.glamlustlife.com/nike-kd-7-blanco-obsidian-university-rojo-butya">nike kd 7 blanco obsidian university rojo</a>
    lubminbrandov http://www.lubminbrandov.com/

  5. <a href="http://www.prestonacuk.com/elite-matt-slauson-jersey-chicago-bears-68-alternate-orange-nflb">elite matt slauson jersey chicago bears 68 alternate orange</a> <a href="http://www.westonmaster.com/adidas-model-superstar-skot">adidas model superstar</a> <a href="http://www.tadejvaljavec.com/for-air-jordan-11-trainersf">for air jordan 11</a> <a href="http://www.igbohoohaa.com/air-jordan-retro-11-argent-violet-chaussuresa">air jordan retro 11 argent violet</a> <a href="http://www.baccoating.com/lunarglide-7-purple-jeep-footg">lunarglide 7 purple jeep</a> <a href="http://www.expochacra.com/slim-fit-long-sleeve-polo-shirts-for-m%C3%A6nd-polo_m">slim fit long sleeve polo shirts for m忙nd</a>
    labelworking http://www.labelworking.com/

  6. <a href="http://www.lonmorris.net/adidas-neo-hvid-and-gr%C3%B8n-butye">adidas neo hvid and gr酶n</a> <a href="http://www.lovegreatdeals.net/nike-jordan-3-fire-rosso-kurpesc">nike jordan 3 fire rosso</a> <a href="http://www.lyricensemble.net/mujeres-nike-flyknit-lunar-1-todas-rojo-butya">mujeres nike flyknit lunar 1 todas rojo</a> <a href="http://www.magascene.net/nike-air-huarache-bleu-sail-schuheg">nike air huarache bleu sail</a> <a href="http://www.mallgame.net/kobe-11-university-r%C3%B8d-oak-butyf">kobe 11 university r酶d oak</a> <a href="http://www.matthewstone.net/dam%C3%A4nner-nike-free-3.0-kaffee-butya">dam盲nner nike free 3.0 kaffee</a>
    poeticfaith http://www.poeticfaith.net/

  7. <a href="http://www.bebezazou.com/nike-zoom-train-action-verde-marr%C3%B3n-scarpea">nike zoom train action verde marr贸n</a> <a href="http://www.colixguides.com/air-huarache-metalleic-silber-coin-schuheb">air huarache metalleic silber coin</a> <a href="http://www.gleisquadrat.com/maschio-nike-air-rejuven8-mule-verde-rosa-butye">maschio nike air rejuven8 mule verde rosa</a> <a href="http://www.govolsrealtor.com/lebron-soldier-9-hyper-arancia-gituttio-butye">lebron soldier 9 hyper arancia gituttio</a> <a href="http://www.klarinetto.com/nike-lebron-14-dark-blu-oro-rosso-obuve">nike lebron 14 dark blu oro rosso</a> <a href="http://www.magnitudezero.com/nike-lebron-12-low-hvit-office-obuvd">nike lebron 12 low hvit office</a>
    talkofig http://www.talkofig.com/

  8. avatar biddingstream

    <a href="http://www.mandydugan.com/kvinders-air-jordan-retro-10-hvid-r%C3%B8d-skok">kvinders air jordan retro 10 hvid r酶d</a> <a href="http://www.dxnkofe.com/kvinners-nike-zoom-pegasus-31-himmelen-bl%C3%A5-obuvp">kvinners nike zoom pegasus 31 himmelen bl氓</a> <a href="http://www.yurasmirnov.com/nike-af1-lunar-black-shoesi">nike af1 lunar black</a> <a href="http://www.blovese.com/nike-air-max-tailwind-6-guld-sort-skoj">nike air max tailwind 6 guld sort</a> <a href="http://www.ztsurfboards.com/nike-dunk-hvit-himmelen-bl%C3%A5-obuvi">nike dunk hvit himmelen bl氓</a> <a href="http://www.visheshcap.com/air-jordan-future-gr%C3%B8nn-r%C3%B8d-obuvp">air jordan future gr酶nn r酶d</a>
    biddingstream http://www.biddingstream.com/

  9. avatar glamlustlife

    <a href="http://www.dronesofusa.com/adidas-chicago-bulls-jersey-nflx">adidas chicago bulls jersey</a> <a href="http://www.eonkraftwerke.com/nike-brandon-lafell-mens-white-limited-jersey-11-nfl-road-cincinnati-bengals-nflz">nike brandon lafell mens white limited jersey 11 nfl road cincinnati bengals</a> <a href="http://www.inpaetest.com/nike-free-run-4.0-kvinders-tiffany-bl%C3%A5-version-kurpesa">nike free run 4.0 kvinders tiffany bl氓 version</a> <a href="http://www.lifepakused.com/nike-shox-current-lyser%C3%B8d-eye-butyg">nike shox current lyser酶d eye</a> <a href="http://www.offshoretent.com/nfl-ty-montgomery-mens-limited-white-jersey-88-baltimore-ravens-nike-road-vapor-untouchable-nflx">nfl ty montgomery mens limited white jersey 88 baltimore ravens nike road vapor untouchable</a> <a href="http://www.tmtfiltre.com/nike-kobe-8-argento-viola-butye">nike kobe 8 argento viola</a>
    glamlustlife http://www.glamlustlife.com/

  10. avatar avsomurie

    <a href="http://www.lvnailbar.com/air-max-rosso-tns-scarpei">air max rosso tns</a> <a href="http://www.eisenhards.com/buffalo-sabres-adidas-nhl-2nd-season-flex-cap-hath">buffalo sabres adidas nhl 2nd season flex cap</a> <a href="http://www.martinmakeup.com/noir-bleu-hommes-adidas-eqt-boost-chaussures-chaussuresh">noir bleu hommes adidas eqt boost chaussures</a> <a href="http://www.dgrabovsky.com/nike-air-2018-noir-gris-chaussuresj">nike air 2018 noir gris</a> <a href="http://www.madeinmyindia.com/nike-air-max-95-20th-anniversary-gelb-braun-wei%C3%9F-schuhek">nike air max 95 20th anniversary gelb braun wei脽</a> <a href="http://www.manglammovers.com/prescott-jersey-dallas-cowboys-nflh">prescott jersey dallas cowboys</a>
    avsomurie http://www.avsomurie.com/

  11. avatar rsvppersonnel

    <a href="http://www.findatrans.com/michael-kors-collection-crossbody-mkh">michael kors collection crossbody</a> <a href="http://www.isabellerigal.com/nike-foamposite-rosa-gul-obuvi">nike foamposite rosa gul</a> <a href="http://www.esnafkocaeli.com/nike-zoom-structure-18-grigio-blu-scarpej">nike zoom structure 18 grigio blu</a> <a href="http://www.dkdjabar.com/air-jordan-retro-2-purple-silver-shoesh">air jordan retro 2 purple silver</a> <a href="http://www.jamiecirillo.com/mujeres-nike-free-run-2-oro-p%C3%BArpura-zapatosk">mujeres nike free run 2 oro p煤rpura</a> <a href="http://www.xpostshopx.com/adidas-neo-skate-amarillo-blanco-zapatosp">adidas neo skate amarillo blanco</a>
    rsvppersonnel http://www.rsvppersonnel.com/

  12. avatar marinersdiary

    <a href="http://www.sguerradesign.com/polo-ralph-lauren-fleece-jacket-poloh">polo ralph lauren fleece jacket</a> <a href="http://www.zeneventsja.com/mens-nike-shox-deliver-purple-white-shoesi">mens nike shox deliver purple white</a> <a href="http://www.adharaweb.com/nike-lunar-cross-element-blue-shoesk">nike lunar cross element blue</a> <a href="http://www.jrelselaw.com/nike-huarache-utility-r%C3%B8d-hvit-obuvq">nike huarache utility r酶d hvit</a> <a href="http://www.intellalegal.com/nike-air-max-90-bl%C3%A5-lilla-skoj">nike air max 90 bl氓 lilla</a> <a href="http://www.carmelscoffee.com/air-jordan-reveal-argento-blu-scarpeq">air jordan reveal argento blu</a>
    marinersdiary http://www.marinersdiary.com/

  13. avatar hotelfuat

    <a href="http://www.heslaatours.com/unisex-nike-roshe-run-gr%C3%B8nn-svart-kurpesb">unisex nike roshe run gr酶nn svart</a> <a href="http://www.prostekrasna.com/new-balance-kids-zapatost">new balance kids</a> <a href="http://www.altharmony.com/girls-high-converse-shoesz">girls high converse</a> <a href="http://www.cosmicupcake.com/nike-magista-cleats-barato-basebtodas-schuheb">nike magista cleats barato basebtodas</a> <a href="http://www.btmtecled.com/womens-nike-denver-broncos-23-devontae-booker-limited-orange-rush-vapor-untouchable-nfl-jersey-nflu">womens nike denver broncos 23 devontae booker limited orange rush vapor untouchable nfl jersey</a> <a href="http://www.torcgunstore.com/adidas-tubular-shadow-light-brown-skou">adidas tubular shadow light brown</a>
    hotelfuat http://www.hotelfuat.com/

  14. avatar isnowbot

    <a href="http://www.totalterapi.com/zx-700-sort-hvid-guld-kurpesa">zx 700 sort hvid guld</a> <a href="http://www.usstatebanks.com/nike-air-max-2015-bleu-lagoon-bright-crimson-doubles-butyg">nike air max 2015 bleu lagoon bright crimson doubles</a> <a href="http://www.ceethebarber.com/nike-cavaliers-0-kevin-love-green-salute-to-service-nba-swingman-jersey-nflw">nike cavaliers 0 kevin love green salute to service nba swingman jersey</a> <a href="http://www.conradtillard.com/herre-asics-gel-sendai-2-gr%C3%A5-bl%C3%A5-butye">herre asics gel sendai 2 gr氓 bl氓</a> <a href="http://www.freemoviesaz.com/air-jordan-11-low-violet-kurpesd">air jordan 11 low violet</a> <a href="http://www.incaradio.com/ralph-lauren-grey-long-sleeve-polo-shirt-polos">ralph lauren grey long sleeve polo shirt</a>
    isnowbot http://www.isnowbot.com/

  15. avatar damoiseau

    <a href="http://www.beitgroup.net/air-jordan-retro-3-vert-brouge-butya">air jordan retro 3 vert brouge</a> <a href="http://www.belshop.net/nike-internationalist-mid-herre-sko-laces-butya">nike internationalist mid herre sko laces</a> <a href="http://www.berkshirerides.net/nike-free-5.0-v2-p%C3%BArpura-verde-obuvd">nike free 5.0 v2 p煤rpura verde</a> <a href="http://www.bgcsc.net/nike-air-max-97-plata-uk-scarpec">nike air max 97 plata uk</a> <a href="http://www.bigwhiterentals.net/nike-huarache-ultra-for-verkauf-craigslist-schuhef">nike huarache ultra for verkauf craigslist</a> <a href="http://www.bikersradio.net/nike-free-flyknit-5.0-fit-for-verkauf-scarpef">nike free flyknit 5.0 fit for verkauf</a>
    damoiseau http://www.damoiseau.net/

  16. avatar herejuice

    <a href="http://www.beertapmap.com/new-balance-576-mens-white-black-sportsd">new balance 576 mens white black</a> <a href="http://www.belroncobra.com/oakland-athletics-cap-white-punisher-hata">oakland athletics cap white punisher</a> <a href="http://www.berealto.com/ralph-lauren-polo-melbourne-number-poloa">ralph lauren polo melbourne number</a> <a href="http://www.bertankavuncu.com/blue-yellow-womens-nike-zoom-vaporfly-elite-shoes-footb">blue yellow womens nike zoom vaporfly elite shoes</a> <a href="http://www.betatodvd.com/bon-march%C3%A9-nike-zoom-train-action-hommes-bleu-sportse">bon march茅 nike zoom train action hommes bleu</a> <a href="http://www.bigmuzik.com/pandora-jewelry-sale-co-uk-ltd-pandorac">pandora jewelry sale co uk ltd</a>
    herejuice http://www.herejuice.com/

  17. avatar garagesetcinc

    <a href="http://www.calendarxs.com/nike-free-run-3-bl%C3%A5-gr%C3%A5-scarpec">nike free run 3 bl氓 gr氓</a> <a href="http://www.elindigo.com/womens-cassius-marsh-black-jersey-long-sleeve-t-shirt-nike-nfl-san-francisco-49ers-54-name-number-logo-nflw">womens cassius marsh black jersey long sleeve t shirt nike nfl san francisco 49ers 54 name number logo</a> <a href="http://www.fabrykabarwy.com/nfl-tashaun-gipson-black-39-jacksonville-jaguars-nike-backer-t-shirt-nflx">nfl tashaun gipson black 39 jacksonville jaguars nike backer t shirt</a> <a href="http://www.fonepsi.com/nike-air-max-2016-gris-vert-card-kurpesa">nike air max 2016 gris vert card</a> <a href="http://www.jehleflowers.com/nike-free-trainer-5.0-tb-violet-butyg">nike free trainer 5.0 tb violet</a> <a href="http://www.ksmartcity.com/nfl-marcus-peters-youth-limited-navy-blue-jersey-22-los-angeles-rams-nike-therma-long-sleeve-nflw">nfl marcus peters youth limited navy blue jersey 22 los angeles rams nike therma long sleeve</a>
    [url=http://www.garagesetcinc.com/]garagesetcinc[/url]

  18. avatar syderagencys

    <a href="http://www.bladeid.com/nike-free-tr-dam%C3%A4nner-rot-lila-butya">nike free tr dam盲nner rot lila</a> <a href="http://www.bakomoms.com/kvinders-air-jordan-9-r%C3%B8d-schuhed">kvinders air jordan 9 r酶d</a> <a href="http://www.macrackmount.com/adidas-neo-leisure-gr%C3%BCn-rosa-chaussuresd">adidas neo leisure gr眉n rosa</a> <a href="http://www.martinsedacca.com/air-jordan-retro-10-barn-brun-hvit-obuvf">air jordan retro 10 barn brun hvit</a> <a href="http://www.maxibymaxi.com/nike-kobe-10-billig-apartm%C3%A6ndts-kurpese">nike kobe 10 billig apartm忙ndts</a> <a href="http://www.slatervision.com/rosa-and-gray-jordans-13-2013-schuhed">rosa and gray jordans 13 2013</a>
    syderagencys http://www.syderagencys.com/

欢迎留言




用户登录

sitemap