On iPhone it is possible to have a local substitution cache, substituting web content at load time.
Ive done some searching, but I cant seem to find anything similar on android? Is there an alternativ for doing this on the android platform?
Stefan
Depending on the API level you are targeting, HttpResponseCache may be what you are looking for. There is some background information here.
Related
I've developed a SQLite wrapper for React Native using C++. The easiest way to get it working was to include the SQLite amalgamation in the sources. This however increases the bundle size significantly. So I want to give the users the option to use the phone's embedded SQLite version.
The iOS version is working (I exclude the sources if an environment flag is present). Android seems a lot more complicated though. Most of the answers I find on google recommend using the amalgamation path. It seems however it is possible to use the phone's SQLite version (it comes by default with the NDK).
I'm currently compiling the amalgamation via CMake.
I'm an Android noobie, would someone explain it like I'm 5 how can I link/access the SQLite headers from my NDK C++ code? Maybe I should just leave the sqlite.h header file and it will link with the phone's version?
EDIT 1: It seems leaving the header file only, does not work. I've also ran into this Hacker News thread. Some of the comments seem to suggest it is not really possible to access things like curl/sqlite/etc from the NDK code. Any thoughts?
Thanks a lot!
Edit 2: I found a link that might work https://blog.katastros.com/a?ID=00200-fd6cd935-b779-4f44-9b4c-efad582167e1
After much fumbling around I've come to the conclusion there is no way to achieve linking the phones sqlite via c++. It is also probably best so, old android versions have outdated versions, vendors also modify the running sqlite versions and they are full of old bugs and broken stuff.
For example, https://docs.flutter.io/flutter/services/NetworkImage-class.html says that cache headers are ignored. My understanding is iOS has an NSUrlCache on disk and it would be nice to be able to enable that. Similarly, I suspect Android has a disk cache which would be nice to enable.
Can I control Flutter's caching? Should I write my own disk cache/caching strategy in Dart on top of/in-front of NetworkImage?
We do not currently have a good way to do this, unfortunately. You could provide your own ImageProvider similar to NetworkImageProvider that had its own cache and implemented the network semantics correctly. We would certainly accept that as a patch if you contributed it. :-)
I have a few questions about webRTC on android. I can say I'm new about android and webRTC but I can also say I made tooo much research about webRTC on android. But still have a few questions. (some of them because of I'm new, and some of them because of I'm okey but not fully)
I'm trying to make an android app which is going to communicate between web browser (first choice is chrome) and android device directly (p2p we can say). So I made too much research and I found webRTC is good for me. Do you advise me something other or is it okey you think? (also I am going to code a plugin for chrome).
Nearly every document says 'android is not directly support webRTC'. So I need something to provide me webRTC on android. What it is? Is it native android that I have to code? Is it native (NDK) library that I have to include my project? Or is it a java lib? Or should I go for cordova/crosswalk or sth like that? I researched all but didn't find something can help me. Yeah there are documents about it but not enough..
Some of documents says, I need chromium. But why and how? They show me lots of linux terminal commands and even there is no a line java or C or C++ code. Even some terminal commands and links that they give is not working.
I read/found/tried these things as a result of my research:
Apache cordova
Crosswalk
http://www.webrtc.org/
https://github.com/webrtc
http://webrtc.github.io/samples/
http://simonguest.com/2013/08/06/bui...t-for-android/
http://orcaman.blogspot.com.tr/2014/...tc-source.html
https://github.com/pchab/ProjectRTC
https://github.com/pchab/AndroidRTC
and something more..
in a nutshell I need help. Please give me your hand. Thank you. (because I'm really very helpless and tried to do my best)
Thank you.
As others have suggested, I recommend checking out g.co/webrtc. As I understand it, your goal is to make Android connect to a web browser using WebRTC. There are two (three) ways you can achieve that.
You can just use Chrome, Opera or Firefox for Android. All these browsers support WebRTC, and it allows you to use the same code for your web app, as for your Android app. With the new Add to homescreen support, as well as support for push notifications from web apps on Android, this could be a very good solution for you.
You can use the Android native WebRTC library, available from WebRTC.org. As mentioned in my article, I recommend using the pristine.io compiled library, available from MavenCentral.
If you can limit your application to Lollipop, you can use WebView, which support WebRTC now iirc. I don't know much about it though.
And the best resource for getting help is discuss-webrtc. It's a lot more active than StackOverflow.
I think somebody heard something about a new format of images - BPG. Can i handle it on Android, any ideas?
PS: BPG is really interesting format, for example, just checkout difference with jpeg
UPDATE another examples of difference here and here
The BPG format is not supported by Android natively.
I've made a small application for Android that decompresses BPG images. You can have a look here: https://github.com/alexandruc/android-bpg, maybe you can reuse some of the code.
For use in the browser, there is a javascript decoder available in the source package.
I don't think this format is supported, yet, according to the Supported Media Formats
But you should give it a try.
Note:
If you meant browser support, you should update your question to let everybody know it.
Edit:
After some tests, I couldn't manage to make it work, even on Lollipop.
Conclusion, it is not supported, yet.
I am not aware of any application on android that is capable of downloading torrents. So in-case I would like to port an Ubuntu application like transmission or another similar light weight application would it be that easy. How much of socket programming would I actually require to do in such a case.
Also if anyone is aware of a project of this nature which is ongoing, I would love to have a look at it. I specifically intend to do this for android 1.6 and 1.5, so I think that makes any new API's which might have been released for this purpose pretty redundant.
dTor is a fairly new but very nice torrent client for Android devices. Despite its poor reviews on the Market, I have found it to be much better than all of the competitors. The developers are very active and there has been updates to it every week for the past month which have been making it much more stable.
You can check it out here: http://www.androlib.com/android.application.com-dtor-jwttw.aspx
Some programs exist under Androïd, but they usually only activate a remote bittorrent client from your computer for a specific file.
However I've heard of two real bittorrent clients projects, but didn't have a look at them :
aBTC : http://www.androlib.com/android.application.org-ale-abtc-qmzp.aspx
Marvin : helloandroid.com/apps/marvin-bittorrent-client
Well, such things exist:
http://www.androlib.com/android.application.org-ale-abtc-qmzp.aspx
http://www.androidzoom.com/android_applications/tools/andtorrent-bittorrent-client_fywo.html
EDIT: however, they are not for free...
To download a torrent application, download utorrent from playstore and torrentsearch app. Torrent search is like a search engine for torrent and when you get the file you want after searching just click on the file and it will automatically download on your utorrent/bittorrent app. This is a substitute for searching on the web browser