Giter Club home page Giter Club logo

android-smartwebview's Introduction

hello there! welcome to my github, I usually do web, cloud tech, sulking and some open source. these days I'm exploring python, machine learning and depression, and I hope to have them all just the right amount this time. phew!


   

android-smartwebview's People

Contributors

akhyariz avatar beiyanyunyi avatar es-que avatar hongwen000 avatar mgks avatar pauln avatar saeedesfandi avatar starman1108 avatar timhj avatar will-ks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-smartwebview's Issues

Multiple files

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...???

Requires media router 25.2.0 - Can't compile

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"

Any plans for 8.0 API 26 Support?

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.

Image upload

Hi,

How can I upload multiple images from media library?

accept="image/*" capture=environment

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

Something went wrong issue

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?

Splash Screen

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!

Take screenshot from HTML Web Page

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?

Navigation

When accessing a link the android asks through which application to open. How do I navigate in the same window?

Litle title mistake

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));

Page reloads every time app is resumed

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?

Error showing on opening another local file

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.

Showing No internet on clicking a specific button

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

How to force open front camera for file upload

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 image via Camera + resize

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

when I build the app it sho me following errors.

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

Enable javascript

Hi @mgks im trying to run the app but im finding a javascript block.
Please help me on this.
khan

Great Job! I am just having 1 issue

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

java.io.IOException: Permission denied at java.io.File.createTempFile

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

ASWP_CAMUPLOAD

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.

App says no internet or slow internet once logged in

screenshot 20

Happens on the emulator and on my galaxy note 8. On wifi and cell internet. I have plenty of mb/s, 200+. I don't know if it is the app, but my site works fine any other way when I access. Any help would be appreciated.

Chris

File chooser display a Camera even if ASWP_CAMUPLOAD is false

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.

facebook share from webview

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.

Message checker

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.

Javascript, Jquery Functions, Onclick

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!

Location error message

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.

Upload Camera File - 0 Bytes

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:

  • Samsung S5 (not working upload camera and file browser working)
  • Samsung S6 (not working upload camera and file browser working)
  • Samsung S7 (not working upload camera and file browser working)
  • LG K410G Android 5.0.2 (working camera and file browser)

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.

screenshot_20180927-174344
screenshot_20180927-174413

What if phone doesn't have external SD card?

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.

WBRTC and MEDIA stream

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

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)

google Play Submission

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.

Music site

Tell me, if I build a music site in the application, when will I turn it off, will it play music?

changing permission request to later + My Contribution :)

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?


And here is my tiny contribution, which will help the shouldOverrideUrlLoading method work on both new as well as old SDKs

//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;
			*******
		}

Project work

Will you be engaged in a project or can you consider it dead? There is almost no activity.

Cookie

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+"

");
return aString;
}

Do you have an idea ? Why are my cookies not found?

Multiload

Multiload - Tell me, is it possible to implement this in order to download multiple files at the same time?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.