Yet another web browser for Android.

Related tags

Demo android bowser
Overview

Ninja

background.png

Yet another web browser for Android.

Ninja in 酷安

Ninja in 少数派

Ninja in 小众软件

Download latest Ninja.apk

SUPPORT: Android 4.1+

LONG TERM MAINTENANCE.

BUT I HAVE TO PREPARE FOR THE FINIAL EXAM, SO SUSPENDED DEVELOPMENT.

Features:

  • Open links in background without ever leaving your favorite apps.

  • Lightweight and no extra permissions.

  • Custom home.

  • Fashion tab switcher.

  • html5test access 509UP with latest Android System WebView.

  • Adblock and whitelist.

  • Readability.

  • Capture whole page screenshot.

  • Custom volume control.

  • Webpage go to top easy.

  • More features coming soon...

How to use Ninja?

Basically Ninja is a simple web browser like any others, but there are some different things you need to know:

Custom home:

  • First login Ninja, home show as about:blank.

  • Use the overflow menu's Add to home to pin webpages.

  • Use the overflow menu's Relayout to custom your home.

  • Long press on a card of home, you can edit it title.

Switch tabs:

  • You can set tab switcher position in screen top or screen bottom at Setting/Browser/Tab Position.

  • Press the address bar and drag it down or up, then the fashion tab switcher will display.

  • Swipe up/down to dimiss a page.

  • Or just swipe the omnibox left/right to switch tab :)

The Settings is located in the top or bottom left of tab switcher, the gear icon.

Remember that if the soft keyboard is shown the tab switcher would not works, it's our design :)

Load in background when you click links in other App:

  1. Set Ninja as your default browser when click links.

  2. Single tap will open links in background, and show a clickable notification in statusbar.

  3. Double taps will show a dialog that allows you to open links in foreground, etc.

AdBlock whitelist:

Since AdBlick maybe cause some websites display error, you can add they to Setting/AdBlock/Whitelist.

Readability:

Ninja support read mode but it need the token of Readability.

To get the token you should go to Readability Developer APIs to get your own token and set it in Setting/Readability/Token.

Screenshot:

Ninja supports capture entire webpage function.

But that is not means you could screenshot a long long long webpage(OOM, etc).

Q&A:

Where is the AdBlock's hosts.txt comes from?

We don't use the AdBlock Plus' Easylist.

The hosts.txt comes from hpHosts.

Why no incognito mode?

Incognito mode is a necessary feature for a web browser, but since WebView(Context context, AttributeSet attrs, int defStyleAttr, boolean privateBrowsing) was deprecated in API level 17 and no longer supported, the incognito mode is conflict with our UI design, so we stop it(but maybe restart to develop it someday). If you want to add incognito mode you can fork our sourse code and do it by yourself :)

Why not Google Play?

reject.png

What can I do for Ninja?

  • New design launcher icon(must be 512px * 512px).

  • Translate ninja_introduction_en.md at this link

  • Translate strings.xml at this link.

  • Fix bugs and add awesome features.

  • Fork and pull request is welcome all time :)

How to use the source code?

Just import the Ninja folder with your IntelliJ IDEA.

Derivatives:

Thanks:

License:

Apache License, Version 2.0

Comments
  • I have some browser issues (Download Crash issues)

    I have some browser issues (Download Crash issues)

    I took a look into @mthlifan 's issue about download error. When any download starts in the background, the application crashes. Sometimes while downloading a file too, it happens I do not understand where the problem is. Here is the log file for the exact problem -

    android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
     tat android.view.ViewRootImpl.setView(ViewRootImpl.java:566)
     tat android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
     tat android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
     tat android.app.Dialog.show(Dialog.java:298)
     tat io.github.mthli.ninja.Browser.NinjaDownloadListener.onDownloadStart(NinjaDownloadListener.java:35)
     tat com.android.webview.chromium.WebViewContentsClientAdapter.onDownloadStart(WebViewContentsClientAdapter.java:876)
     tat com.android.org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(AwContentsClientCallbackHelper.java:112)
     tat android.os.Handler.dispatchMessage(Handler.java:102)
     tat android.os.Looper.loop(Looper.java:135)
     tat android.app.ActivityThread.main(ActivityThread.java:5347)
     tat java.lang.reflect.Method.invoke(Native Method)
     tat java.lang.reflect.Method.invoke(Method.java:372)
     tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
     tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
    
    bug 
    opened by Thunderbottom 22
  • Remove whitespaces and new lines from within string.xml

    Remove whitespaces and new lines from within string.xml

    I am not sure how Android handles this, but basically the following two examples are not identical:

        <string name="app_version">
            1.3.2
        </string>
    
        <string name="app_version">1.3.2</string>
    

    The first one includes whitespaces and new lines.

    opened by ghost 9
  • Add a Forward button Please

    Add a Forward button Please

    Nice browser! I'm a fan. Can you add a forward button please? so that you can navigate to pages where you have been before and just press forward to go there again after pressing back.

    enhancement 
    opened by mthlifan 6
  • I can help you add ACRA (Application Crash Report for Android) to Ninja

    I can help you add ACRA (Application Crash Report for Android) to Ninja

    If you want, I can help you add ACRA, which will send you log report when the application crashes, all I need is your Skype or something so we can talk and I can send you the code.

    help wanted 
    opened by Thunderbottom 3
  • Link opening issue

    Link opening issue

    When you open link from google play store, it has a redirect url instead of direct link to website. So the browser performs a google search instead of opening the website. You can try it on Android 5.0 and above.

    bug 
    opened by Thunderbottom 2
  • icon proposal for Ninja

    icon proposal for Ninja

    As per README, an icon was requested and this was what I came up with. The icon was made based on Google's design specs at http://www.google.com/design/spec/style/icons.html#icons-product-icons

    ninja

    While in discussion, the icon is under CC-BY-NC-SA 3.0 License. Own work. AI and PNG only.

    opened by mauris 2
  • Double-tap to exit requires several taps to actually exit

    Double-tap to exit requires several taps to actually exit

    More of a UX issue then a bug, but here it goes.

    When tapping the back button, the Toast notification shows with string toast_double_taps_quit ("Press again to exit", in EN). This uses the NinjaToast class, which has its delay set to 2000 ms. However, the Timer you are using to expire the double-taps in method doubleTapsQuit() is using DOUBLE_TAPS_QUIT_DEFAULT as its delay, which is set to 512 ms. Therefore, when the user press the back button multiple times but with intervals longer then 512 ms, the Toast keeps showing but the app never exits.

    A simple fix would be to set DOUBLE_TAPS_QUIT_DEFAULT to 2000 ms, the same duration of the Toast, so that the user expectations are met (that is, while "Press again to exit" is showing, he can press again and the app will exit).

    enhancement 
    opened by gusmd 2
  • error: Error: No resource found that matches the given name (at 'versionName' with value '@string/app_version').

    error: Error: No resource found that matches the given name (at 'versionName' with value '@string/app_version').

    \?\D:\Browser\app\build\intermediates\instant-run-support\debug\dependencies\AndroidManifest.xml:2: error: Error: No resource found that matches the given name (at 'versionName' with value '@string/app_version').

    Error while generating dependencies split APK com.android.ide.common.process.ProcessException: Failed to execute aapt at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:867) at com.android.build.gradle.internal.transforms.InstantRunSplitApkBuilder.generateSplitApkManifest(InstantRunSplitApkBuilder.java:229) at com.android.build.gradle.internal.transforms.InstantRunSplitApkBuilder.generateSplitApk(InstantRunSplitApkBuilder.java:147) at com.android.build.gradle.internal.transforms.InstantRunDependenciesApkBuilder.transform(InstantRunDependenciesApkBuilder.java:126) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:185) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:181) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102) at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:176) at sun.reflect.GeneratedMethodAccessor345.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228) at org.gradle.internal.Transformers$4.transform(Transformers.java:169) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process D:\adt-bundle-windows-x86_64-20140321\sdk\build-tools\25.0.3\aapt.exe with arguments {package -f --no-crunch -I D:\adt-bundle-windows-x86_64-20140321\sdk\platforms\android-22\android.jar -M \?\D:\Browser\app\build\intermediates\instant-run-support\debug\dependencies\AndroidManifest.xml -F D:\Browser\app\build\intermediates\instant-run-support\debug\dependencies\resources_ap --debug-mode -0 apk --no-version-vectors} at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299) at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:865) ... 39 more Caused by: com.android.ide.common.process.ProcessException: Error while executing process D:\adt-bundle-windows-x86_64-20140321\sdk\build-tools\25.0.3\aapt.exe with arguments {package -f --no-crunch -I D:\adt-bundle-windows-x86_64-20140321\sdk\platforms\android-22\android.jar -M \?\D:\Browser\app\build\intermediates\instant-run-support\debug\dependencies\AndroidManifest.xml -F D:\Browser\app\build\intermediates\instant-run-support\debug\dependencies\resources_ap --debug-mode -0 apk --no-version-vectors} at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:74) at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:49) at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:78) at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:74) at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457) at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185) at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53) at com.android.build.gradle.internal.process.GradleProcessExecutor$1.run(GradleProcessExecutor.java:60) Caused by: org.gradle.process.internal.ExecException: Process 'command 'D:\adt-bundle-windows-x86_64-20140321\sdk\build-tools\25.0.3\aapt.exe'' finished with non-zero exit value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:369) at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:47) ... 9 more

    FAILED

    当运行到真机上面,就会出来这个错?为什么?

    opened by Croie 0
  • Link opening issue (Google News App)

    Link opening issue (Google News App)

    When you open a link from Google News App, it has a redirect url instead of direct link to website. So the browser performs a google search instead of opening the website.

    opened by alexisju 3
Releases(v1.3.4)
Owner
Matthew Lee
Ah you are peeking at me ( ¬、¬)
Matthew Lee
A simple app to showcase Androids Material Design and some of the cool new cool stuff in Android Lollipop. RecyclerView, CardView, ActionBarDrawerToggle, DrawerLayout, Animations, Android Compat Design, Toolbar

#Android-LollipopShowcase This is a simple showcase to show off Android's all new Material Design and some other cool new stuff which is (new) in Andr

Mike Penz 1.8k Nov 10, 2022
A simple app to showcase Androids Material Design and some of the cool new cool stuff in Android Lollipop. RecyclerView, CardView, ActionBarDrawerToggle, DrawerLayout, Animations, Android Compat Design, Toolbar

#Android-LollipopShowcase This is a simple showcase to show off Android's all new Material Design and some other cool new stuff which is (new) in Andr

Mike Penz 1.8k Nov 10, 2022
simple android grocery app using kotlin and android studio

Project Idea The idea of this project is to make a grocery android app that users can use to order the groceries they want. It doesn't contain any bac

null 0 Nov 29, 2021
Beetlebug is an open source insecure Android application with CTF challenges built for Android Penetration Testers and Bug Bounty hunters.

Beetlebug Beetlebug is a beginner-friendly Capture the Flag Android application that aims to inspire interest in Mobile Application Security. It is ge

Hafiz Abdulaziz 60 Oct 11, 2022
Do's and Don'ts for Android development, by Futurice developers

Best practices in Android development Avoid reinventing the wheel by following these guidelines. Lessons learned from Android developers in Futurice.

Futurice 20.2k Dec 31, 2022
Learning RxJava for Android by example

Learning RxJava for Android by example This is a repository with real-world useful examples of using RxJava with Android. It usually will be in a cons

Kaushik Gopal 7.6k Dec 30, 2022
A sample Android app which showcases advanced usage of Dagger among other open source libraries.

U+2020 A sample Android app which showcases advanced usage of Dagger among other open source libraries. Watch the corresponding talk or view the slide

Jake Wharton 5.7k Dec 22, 2022
Proguard configurations for common Android libraries

android-proguard-snippets Example Proguard configurations for common Android libraries. This project assumes that your ProGuard configuration is based

Kevin Schultz 4.6k Dec 18, 2022
Examples of Android applications

Android Demos This is a collection of basic android examples created by Novoda. CarouselFragment CompassExample ContactSelector CustomActivityTransiti

Novoda 2k Jan 3, 2023
A simple chat demo for socket.io and Android

socket.io-android-chat This is a simple chat demo for socket.io and Android. You can connect to https://socket-io-chat.now.sh using this app. Installa

Naoyuki Kanezawa 1.9k Dec 30, 2022
Google Play game services - Android samples

Google Play game services - Android Samples Copyright (C) 2014 Google Inc. Contents These are the Android samples for Google Play game services. Colle

Google Play Game Services 952 Dec 27, 2022
Android common lib demo, include ImageCache, HttpCache, DropDownListView, DownloadManager, install apk silent and so on, you can find description

android-demo 关于我,欢迎关注 微博:Trinea 主页:trinea.cn 邮箱:trinea.cn#gmail.com 微信:codek2 依赖:trinea-android-common android-auto-scroll-view-pager viewpager-indica

Trinea 1.1k Nov 10, 2022
Cheat Sheet for Android Interviews

Android-Cheat-sheet Cheat Sheet for Android Interviews Topics Common Coding Programs Data Structure Coding Programs Android Interview Questions Java I

Anitaa Murthy 2k Dec 31, 2022
RxJava architecture library for Android

Reference Architecture for Android using RxJava This is an ambitious reference project of what can be done with RxJava to create an app based on strea

Reark 2.1k Dec 17, 2022
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Madalin Valceleanu 2.3k Dec 30, 2022
Collection of Small Android Projects

AndroidDemoProjects ActivityRecognition: Example of using Google Play Services to recognize a user's activity, such as running, walking, or riding a b

Paul Ruiz 601 Dec 9, 2022
Sample material transition animations for Android

See ListOfThings for a newer implementation. Android Material Transitions This Android project samples some Material Design-ish transitions for list i

Todd Way 1.2k Dec 7, 2022
[] Explorations around Android custom layouts

android-layout-samples Explorations around Android custom layouts, including off main thread View measure/layout passes. Sample code for: Composite Vi

Lucas Rocha 796 Nov 15, 2022