Android的Web浏览器主页 [英] Android Web browser homepage

查看:665
本文介绍了Android的Web浏览器主页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过几个应​​用程序和广告网络像的startApp改变由code在Android网页浏览器主页。这怎么可能?

I have seen several apps and advertising networks like startapp changing the android web browser homepage by code. How is this possible?

我已经采取了看看在startApp SDK,但我还没有设法找到他们改变主页的部分。

I have taken a look at the startapp sdk but i have not managed to find the part where they change the homepage.

我也采取了看 BrowserSettings com.android.browser.BrowserSettings

BrowserSettings ,有一个叫设为首页(背景下,字符串)接口

public void setHomePage(Context context, String url) {
    Editor ed = PreferenceManager.
            getDefaultSharedPreferences(context).edit();
    ed.putString(PREF_HOMEPAGE, url);
    ed.commit();
    homeUrl = url;
}

我不知道很多java / Android的,所以纠正我,如果我错了:设为首页()未声明为静态的,因此不能从其他的活动被称为。所以我不能用这个。

I dont know a lot java/android, so correct me if i am wrong: The setHomepage() is not declared static so it can not be called from other activities. So i can not use this.

我看不到应用于共享preferences任何模式,以便这意味着它在默认情况下采取私人的方式是,我不能编辑共享preferences还是?

I cant see any Mode applied to the Shared Preferences so it means that it will by default take Private as is Mode and i cant edit the Shared Preferences or ?

有人说,它可能将有可能做的ContentProvider /解析器。

Some people have said that it may would be possible to do with contentProvider/Resolver.

链接的<一个href="http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/2.2_r1.1/com/android/browser/BrowserSettings.java#BrowserSettings.setHomePage%28android.content.Context%2Cjava.lang.String%29">BrowserSettings.java

任何帮助或想法将AP preciated:)

Any help or thoughts would be appreciated:)

推荐答案

我用的黛安HackBorn(谷歌的Andr​​oid工程师)在这一个:这应该是不可能的,因为这将是一个平台的安全漏洞

I'm with Diane HackBorn (Google's Android Engineer) on this one: this shouldn't be possible, as it would be a platform security flaw.

如果碰巧是可能的,是通过某种黑客攻击(即:具有root访问权限的应用程序,可以写入浏览器应用程序的设置文件直接)。

If it happens to be possible, would be through some sort of hack (i.e.: an App with root access that can write into the Browser app Settings file directly).

这篇关于Android的Web浏览器主页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆