diff --git a/app.apk b/app.apk index 9a75aa7..ac158d1 100644 Binary files a/app.apk and b/app.apk differ diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml index 966465e..e84ed69 100644 --- a/main/AndroidManifest.xml +++ b/main/AndroidManifest.xml @@ -2,7 +2,7 @@ + android:versionName="4.39"> diff --git a/main/assets/about.htm b/main/assets/about.htm index 702407b..0b0fcfb 100644 --- a/main/assets/about.htm +++ b/main/assets/about.htm @@ -9,7 +9,7 @@ p { text-indent:2em; } -


海天鹰浏览器 V4.37

+


海天鹰浏览器 V4.39

内置扩展的浏览器。

扩展:链接关键字过滤,链接关键字高亮,图片自定义过滤,视频独立播放。

作者:海天鹰

@@ -24,6 +24,7 @@ p { text-indent:2em; }

字符串转Bitmap

添加网址到桌面

更新日志:

+

V4.39 (2024-06-01)

  1. 解决接收不到分享网址的问题。

V4.38 (2024-04-30)

  1. 增加添加网址到桌面。

V4.37 (2024-03-27)

  1. 修复保存网址规则前面有1个空格的问题。
  2. 增加点击规则查看详情。

V4.36 (2024-03-25)

  1. 增加添加网址到主页。
diff --git a/main/assets/home.htm b/main/assets/home.htm index 22ab224..be16958 100644 --- a/main/assets/home.htm +++ b/main/assets/home.htm @@ -25,6 +25,7 @@ img { vertical-align:middle; } + diff --git a/main/java/com/hty/browser/MainActivity.java b/main/java/com/hty/browser/MainActivity.java index eb2d4f3..a7a9165 100644 --- a/main/java/com/hty/browser/MainActivity.java +++ b/main/java/com/hty/browser/MainActivity.java @@ -142,7 +142,7 @@ public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (Build.VERSION.SDK_INT >= 23) { //Log.e(Thread.currentThread().getStackTrace()[2] + "", "checkSelfPermission: " + checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)); if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.INSTALL_SHORTCUT) != PackageManager.PERMISSION_GRANTED) { requestPermissions(PERMISSIONS, REQUEST_PERMISSION_CODE); @@ -1001,7 +1001,7 @@ public class MainActivity extends Activity { webView.loadUrl(js); break; case 22: - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + if (Build.VERSION.SDK_INT >= 26) { layout = new LinearLayout(MainActivity.this); layout.setOrientation(LinearLayout.VERTICAL); final EditText editText_title1 = new EditText(MainActivity.this); @@ -1316,8 +1316,10 @@ public class MainActivity extends Activity { void newWindow(String surl) { WebView webView = new WebView(MainActivity.this); settingWebView(webView); - if (!surl.equals("")) + if (surl.contains("://")) webView.loadUrl(surl); + else + webView.loadUrl("https://www.baidu.com/s?wd=" + surl); webViewLayout.removeAllViews(); webViewLayout.addView(webView); list_webView.add(webView); @@ -1330,7 +1332,7 @@ public class MainActivity extends Activity { void settingWebView(WebView webView) { registerForContextMenu(webView); // 注册菜单 webView.requestFocusFromTouch(); // 请求触摸焦点 - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + if (Build.VERSION.SDK_INT >= 19) { webView.setWebContentsDebuggingEnabled(true); // 允许调试 } @@ -1576,10 +1578,11 @@ public class MainActivity extends Activity { } void getDataFromIntent(Intent intent) { - //Log.e(Thread.currentThread().getStackTrace()[2] + "", "intent(" + intent + ")"); - if (list_webView.size() != 0 && intent.hasCategory(Intent.CATEGORY_LAUNCHER)) return; - if (intent.getAction().equals(Intent.ACTION_VIEW)) { - urln = intent.getDataString(); + String type = intent.getType(); + if (type != null && type.startsWith("text/") && intent.getAction().equals(Intent.ACTION_SEND)) { + urln = intent.getStringExtra(Intent.EXTRA_TEXT); + if (urln.contains("\n")) + urln = urln.substring(urln.indexOf("\n") + 1); newWindow(urln); } else { String surl = sharedPreferences.getString("homepage", "file:///android_asset/home.htm"); diff --git a/version b/version index c2e5feb..7d316d6 100644 --- a/version +++ b/version @@ -1 +1 @@ -{4.38} \ No newline at end of file +{4.39} \ No newline at end of file