Giter Club home page Giter Club logo

flutter_web_browser's People

Contributors

dudeofawesome avatar ened avatar felix-barz-brickmakers avatar iliyazelenko avatar kelburke avatar mosc avatar niggelgame avatar olivierbrand avatar victorbonnet 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

Watchers

 avatar  avatar  avatar

flutter_web_browser's Issues

Can't open the URL with view-source

I tried to open the URL like
view-source:https://www.google.com/ but I can't open the URL its says

" PlatformException(LAUNCH_ERROR, No Activity found to handle Intent { act=android.intent.action.VIEW dat=view-source:https://google.com }, null)"

I try to open the URL using the webview_flutter, then it's working fine.

the view-source also works in the chrome browser.

Is there is any way to open that URL by using custom tabs?

FlutterWebBrowserPlugin.java uses or overrides a deprecated API

Building flutter_web_browser 0.17.1 gives the following warning:

Note: /opt/homebrew/Caskroom/flutter/3.3.8/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web_browser-0.17.1/android/src/main/java/dev/vbonnet/flutterwebbrowser/FlutterWebBrowserPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Can't open the in-app browser

I have used the example program to test the plugin here but it didn't work.

The error message after clicking on button reads:

E/flutter ( 8046): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: MissingPluginException(No implementation found for method openWebPage on channel flutter_web_browser)
E/flutter ( 8046): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:7)
E/flutter ( 8046): <asynchronous suspension>
E/flutter ( 8046): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:334:12)
E/flutter ( 8046): #2      FlutterWebBrowser.openWebPage (package:flutter_web_browser/flutter_web_browser.dart:15:21)
E/flutter ( 8046): #3      _MyAppState.openBrowserTab (package:inappbrowser/main.dart:36:29)
E/flutter ( 8046): #4      _MyAppState.build.<anonymous closure> (package:inappbrowser/main.dart:48:30)
E/flutter ( 8046): #5      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19)
E/flutter ( 8046): #6      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1098:38)
E/flutter ( 8046): #7      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24)
E/flutter ( 8046): #8      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11)
E/flutter ( 8046): #9      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5)
E/flutter ( 8046): #10     BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:219:7)
E/flutter ( 8046): #11     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:477:9)
E/flutter ( 8046): #12     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:78:12)
E/flutter ( 8046): #13     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:124:9)
E/flutter ( 8046): #14     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter ( 8046): #15     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:122:18)
E/flutter ( 8046): #16     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:108:7)
E/flutter ( 8046): #17     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:220:19)
E/flutter ( 8046): #18     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22)
E/flutter ( 8046): #19     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7)
E/flutter ( 8046): #20     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7)
E/flutter ( 8046): #21     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7)
E/flutter ( 8046): #22     _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter ( 8046): #23     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter ( 8046): #24     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter ( 8046): #25     _invoke1 (dart:ui/hooks.dart:267:10)
E/flutter ( 8046): #26     _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)
  • Flutter (Channel stable, 1.20.1, on Linux, locale en_US.UTF-8)
  • Android SDK version 29.0.2)
  • pubspec.yaml:
dependencies:
    flutter_web_browser: "^0.11.0"

Safari always opens reader mode

No matter if I set entersReaderIfAvailable to true, or false, Safari always enters Reading mode on the websites I visit. In ios simulator 13.6 and on a real device

App crashes when using package on IOS

The package works as expected on Android but crashes on the ios simulator and on physical devices with this error:

*** First throw call stack:
(
	0   CoreFoundation                      0x000000010ab9b6fb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x000000010b19bac5 objc_exception_throw + 48
	2   CoreFoundation                      0x000000010ab9b555 +[NSException raise:format:] + 197
	3   SafariServices                      0x000000010a5435a8 -[SFSafariViewController initWithURL:configuration:] + 105
	4   SafariServices                      0x000000010a543b46 -[SFSafariViewController initWithURL:] + 94
	5   Runner                              0x0000000103a6b0a4 -[FlutterWebBrowserPlugin handleMethodCall:result:] + 788
	6   Flutter                             0x0000000107ea2818 Flutter + 514072
	7   Flutter                             0x0000000107e42476 Flutter + 119926
	8   Flutter                             0x0000000<…>

Cant Get iOS to build

The example in this repo works, but when including this plugin via git, the following error shows when building for iOS:

/Users/matthew/Development/hackwinds_cameras/hackwinds_cameras/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'flutter_web_browser/FlutterWebBrowserPlugin.h' file not found
    #import <flutter_web_browser/FlutterWebBrowserPlugin.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
Could not build the application for the simulator.

Any help would be awesome. Otherwise I can just re-write it myself for local use. Thanks!

Adding install_referrer in merged manifest file.

Since google is deprecating install_referrer we won't be able to use that post 1 March
steps to reproduce:
Create an app with

  • Create an app with flutter_web_browser plugin in it
  • open the terminal and write flutter create apk
  • goto Build in android studio click analyse apk and search for apk you just created and click on it
  • Goto androidManifest.xml
  • search install_referrer
  • command click on that it will take you to flutter_web_browser plugin

License ?

Hello.
First of all this project looks awesome πŸ˜„

Can you please choose a license for it ?
I would recommend Apache 2.0 or MIT.

Thanks.

[Request] Method to close the web browser

I was wondering if you could implement a function to close the tab previously opened with openWebPage. This would help me on an app that requires some permissions from the user; after accepting these permissions, they have to manually close the page and I think that this should be done automatically.

Is it possible to access the browser cookies?

We have an app that opens links to the company website using flutter_web_browser, that website uses cookies for a variety of reasons. As of iOS 14.5, Apple requires that apps on the App Store need to receive the user’s permission before collecting data used to track them, and provide an option to opt out of cookies. Since the website is developed by a different team, the easiest way to deal with this issue would be to manually access the browser cookies and set permissions to off. Is it at all possible to do it using this library?

onURLChanged calls 2 times everytime URL change

I have some functionality on URL change (I'm opening external links in the browser instead of webview) but it opens the browser 2 times and when I checked it using STOP POINT the reason is it calls function 2 times every time URL gets change.
I'm using flutter_web_browser for opening up links in chrome.

Package doesn't open specific apps on iOS

When I try to open twitter.com on Android, it redirects me to the Twitter app, as expected.
But when I try this on iOS it doesn't happens.
Is this an issues regarding iOS URL management? Can this be fixed?

Passing Header Parameters

Hey there πŸ˜„

Chrome allows passing custom headers as a Bundle, I don't know about the impl. detail for iOS.

Is it possible for the plugin to support custom headers? I have used them on Chrome before, so I can try submit a PR. I'd need help on iOS though.

Bundle headers = new Bundle();
headers.putString("header1", "value1");
headers.putString("header2", "value2");
customTabsIntent.intent.putExtra(Browser.EXTRA_HEADERS, headers);

openWebPage doesn't return

await FlutterWebBrowser.openWebPage(url: url); hangs forever

private void openUrl(MethodCall call, Result result) {
String url = call.argument("url");
String toolbarColorArg = call.argument("android_toolbar_color");
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
if (toolbarColorArg != null) {
int toolbarColor = Color.parseColor(toolbarColorArg);
builder.setToolbarColor(toolbarColor);
}
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(activity, Uri.parse(url));
}

result is unused and never completes the platform channel call.

It should at least result.success("launched") be called after successfully launching the intent.

[Request] Method to change the modal presentation style

Hi, dear author
The navigating behavior of "openWebPage" in the plugin is right_in and right_out. I hope there is a parameter to set, which can be set to pop up (bottom_in and bottom_out)
I was wondering if you could implement a function to change the modal presentation style, example as below, thanks

iOS
sfvc.modalPresentationStyle = UIModalPresentationOverFullScreen;
image

Android
image

Uses or overrides a deprecated API.

I get error

flutterwebbrowser\FlutterWebBrowserPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

run script after browser close

I'm doing the next

print('\n\n\nBefore');
FlutterWebBrowser.openWebPage(url: 'http://google.com').then((value) {
  print('\n\n\nAfter 2');
});
print('\n\n\nAfter');

the console prints this:

Captura de Pantalla 2020-05-18 a la(s) 17 22 40

"after 2" appears nowhere after the close

is this the expected behaviour?

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.