Customizing chromium source code to create a custom browser for android - android

I want to create a new web-browser for android, but this browser is not like ordinary web browsers. This is only useful to open local (html, css and js) files and to do some local tasks like disk reading, playing music, etc. It won't open any web URLs.
So i thought to customize chromium source code. How to customize it according to my requirement ?
I downloaded chromium source code and built using ubuntu linux. But it has many projects and directories. I tried to understand the source code architecture with help of this link. But i am getting confusion, because some files mentioned in that link are not available in source code.
if anybody know about chromium porting and customization please help me. Thanks.

Why you dont usa a WebKit to this purpose. Many web browsers using this web engine also your chromium. http://developer.android.com/reference/android/webkit/package-summary.html

Related

One URL scheme for both Ios and Android

So I am in the mids of inplementing url-schemes in my app (React-native and for both Android and Ios) but I am having some trouble with the html implementation of the url schemes.
I figured out that for android you have to use:
<a href="intent://Something/#Intent;scheme=SomeApp;package=com.SomeApp;end">
But for IOS only this link works: <a href="SomeApp://Something">
Is there a way to allow both the android and IOS app to use the same link to open the app? I figured that it's quite common to ask that but I couldn't find any resource on the internet that was usefull for this. I could try to make some JS code to try both the links but that's not really a pretty solution (Android doesn't respond to the IOS link so I can run that one first and then the Android link after that)
Any help would be appreciated!

Android Questions about Mozilla GeckoView

I am a beginner Android developer.
I using the 'WebView' had tried to make a Android App.
However, the speed of the web is too slow.
So the Internet search results found GeckoView.
But homepage has been difficult for me to understand I do not know English well.
My questions:
Can I use GeckoView instead of the WebView? Is it simple?
Can I use a code library that just adds to the 'build.gradle' in Android Studio?
Is there another altenative?
Yes, you can use GeckoView also....
Android WebView is not intended for building browser application because, many advanced Web API'S are disabled.
And different phones might have different versions of WebView all of which your app has to support....
Geckoview is open source library that allows you to render web content on Android using the Gecko web engine...
I made simple application with webview, just check out you'll get some help
https://github.com/malikhimani21/Project-2
In some cases, a WebView is a good option for displaying trusted first-party access to your web pages from either a browser or your own app
check out this link
https://developer.android.com/guide/webapps
Gecko view is only experimental. You can't use for production
https://wiki.mozilla.org/Mobile/GeckoView
So your only choice would be a webview. If you are great in javascript, I would recommend you to use react-native. This is how facebook is made, and you can follow extensive documents mentioned here.
https://facebook.github.io/react-native/

Viewing a PDF file from HTML5 Hybrid Mobile App

Intending to view a PDF File from the Hybrid Mobile App , created using HTML5 Jquery and Packaged with Phonegap.
But unable to achieve it ,
Things i tried
<object src="xyz.pdf" type="application/pdf"></object>
also,
window.open('xyz.pdf'); //through javascript
and
$(document).load('xyz.pdf');
Can anyone suggest the best way for viewing the PDF in a Hybrid Android Mobile App.
with cordova you must think about these:
HTML 5 object tag: not working
If you try with:
window.open('http://www.???.com/my.pdf', '_blank', 'location=yes');
The InAppViewer canĀ“t open this kind of files.
I think that there aren't an hybrid solution for this problem.
You must start to search or write about a plugin that use a native pdf's opening and then use it.
An example:
cordova-plugin-file-opener
The latest solution, a little more simple but include to open google docs is:
window.open('https://docs.google.com/viewer? url=http://www.example.com/test.pdf&embedded=true', '_blank', 'location=yes');
ref = window.open('index.html', '_self');
Go look at the Mozilla pdfJS project.
This project allows you to open a pdf (embedded in app or remote) in your app. No break-out links that relies on native viewers.
They also give you a very full featured sample viewer, that you can use as is, but much of functionality in that does not apply to mobile applications.
I have had success with this on Android 4.3 Devices.
Try installing the InAppBrowser plugin to do so. I have use it to open PDF files right inside the app on both iOS and Android.
Check the official InAppBrowser doc with full doc and examples, it has several options you can enable/disable (be sure to point to your current cordova version documentation):
My solution for connected apps with offline availability...
window.open('http://www.someserver.com/doc.pdf', '_system')
...this will open in default pdf viewer. I have my clients use adobe reader for obvious reasons. And also because once it is downloaded the first time, adobe app manages and edits the documents well, and the documents are also available offline from within adobe reader thereafter. Even pdf forms.
Have cordova.js linked on the page.
Have inAppBrowser added.
For full offline you may try FileOpener plugin. I have not needed to do that on android, but I have used that way in iOS.
Hope any of this may help.
Though am late here, still want to share what I know. You can use this plugin to view PDFs in the app (without inappbrowser). Supports only Android and iOS.

How to download and save a file locally, open it offline using Phonegap?

I am developing a cross-platform application. I came across Phonegap, which supports several mobile devices. But I am new in this field so I'm facing some issues.
I have a requirement, where the user downloads video files from a server and then opens those from local storage from mobile.
So how to achieve this using Phonegap, which should support iOS, Android and Windows.
I have already gone through:
Phonegap - jQuery Mobile - Download/Save/Load File
http://docs.phonegap.com/en/2.0.0/cordova_file_file.md.html#LocalFileSystem
But I'm not getting proper documentation/tutorial. If there are any examples available then it would be helpful to check/debug.
Thanks in advance.
A search on SO shows that on Android there are some issues with HTML5 video and Phonegap:
Phonegap 2.3 and Android with HTML5 video tag in 2013
At least in Window Phone 7 there are some tricks as well (storage path related).
How to play embedded video in WP7 - Phonegap?
Which may explain why there isn't a single multi-platform example which is what I think you are looking for.

Convert HTML5 into standalone Android App

I have a dynamic HTML5 document that does not contain any external resources (no images, css and scripts are coded inside of document). This HTML5 application is working fine with internet browser. I was wondering, if it would be possible to convert this HTML5 application into standalone Android application, so it can be executed directly without browser. Please advise.
Create an Android app using Eclipse.
Create a layout that has a <WebView> control.
Move your HTML code to /assets folder.
Load webview with your file:///android_asset/ file.
And you have an android app!
Edit:
PhoneGap has now been discontinued.
Original answer:
You could use PhoneGap.
http://phonegap.com/
http://docs.phonegap.com/en/2.1.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android
This has the benefit of being a cross-platform solution. Be warned though that you may need to pay subscription fees. The simplest solution is to just embed a WebView as detailed in #Enigma's answer.
You can use https://appery.io/
It is the same phonegap but in very convinient wrapper

Categories

Resources