編輯:關於Android編程
由於最近的項目中需要在第三方應用中直接打開高德地圖的電子狗頁面,在高德開發者論壇找了一遍無果之後,只能自己反編譯高德地圖來找了,現在記錄下來方便大家有類似需求時可以直接找到,這樣就不需要反編譯了。
高德地圖有一些非常方便的特色功能,我們可以直接在第三方應用中打開高德地圖的這些特色功能頁面方便大家使用,前提是手機上必須要安裝高德地圖。
首先反編譯高德地圖的APK得到AndroidMainfest.xml文件:
package com.autonavi.map.intent.dispatch; import adh; import android.app.Activity; import android.app.Application; import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Point; import android.net.Uri; import android.os.Build.VERSION; import android.support.v4.app.Fragment; import android.text.TextUtils; import com.autonavi.common.Account; import com.autonavi.common.Account.Provider; import com.autonavi.common.CC; import com.autonavi.common.CC.Ext; import com.autonavi.common.Callback; import com.autonavi.common.impl.DebugLog; import com.autonavi.common.model.GeoPoint; import com.autonavi.common.model.POI; import com.autonavi.common.model.POIFactory; import com.autonavi.common.utils.FileUtil; import com.autonavi.common.utils.ToastHelper; import com.autonavi.map.fragment.DefaultFragment; import com.autonavi.map.fragment.ExtendWebViewFragment; import com.autonavi.map.fragmentcontainer.FragmentContainer; import com.autonavi.map.fragmentcontainer.NodeAlertDialogFragment; import com.autonavi.map.fragmentcontainer.NodeAlertDialogFragment.Builder; import com.autonavi.map.fragmentcontainer.NodeAlertDialogFragment.NodeDialogFragmentOnClickListener; import com.autonavi.map.fragmentcontainer.NodeFragment; import com.autonavi.map.fragmentcontainer.NodeFragmentBundle; import com.autonavi.map.intent.fragment.MultiPointMapFragment; import com.autonavi.map.manger.MapInterfaceFactory; import com.autonavi.map.quicknavi.QuickAutoNaviFragment; import com.autonavi.map.search.SearchUtil; import com.autonavi.map.setting.AddNaviShortcutFragment; import com.autonavi.map.switchcity.SwitchCityNodeFragment; import com.autonavi.minimap.MapApplication; import com.autonavi.minimap.basemap.activities.ActivitiesFragment; import com.autonavi.minimap.basemap.save.fragment.SaveFragment; import com.autonavi.minimap.basemap.subway.SubwayController; import com.autonavi.minimap.intent.BaseMapAction; import com.autonavi.minimap.life.shortcut.fragment.TravelHelperFragment; import com.autonavi.minimap.map.VirtualEarthProjection; import com.autonavi.minimap.map.vmap.Projection; import com.autonavi.minimap.traffic.TrafficJamManager; import com.autonavi.minimap.traffic.TrafficJamManager.1; import com.autonavi.minimap.traffic.TrafficRemindFragment; import com.autonavi.plugin.PluginManager; import com.autonavi.plugin.PluginMsg; import com.autonavi.sdk.http.app.ConfigerHelper; import com.autonavi.sdk.log.LogManager; import ew; import fe; import iu; import java.net.URLDecoder; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import pk; import proguard.annotation.Keep; import proguard.annotation.KeepClassMembers; import rz; @Keep @KeepClassMembers public class MainIntentDispatcher extends pk { private final String HOST_CLEAR_ALL_DIALOG = "rootmap"; private final String HOST_MULTI_POINTS = "multiPointShow"; private final String HOST_MYLOCATION = "myLocation"; private final String HOST_SHORTURL = "shorturl"; private final String PAN_GOLD_URL = "http://wap.amap.com/gxd/index.html"; private final String PARAMS_ACCOUNT = "Account"; private final String PARAMS_CITY_SELECT = "CitySelect"; private final String PARAMS_CLEANING = "Cleaning"; private final String PARAMS_DIRECT_NAVI = "DirectNavigation"; private final String PARAMS_EASYDRIVING = "EasyDriving"; private final String PARAMS_EXTERNAL_URL = "ExternalURL"; private final String PARAMS_FAVORITE = "Favorite"; private final String PARAMS_OPEN_GOLD_COIN = "GoldCoin"; private final String PARAMS_OPEN_ILLEGAL = "Illegal"; private final String PARAMS_OPEN_QUICKNAVI = "ShortCut"; private final String PARAMS_OPEN_TRAFFICRADIO = "TrafficRadio"; private final String PARAMS_OPEN_TRAFFIC_OVERLAY = "OpenTraffic"; private final String PARAMS_OPEN_VOICE_SEARCH = "VoiceSearch"; private final String PARAMS_POI_DETAIL = "PoiDetail"; private final String PARAMS_SPECIA_TOPIC = "SpecialTopic"; private final String PARAMS_SUB_WAY = "Subway"; private final String PARAMS_TRAFFICBOARD = "openTrafficTopBoard"; private final String PARAMS_TRAFFICEDOG = "openTrafficEdog"; //打開電子狗 private final String PARAMS_TRAFFICREMIND = "openTrafficRemind"; private final String PARAMS_TRAFFIC_LAYERS = "Layers"; private final String PARAMS_USER = "User"; private final String PARAMS_WALLET = "Wallet"; public MainIntentDispatcher(Activity paramActivity) { super(paramActivity); } private boolean doOpenFeature(Intent paramIntent)//這個是關鍵函數,獲取參數打開各個頁面的地方 { Uri localUri = paramIntent.getData(); String str = localUri.getQueryParameter("featureName"); if (TextUtils.isEmpty(str)) ToastHelper.showLongToast(CC.getApplication().getString(2131101427)); do { return true; if (str.equalsIgnoreCase("DirectNavigation")) { doOpenFeatureDirectNavi(); return true; } if (str.equalsIgnoreCase("CitySelect")) { doOpenFeatureCitySelect(); return true; } if (str.equalsIgnoreCase("SpecialTopic")) { doOpenFeatureSpecialTopic(); return true; } if ("Subway".equalsIgnoreCase(str)) { openSubWay(localUri); return true; } if ("EasyDriving".equalsIgnoreCase(str)) { doOpenFeatureEasyDriving(localUri); return true; } if ("Illegal".equalsIgnoreCase(str)) { doOpenFeatureIllegal(localUri); return true; } if (str.equalsIgnoreCase("Favorite")) { doOpenFeatureFavorite(); return true; } if (str.equalsIgnoreCase("Layers")) { doOpenFeatureTrafficReport(); return true; } if (str.equalsIgnoreCase("ExternalURL")) { doOpenFeatureExternalUrl(localUri); return true; } if (str.equalsIgnoreCase("Cleaning")) { doOpenFeatureCleaning(); return true; } if (str.equalsIgnoreCase("ShortCut")) { doOpenFeatureQuickNavi(); return true; } if (str.equalsIgnoreCase("GoldCoin")) { doOpenFeatureGoldGoin(localUri); return true; } if (str.equalsIgnoreCase("TrafficRadio")) { doShowTrafficRemind(localUri); return true; } if (str.equalsIgnoreCase("openTrafficRemind")) { doShowTrafficRemind(localUri); return true; } if (str.equalsIgnoreCase("openTrafficTopBoard")) { doOpenFeatureShowTrafficTopBoard(localUri); return true; } if (str.equalsIgnoreCase("openTrafficEdog")) { doOpenFeatureShowTrafficEDog(localUri); return true; } if (str.equalsIgnoreCase("PoiDetail")) { doOpenFeatureShowPoiDetail(localUri); return true; } if (str.equalsIgnoreCase("VoiceSearch")) { doOpenFeatureVoiceSearch(); return true; } if (str.equalsIgnoreCase("OpenTraffic")) { doOpenFeatureTrafficOverlay(); return true; } if (str.equalsIgnoreCase("Account")) { doOpenFeatureAccount(); return true; } if (str.equalsIgnoreCase("User")) { doOpenFeatureUser(localUri); return true; } if (str.equalsIgnoreCase("Wallet")) { doOpenFeatureWallet(); return true; } if (!str.equalsIgnoreCase("Mine")) break; } while (doOpenMine(localUri)); return false; return false; } private boolean doOpenMine(Uri paramUri) { String str1 = paramUri.getQueryParameter("page"); String str2; boolean bool2; if ((!TextUtils.isEmpty(str1)) && (str1.equals("ToolBox"))) { str2 = paramUri.getQueryParameter("item"); if (!TextUtils.isEmpty(str2)) { if (str2.equals("ElectronicEye")) openElectronicEye(); } else bool2 = true; } boolean bool1; do { boolean bool3; do { return bool2; if (str2.equals("Traffic")) { openTrafficAlert(); break; } if (str2.equals("Violation")) { openCarIllegal(); break; } if (str2.equals("Subway")) { openSubWay(null); break; } if (str2.equals("Maincollect")) { openRoadCaiji(); break; } if (str2.equals("AutonaviGold")) { openPanGold(); break; } bool3 = str2.equals("TravelHelper"); bool2 = false; } while (!bool3); openTravelHelper(); break; if ((TextUtils.isEmpty(str1)) || (!str1.equals("Fortune"))) break label229; bool1 = TextUtils.isEmpty(paramUri.getQueryParameter("item")); bool2 = false; } while (!bool1); ToastHelper.showLongToast(CC.getApplication().getString(2131101426)); return true; label229: Intent localIntent = new Intent(); localIntent.setPackage("com.autonavi.mine"); localIntent.setAction("plugin.mine.Main"); getTopFragment().startFragment(localIntent); return true; } private void openTravelHelper() { CC.startFragment(TravelHelperFragment.class); } public boolean dispatch(Intent paramIntent) { Uri localUri = paramIntent.getData(); if (localUri == null); do { return true; String str = localUri.getHost(); if ((localUri == null) || (TextUtils.isEmpty(str))) break label111; if (str.equals("myLocation")) { myLocation(); return true; } if (str.endsWith("shorturl")) { doShortUrlScheme(localUri); return true; } if (str.equalsIgnoreCase("rootmap")) { removeAllFragmentsWithoutRoot(); return true; } if (str.equalsIgnoreCase("multiPointShow")) { showMultiPoints(localUri); return true; } if (!str.equalsIgnoreCase("openFeature")) break; } while (doOpenFeature(paramIntent)); return false; return false; label111: return false; } public void doOpenFeatureAccount() { if ("".equals(CC.getAccount().getUid())) { CC.getAccount().login(null); return; } Intent localIntent = new Intent("plugin.user.Profile"); localIntent.setPackage("com.autonavi.user"); getTopFragment().startFragment(localIntent); } public void doOpenFeatureCitySelect() { NodeFragmentBundle localNodeFragmentBundle = new NodeFragmentBundle(); localNodeFragmentBundle.putInt("SWITCH_CITY_FOR", 1); startFragment(SwitchCityNodeFragment.class, localNodeFragmentBundle); } public void doOpenFeatureCleaning() { SearchUtil.showEjiajieDlg(getTopFragment()); } public void doOpenFeatureDirectNavi() { startFragment(QuickAutoNaviFragment.class); } public void doOpenFeatureEasyDriving(Uri paramUri) { NodeFragment localNodeFragment = getFragmentContainer().getLastFragment(); if ((localNodeFragment != null) && ((localNodeFragment instanceof NodeFragment))) SearchUtil.showEasyDriving(); } public void doOpenFeatureExternalUrl(Uri paramUri) { String str = paramUri.getQueryParameter("url"); if (!TextUtils.isEmpty(str)); try { Uri localUri = Uri.parse(URLDecoder.decode(str, "UTF-8")); this.mActivity.startActivity(new Intent("android.intent.action.VIEW", localUri)); return; } catch (Exception localException) { } } public void doOpenFeatureFavorite() { startFragment(SaveFragment.class); } public void doOpenFeatureGoldGoin(Uri paramUri) { if ("history".equals(paramUri.getQueryParameter("page"))) { NodeFragmentBundle localNodeFragmentBundle1 = new NodeFragmentBundle(); localNodeFragmentBundle1.putString("url", ConfigerHelper.getInstance().getGoldcoinUrl() + "record.html"); localNodeFragmentBundle1.putString("thirdpart_name", ""); localNodeFragmentBundle1.putBoolean("show_bottom_bar", false); localNodeFragmentBundle1.putBoolean("show_loading_anim", false); startFragment(ExtendWebViewFragment.class, localNodeFragmentBundle1); return; } NodeFragmentBundle localNodeFragmentBundle2 = new NodeFragmentBundle(); localNodeFragmentBundle2.putString("title", CC.getApplication().getString(2131101845)); localNodeFragmentBundle2.putString("url", ConfigerHelper.getInstance().getGoldcoinUrl() + "index.html"); localNodeFragmentBundle2.putString("thirdpart_name", ""); localNodeFragmentBundle2.putBoolean("show_bottom_bar", false); localNodeFragmentBundle2.putBoolean("show_loading_anim", false); startFragment(ExtendWebViewFragment.class, localNodeFragmentBundle2); } public void doOpenFeatureIllegal(Uri paramUri) { if (Build.VERSION.SDK_INT < 11) ToastHelper.showLongToast(CC.getApplication().getString(2131101421)); final NodeFragment localNodeFragment; do { return; localNodeFragment = getFragmentContainer().getLastFragment(); } while ((localNodeFragment == null) || (!(localNodeFragment instanceof NodeFragment))); if (CC.Ext.getAccountProvider().getAccount().isLogin()) { ew.a((NodeFragment)localNodeFragment); return; } CC.Ext.getAccountProvider().getAccount().login(new Callback() { public void callback(Boolean paramAnonymousBoolean) { if (paramAnonymousBoolean.booleanValue()) ew.a((NodeFragment)localNodeFragment); } public void error(Throwable paramAnonymousThrowable, boolean paramAnonymousBoolean) { } }); } public void doOpenFeatureQuickNavi() { startFragment(AddNaviShortcutFragment.class); } public void doOpenFeatureShowPoiDetail(final Uri paramUri) { this.mActivity.runOnUiThread(new Runnable() { public final void run() { try { POI localPOI = POIFactory.createPOI(); String str1 = paramUri.getQueryParameter("x"); String str2 = paramUri.getQueryParameter("y"); String str3 = URLDecoder.decode(paramUri.getQueryParameter("poiname"), "UTF-8"); if (!TextUtils.isEmpty(str1)) { boolean bool = TextUtils.isEmpty(str2); if (bool); } try { double d = Double.valueOf(str1).doubleValue(); Point localPoint = VirtualEarthProjection.LatLongToPixels(Double.valueOf(str2).doubleValue(), d, 20); localPOI.setPoint(new GeoPoint(localPoint.x, localPoint.y)); localPOI.setName(str3); localPOI.setId(paramUri.getQueryParameter("poiid")); rz.a(localPOI, 1); return; } catch (NumberFormatException localNumberFormatException) { localNumberFormatException.printStackTrace(); return; } } catch (Exception localException) { localException.printStackTrace(); } } }); } public void doOpenFeatureShowTrafficEDog(Uri paramUri) { if (!CC.isInternetConnected()) ToastHelper.showLongToast(MapApplication.getApplication().getString(2131102089)); do { return; TrafficJamManager.a(); TrafficJamManager.b(); } while (!"trip".equalsIgnoreCase(paramUri.getQueryParameter("sourceApplication"))); LogManager.actionLog(12406, 2); } public void doOpenFeatureShowTrafficTopBoard(Uri paramUri) { if (!CC.isInternetConnected()) { ToastHelper.showLongToast(MapApplication.getApplication().getString(2131102089)); return; } TrafficJamManager localTrafficJamManager = TrafficJamManager.a(); MapApplication.getApplication(); PluginMsg localPluginMsg = new PluginMsg(PluginManager.getApplication().getPackageName(), "getPageInfo"); localPluginMsg.put("action", "plugin.minimap.TrafficBoard"); PluginManager.sendMsg(localPluginMsg, new TrafficJamManager.1(localTrafficJamManager)); } public void doOpenFeatureSpecialTopic() { startFragment(ActivitiesFragment.class); } public void doOpenFeatureTrafficOverlay() { BaseMapAction localBaseMapAction = BaseMapAction.OPEN_TRAFFIC_HELP; NodeFragmentBundle localNodeFragmentBundle = new NodeFragmentBundle(); localNodeFragmentBundle.putString("key_action", "action_base_map_scheme"); localNodeFragmentBundle.putObject("key_scheme_feature", localBaseMapAction); startFragment(DefaultFragment.class, localNodeFragmentBundle); } public void doOpenFeatureTrafficReport() { MapInterfaceFactory.getInstance().getReportController(CC.getTopActivity(), null).a(); } public void doOpenFeatureUser(Uri paramUri) { if (!TextUtils.isEmpty(CC.getAccount().getUid())) { Intent localIntent = new Intent("plugin.user.Profile"); localIntent.setPackage("com.autonavi.user"); getTopFragment().startFragment(localIntent); return; } CC.getAccount().login(null); } public void doOpenFeatureVoiceSearch() { NodeFragment localNodeFragment = CC.getLastFragment(); if (localNodeFragment != null) iu.a(localNodeFragment).c(); } public void doOpenFeatureWallet() { PluginManager.sendMsg(new PluginMsg("com.autonavi.user", "openWallet"), null); } public void doShortUrlScheme(Uri paramUri) { Intent localIntent = new Intent("android.intent.action.VIEW"); localIntent.setData(Uri.parse("http://wb.amap.com/?" + paramUri.getQuery())); NodeFragmentBundle localNodeFragmentBundle = new NodeFragmentBundle(); localNodeFragmentBundle.putString("key_action", "action_base_map_scheme"); localNodeFragmentBundle.putObject("key_scheme_feature", BaseMapAction.SHORT_URL); localNodeFragmentBundle.putObject("key_schema_short_url_intent", localIntent); startFragment(DefaultFragment.class, localNodeFragmentBundle); } public void doShowTrafficRemind(Uri paramUri) { if (!CC.isInternetConnected()) { ToastHelper.showLongToast(MapApplication.getApplication().getString(2131102089)); return; } if ("notify".equalsIgnoreCase(paramUri.getQueryParameter("sourceApplication"))) { removeAllFragmentsWithoutRoot(); LogManager.actionLog(12405, 1); } CC.startFragment(TrafficRemindFragment.class); } public void myLocation() { NodeFragmentBundle localNodeFragmentBundle = new NodeFragmentBundle(); localNodeFragmentBundle.putString("key_action", "action_base_map_scheme"); localNodeFragmentBundle.putObject("key_scheme_feature", BaseMapAction.MY_LOCATION); startFragment(DefaultFragment.class, localNodeFragmentBundle); } public void openCarIllegal() { final NodeFragment localNodeFragment = getFragmentContainer().getLastFragment(); if ((localNodeFragment != null) && ((localNodeFragment instanceof NodeFragment))) { if (CC.Ext.getAccountProvider().getAccount().isLogin()) { ew.a((NodeFragment)localNodeFragment); LogManager.actionLog(14100, 14); } } else return; CC.Ext.getAccountProvider().getAccount().login(new Callback() { public void callback(Boolean paramAnonymousBoolean) { if (paramAnonymousBoolean.booleanValue()) { ew.a((NodeFragment)localNodeFragment); LogManager.actionLog(14100, 14); } } public void error(Throwable paramAnonymousThrowable, boolean paramAnonymousBoolean) { } }); } public void openElectronicEye() { Intent localIntent = new Intent("plugin.minimap.TrafficEDog"); localIntent.setPackage(CC.getApplication().getPackageName()); CC.startFragment(localIntent); } public void openPanGold() { if (FileUtil.isAppInstalled("com.autonavi.gxdtaojin")) { FileUtil.launchApp(this.mActivity, "com.autonavi.gxdtaojin"); return; } try { Intent localIntent = new Intent("android.intent.action.VIEW"); localIntent.setData(Uri.parse("http://wap.amap.com/gxd/index.html")); this.mActivity.startActivity(localIntent); return; } catch (ActivityNotFoundException localActivityNotFoundException) { localActivityNotFoundException.printStackTrace(); } } public void openRoadCaiji() { if (FileUtil.isAppInstalled("com.sh.caiji")) { FileUtil.launchApp(this.mActivity, "com.sh.caiji"); return; } try { Intent localIntent = new Intent("android.intent.action.VIEW"); localIntent.setData(Uri.parse("http://caiji.mapabc.com/")); this.mActivity.startActivity(localIntent); return; } catch (ActivityNotFoundException localActivityNotFoundException) { localActivityNotFoundException.printStackTrace(); } } public void openSubWay(Uri paramUri) { if (paramUri == null) { SubwayController.getInstance().openSubway(this.mActivity, null); return; } String str = paramUri.getQueryParameter("adcode"); SubwayController.getInstance().openSubway(this.mActivity, str); } public void openTrafficAlert() { Intent localIntent = new Intent("plugin.minimap.TrafficRemind"); localIntent.setPackage(CC.getApplication().getPackageName()); CC.startFragment(localIntent); } public void processShortUrl(Intent paramIntent) { NodeFragmentBundle localNodeFragmentBundle = new NodeFragmentBundle(); localNodeFragmentBundle.putString("key_action", "action_base_map_scheme"); localNodeFragmentBundle.putObject("key_scheme_feature", BaseMapAction.SHORT_URL); localNodeFragmentBundle.putObject("key_schema_short_url_intent", paramIntent); startFragment(DefaultFragment.class, localNodeFragmentBundle); } public void showAmapAppUpdate() { String str1 = adh.o(); SharedPreferences localSharedPreferences = CC.getApplication().getSharedPreferences("SharedPreferences", 0); final String str2 = localSharedPreferences.getString("updateUrl", ""); String str3 = localSharedPreferences.getString("updateAmapAppVersion", ""); if ((TextUtils.isEmpty(str1)) || (TextUtils.isEmpty(str2)) || (TextUtils.isEmpty(str3))) { ToastHelper.showLongToast(CC.getApplication().getString(2131101424)); return; } if (str1.compareTo(str3) >= 0) { ToastHelper.showLongToast(CC.getApplication().getString(2131101425)); return; } NodeAlertDialogFragment.Builder localBuilder = new NodeAlertDialogFragment.Builder(this.mActivity); localBuilder.setMessage(2131101424); localBuilder.setTitle(2131104015); localBuilder.setPositiveButton(2131104017, new NodeAlertDialogFragment.NodeDialogFragmentOnClickListener() { public final void onClick(NodeAlertDialogFragment paramAnonymousNodeAlertDialogFragment) { Intent localIntent = new Intent("android.intent.action.VIEW", Uri.parse(str2)); try { MainIntentDispatcher.this.mActivity.startActivity(localIntent); return; } catch (Exception localException) { } } }); localBuilder.setNegativeButton(2131104014, new NodeAlertDialogFragment.NodeDialogFragmentOnClickListener() { public final void onClick(NodeAlertDialogFragment paramAnonymousNodeAlertDialogFragment) { } }); try { CC.startAlertDialogFragment(localBuilder); return; } catch (Throwable localThrowable) { DebugLog.error(localThrowable); } } public void showMultiPoints(Uri paramUri) { String str1 = paramUri.getQueryParameter("title"); String str2 = paramUri.getQueryParameter("q"); String str3 = paramUri.getQueryParameter("dev"); ArrayList localArrayList = new ArrayList(); StringTokenizer localStringTokenizer; if (!TextUtils.isEmpty(str2)) localStringTokenizer = new StringTokenizer(str2, "|"); while (true) { String[] arrayOfString; if (localStringTokenizer.hasMoreTokens()) { arrayOfString = localStringTokenizer.nextToken().split(","); if ((arrayOfString == null) || (arrayOfString.length < 3)); } else { try { double d1 = Double.parseDouble(arrayOfString[0]); double d2 = Double.parseDouble(arrayOfString[1]); int i = Integer.parseInt(str3); GeoPoint localGeoPoint = new GeoPoint(d2, d1); if (i == 1) localGeoPoint = Projection.offsetCoordinat(localGeoPoint.x, localGeoPoint.y); POI localPOI = POIFactory.createPOI(arrayOfString[2], localGeoPoint); if (arrayOfString.length >= 4) localPOI.setAddr(arrayOfString[3]); if (arrayOfString.length >= 5) localPOI.setId(arrayOfString[4]); if (arrayOfString.length >= 6) localPOI.setPhone(arrayOfString[5]); localArrayList.add(localPOI); if (localArrayList.size() >= 10) { NodeFragmentBundle localNodeFragmentBundle = new NodeFragmentBundle(); localNodeFragmentBundle.putString("key_title", str1); localNodeFragmentBundle.putObject("key_multi_points", localArrayList); startFragment(MultiPointMapFragment.class, localNodeFragmentBundle); return; } } catch (NumberFormatException localNumberFormatException) { ToastHelper.showToast(MapApplication.getApplication().getString(2131101911)); } } } } }
Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); ComponentName cn = new ComponentName("com.autonavi.minimap", "com.autonavi.map.activity.NewMapActivity"); intent.setAction("com.autonavi.minimap.ACTION"); intent.setData(Uri.parse("androidamap://openFeature?featureName=openTrafficEdog"));//這個是直接打開電子狗頁面 intent.setComponent(cn); startActivity(intent);
先看看效果圖:問題: 1、下拉列表(因為還沒看到這裡...) 2、標題欄顯示問題 3、按鈕的 Enable 設置 ....
很多人也許會問:360被卸載之後會跳轉到指定的反饋頁面,是怎麼弄的?其實這個問題的核心就在於:應用被卸載了,如果能夠做到後續的代碼邏輯繼續執行我們再來仔細分析一下場景和流
Service常見面試題Service 是否在 main thread 中執行, service 裡面是否 能執行耗時的操作?默認情況,如果沒有顯示的指 servic 所
導航抽屜(navigationdrawer)是一個從屏幕左邊滑入的面板,用於顯示應用的主要導航項目。用戶可以通過在屏幕左邊緣滑入或者觸摸操作欄的應用圖標打開導航抽屜。導航