mgks / android-smartwebview Goto Github PK
View Code? Open in Web Editor NEWA simple use webview integrated w/ native features to help create most advanced hybrid applications.
Home Page: https://mgks.dev/smart-webview
License: MIT License
A simple use webview integrated w/ native features to help create most advanced hybrid applications.
Home Page: https://mgks.dev/smart-webview
License: MIT License
Dear sir...
Great Job thanks for making the project open source...
I read the documentation to see how to enable multiple files ...
I made the variable true ...
Then i tested it ...
The problem is i select multiple files but in the page appear that i select one file...???
I get the following error in the build.gradle file for the app module... I can't for the life of me find where mediarouter-v7:25.2.0 is being included though?
"All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 25.2.0. Examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:mediarouter-v7:25.2.0"
Can I do while moving my fingers down the site data was updated?
Notifications and permission changed, also the upload doesn't work when taking picture directly from the camera to a .
I've been using for a while it now and works wonders till API 25.
My question is should I update the code? Or do you have some WIP ?
Thanks for the amazing app.
Hello
quick question regarding geolocation
is there a way to use the geolocation without the use of cookies?
example if i put this site in https://www.w3schools.com/html/html5_geolocation.asp
and hit try it. the location does not load.
Hi,
How can I upload multiple images from media library?
This app supports
<input type="file" name="image" accept="image/*" capture="user">
?
Because the app previously i was using is not working.
Please clarify me. Thankyou
Hello,
I have external links within my app, and when I click those links, I get that notification saying Something went wrong. Also, the page displays this message:
net::ERR_NOT_FOUND or something like that
Any idea what may be causing this?
Thank you for the great script! It's perfect for my project. You have done a great job! And thank you for sharing with us!
I'm having trouble with removing the splash screen. I couldn't find anything about it in the documentation.
Could you please help me out? Thanks in advance!
Hi, it is possible to take a screenshot in the SmartWebView?
I use this javascript code on android and it works with any browser.
<script> $(document).ready(function () { $('#save_image_locally').click(function () { document.getElementById("save_image_locally").style.visibility="hidden"; html2canvas($('#mydiv'), { onrendered: function (canvas) { var a = $("<a>").attr("href", canvas.toDataURL('image/png')) .attr("download", "xxx.png") .appendTo("body"); a[0].click(); a.remove(); document.getElementById("save_image_locally").style.visibility="visible"; } }); }); }); </script>
How can I implement it in the SmartWebView?
When accessing a link the android asks through which application to open. How do I navigate in the same window?
In MainActivity.java I suspect :
case 2:
builder.setTicker(getString(R.string.app_name));
builder.setContentTitle(getString(R.string.app_name));
should be
case 2:
builder.setTicker(getString(R.string.app_name));
builder.setContentTitle(getString(R.string.loc_perm));
im glad to find Android-SmartWebView project in my way and i hope to add OneSignal Push Notification addons in SmartWebView
https://onesignal.com/
Hi, awesome work on this, I'm loving it. I just have one issue, any time the application is left and then resumed (eg. press home and relaunch the app), it does not resume to where it was before; instead it shows the splash screen again and reloads the first page. Is there any way to maintain the current loaded page and not reload?
Hello
This website open in external webbroser: https://www.i-moments.com/online/80050/?origen=app
This website not working: http://imagen.online-convert.com/es/convertir-a-jpg
Can you response to [email protected]? Thx!
Hello.
Thank you for your SmartWebView Code.
I have an error coming in my webview.
i am using local html file for my project
"file:///android_asset/www/index.html"
I am redirecting the user to login.html file if not logged in.
but i am getting an error toast as "Cannot display PDF (login.html cannot be opened)
"
Please let me know how to handle navigation.
This repo is very helpful to me but there is a issue.
When i am clicking on a button which is redirecting me to a folder in my web root, it showing NO INTERNET CONNECTION. While there are some more button of like this they are working properly.
On accessing through browser it is working fine. I am unable to get the problem.
Thanks in advance
I've tried all these:
takePictureIntent.putExtra("android.intent.extras.CAMERA_FACING", android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT); takePictureIntent.putExtra("android.intent.extras.LENS_FACING_FRONT", 1); takePictureIntent.putExtra("android.intent.extra.USE_FRONT_CAMERA", true); takePictureIntent.putExtra("android.intent.extras.CAMERA_FACING", 1);
upload multiple files - does not work for Android 7.0
Hi,
I am using the Camera to capture and upload image, I wanted to resize the image before upload, how can this be done.
thanks
i amusing android studio 3.1.2 and force to change androidTestCompile to androidTestimplementation
Could not find method androidTestimplementation() for arguments [com.android.support.test.espresso:espresso-core:2.2.2, build_dgz0z00s1zugz2h20notdwp5n$_run_closure2$_closure7@3ece0eea] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Open File
Hi @mgks im trying to run the app but im finding a javascript block.
Please help me on this.
Hello,
I love what you have done here. I am just having one issue...
When I put my PAGE URL in, the it freezes my page on load, no links, or js works... But when I put my homepage in, I can browse to the same page url and everything works perfect... I tried substituting my domain in for the domain variable and it did nothing. I though maybe it was the ".html" on the end of the URL, so I did a rerwite without it, and still no change. I noticed a lot of functions that use ASWV_URL and ASWV_HOST... I am busy trying to debug it, but if you have any direction, I would appreciate it. Ty
Hi! Congrats on your work!
I have one problem using the capture feature, to open the native camera. After giving the permission for using the camera, I get always java.io.IOException: Permission denied, so the only intent launched in the capture input is the file chooser.
What I'm ding wrong?
Here is a stacktrce:
java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively0(Native Method)
at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:280)
at java.io.File.createNewFile(File.java:948)
at java.io.File.createTempFile(File.java:1862)
Thanks
Fabian
Everything is working fine.
Thank you for this great project.
I just have an issue managing the CAM_UPLOAD.
I can't find how to set the camera as default to upload an image. When i hit the button to upload an image, it opens the file manager.
I had set ASWP_FUPLOAD and ASWP_CAMUPLOAD as true, and in my html file I use this tag to select an image ""
How can I set the camera as the default, or olny option for upload images?
Thank you in advance.
Can you guide me on how to remove ad banners & assets of it properly?
Thank U!
Code change suggestion :
REPLACE
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (ASWP_CAMUPLOAD) {
BY
Intent takePictureIntent = null;
if (ASWP_CAMUPLOAD) {
takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
OTHERWISE THE TEST
if (takePictureIntent != null)
IS A NON SENSE.
Hi, my app is like a newspaper, and articles have simple links to share on facebook and other social networks. When I click on the share on facebook button, it opens Facebook on a browser, does not try to use native Facebook app. Is there a way to intercept that link and open the facebook app with the link to share? maybe using facebook sdk? sorry Im so new on android dev...
Plus go back to my app afterwards.
Great code! Thanks. I have a question. Can you customize your code for me so that the app runs in background and every 5 minutes sends a request to the server (together with webview cookies) to check for new messages? If there are new messages they must appear as notifications with sound y/o vibration and link to the app? If yes, tell me your price for this.
Hi
i would like to thank you so much for the great job and share with us.
My the app is a mobile responsive website, but when i opened inside the project, my jquery and javascript functions stops.
The variable to enable the javascrit is true, but still not working. Do you have idea what can be?
Thank you very much!
I have enabled geolocation. If a user with location activated on his device uses the app there is no problem, but if the user has disabled geolocation on android settings, the prompt will show everytime the user navigates to another page of the web inside the webview.
Hi This is very helpful file i am using in my project i am using my web url for files
home page is opening but when i click to my button its telling please check your internet connection
first, thank you very much for your work.
I have a problem in which it consists of uploading images with the camera.
taking a picture with the camera and upload.
it shows: name, ext, but with size of "0" bytes and it keeps a corrupt image. :(
The method of file browser works perfectly! :)
Real Cell phones used for test:
With emulador:
Emulador Android Native: Upload from camera and file archive it works perfectly.
Is it just a problem with the samsungs?
PD: Sorry for me english, translation by google.
I am getting the error
Image file creation failed
java.io.IOException: open failed: ENOENT (No such file or directory)
at java.io.File.createNewFile(File.java:939)
at java.io.File.createTempFile(File.java:1004)
at MainActivity.create_image(MainActivity.java:507)
on line 507 the code is
File sd_directory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
return File.createTempFile(new_name, ".jpg", sd_directory);
My phone doesn't have external storage card.
Hi
Than ks for making this project . i came here since the popular crosswalk web view is depreciated witch had a plugin with cordova , i am trying to use WEB-RTC with media streaming and recording options , does Android - smart web view support it ?
Samsung Galaxy Tab 4 7.0 SM-T231 - Prompt when the application starts on this device appears only white screen, how can I fix it?
05-10 09:07:19.752 2614-2614/mgks.os.webview E/EGL_emulation: tid 2614: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH)
05-10 09:07:24.592 2614-2614/mgks.os.webview E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method mgks.os.webview.MainActivity.onResume
05-10 09:07:24.632 2614-2614/mgks.os.webview E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
05-10 09:07:24.762 2614-2614/mgks.os.webview E/EGL_emulation: tid 2614: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH)
Hello friend, your code (transfer of coordinates by cookie is what I needed), Even so, I have a problem, and is that any url that I enter that has a javascript does not work. Example:
Http://201.150.28.202/smarttrash/index.php?au=58263EE891CCBB4F7428C994EBA47CDB
The idea of this show the location on the map, but unfortunately the JS hangs, what can it be?
Thank you very much.
Hi!
I am a new guy and learning about developing apps.
I came to know google is too hard to developers since it suspends app without any information.
Can you please guide me about it?
Thank U!
I asked you because I decided to use your template.
when i take a picture from camera, and the image will show in this img using this jquery, it works in oreo but is does not work in marshmallow.
Look at in this jsfiddle http://jsfiddle.net/t6UP5/978/
Hai. I want to open other sites in chrome custom tab. I can setup intent for chrome CT. Can anyone guide me to where to put the code which overrides the default action? If anyone has code similar to this place give me.
In the file chooser, it allows you to take photos. The camcorder button is greyed out even when I try select that. But you can select previously recorded videos.
Tell me, if I build a music site in the application, when will I turn it off, will it play music?
The app crashes when downloading a pdf file.
cl.
hi, thanks for this awesome code, i try it with google map javascript and geolocoding api, but gps location doesnt seem to work. have anyone have this problem?
example
https://developers.google.com/maps/documentation/javascript/examples/map-geolocation
Downloading a file on server now works fine. However when trying to download a file served by a perl script via Content-Disposition: attachment; filename="xyz.txt", the file is not downloaded.
cl.
First and foremost, THANK YOU for providing this.
Currently, when I start the app, it'll ask for permission to access files. Due to the following line in onCreate:
if (ASWP_FUPLOAD) {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 2);
}
}
This doesn't make sense unless the app's entire purpose is to upload files. Otherwise, it'll confuse the user as to why the app is asking for permission. is it possible to move this request to After the user clicks Browse in an upload form?
//Overriding webview URLs
@SuppressWarnings("deprecation")
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
boolean a = true;
*******
}
@TargetApi(Build.VERSION_CODES.N)
@Override
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
String url = request.getUrl().toString();
boolean a = true;
*******
}
Will you be engaged in a project or can you consider it dead? There is almost no activity.
Hello,
Jen'arrive not to recover the cookies on my web page created by the webview like for example cookie "lat" and "long".
I do this with js:
function listCookies() {
var theCookies = document.cookie.split(';');
var aString = '';
for (var i = 1 ; i <= theCookies.length; i++) {
aString += i + ' ' + theCookies[i-1] + "\n";
}
document.write("
"+aString+"
");
Do you have an idea ? Why are my cookies not found?
Multiload - Tell me, is it possible to implement this in order to download multiple files at the same time?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.