android-webview

Can't open a local PDF in webview using file://

回眸只為那壹抹淺笑 提交于 2021-02-08 05:50:51
问题 I need to display a PDF file located in my app dir in a webwiev without using Google Docs. This is my code for the webview: public void OpenPDF() { WebView webview = new WebView(this); setContentView(webview); webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl("file://mnt/data/data/com.example.android/files/Docs/test.pdf");; } I get a blank webview instead of below code works public void OpenPDF() { WebView webview = new WebView(this); setContentView(webview); webview

My Webview App keeps crashing for messenger chat

别来无恙 提交于 2021-02-08 02:39:34
问题 Everything works as it should except messenger. Code if (url.startsWith("www.messenger.com")) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent); return true; } For messenger even for this general intent code it doesnt show the option to open with messenger if (url.startsWith("intent")){ Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_VIEW); if (sendIntent.resolveActivity(getPackageManager()) != null) { startActivity(sendIntent); }

My Webview App keeps crashing for messenger chat

断了今生、忘了曾经 提交于 2021-02-08 02:37:51
问题 Everything works as it should except messenger. Code if (url.startsWith("www.messenger.com")) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent); return true; } For messenger even for this general intent code it doesnt show the option to open with messenger if (url.startsWith("intent")){ Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_VIEW); if (sendIntent.resolveActivity(getPackageManager()) != null) { startActivity(sendIntent); }

Android Stripe Connect WebView - Create Account Form NOT loading

╄→尐↘猪︶ㄣ 提交于 2021-02-05 12:05:11
问题 As is known, there is no Stripe Connect feature for Android unfortunately so I'm following a somewhat known workaround using a webview like this one and this one. I'm trying to get my Webview for Stripe Connect to work however the form to fill out for creating a Stripe Connect Account doesn't load, only the top portion does. See snippet#1 . However, if I open up my chrome browser on my android emulator, the entire form loads(form inside red box). See snippet#2 I have javascript enabled but it

Android Stripe Connect WebView - Create Account Form NOT loading

喜欢而已 提交于 2021-02-05 12:04:40
问题 As is known, there is no Stripe Connect feature for Android unfortunately so I'm following a somewhat known workaround using a webview like this one and this one. I'm trying to get my Webview for Stripe Connect to work however the form to fill out for creating a Stripe Connect Account doesn't load, only the top portion does. See snippet#1 . However, if I open up my chrome browser on my android emulator, the entire form loads(form inside red box). See snippet#2 I have javascript enabled but it

Calculating data downloaded by webview for a given url by using webview client?

╄→гoц情女王★ 提交于 2021-02-04 16:28:27
问题 I'm trying to calculate the data downloaded in my WebView . Following is my WebViewClient WebViewClient mWebViewClient = new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); Log.e(TAG, "init onPageFinished()"); } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); Log.e(TAG, "init onPageStarted()"); } }; Also to calculate data I'm using: mWebView

How to prompt user to enable gps

﹥>﹥吖頭↗ 提交于 2021-02-04 08:09:10
问题 I am trying to prompt the user to enable gps, i tried many times to resolve issues but not able to clear it.I am new to android can any one please help me........ My mainactivity.java, public class MainActivity extends AppCompatActivity { private WebView view; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView.setWebContentsDebuggingEnabled(true); WebView view = (WebView) this.findViewById(R.id

How to prompt user to enable gps

末鹿安然 提交于 2021-02-04 08:08:24
问题 I am trying to prompt the user to enable gps, i tried many times to resolve issues but not able to clear it.I am new to android can any one please help me........ My mainactivity.java, public class MainActivity extends AppCompatActivity { private WebView view; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView.setWebContentsDebuggingEnabled(true); WebView view = (WebView) this.findViewById(R.id

How to prompt user to enable gps

拟墨画扇 提交于 2021-02-04 08:08:11
问题 I am trying to prompt the user to enable gps, i tried many times to resolve issues but not able to clear it.I am new to android can any one please help me........ My mainactivity.java, public class MainActivity extends AppCompatActivity { private WebView view; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView.setWebContentsDebuggingEnabled(true); WebView view = (WebView) this.findViewById(R.id

How to programmatically include the mouse cursor in android tv

こ雲淡風輕ζ 提交于 2021-01-29 13:33:46
问题 I use Webview, which loads random sites. For good navigation I need to turn on the mouse cursor, which will be controlled by D-pad, but I did not find information on how to do it, maybe someone can have developed such navigation, I will be grateful for any help. 回答1: Use pointer capture A view in your app can request pointer capture only when the view hierarchy that contains it has focus. For this reason, you should request pointer capture when there's a specific user action on the view, such