how to Implement print functionality on android app - android

I am New to Android Development. Now I want to Implement print functionality on my android app from a webview. In my webpage there is a print button while tap on print nothing is happen. I have written window.print() comment on print button click to print the webpage.

Android doesn't have the native support for the printing yet.
Please have a look on the links below:
Can Android print directly from browser?
https://android.stackexchange.com/questions/30512/how-can-i-print-from-android-phone-through-google-chrome-connected-printer-in-la

Related

How do I trigger a button in an html page, from my android app?

I am working on a simple Home Automation project, using Raspberry Pi3. The basic idea is to have an Android app which can switch on/off an electric bulb. I have created a simple HTML web page which runs a python script to turn on/off the connected relay to the light bulb, whenever I press the corresponding buttons on the web page.
What i want to achieve is to have the buttons on the web page somehow toggled from buttons on a simple Android app.
Please understand that I am almost entirely new to app development and have no interests in further pursuing it. So I am looking for some workaround maybe, or a quick solution that helps me use my already functional web page, just from a simple android app. I would be able to implement the development part, hopefully, if I can get an idea of what exactly do I have to develop for achieving the above mentioned functionality.

Android web automation in app

I would like to make a simple android app that can perform some automated behaviour on the web.
I want to be able to input username/password details and gave my app navigate to a website via a web view presumably and fill in my login credentials and navigate to a particular section of the website.
I realise selenium would be ideal for a task like this but was wondering if anyone had experience of trying something similar and whether it is all possible from inside the Android app rather than running on a standalone server testing the actual app as I realise is selenium/selenedroids main purpose.
Thanks
If your intention is to automate the actions for testing of your web from an Android app, try calabash-android, it's like Selenium for Android.
Calabash-android supports WebView manipulation, in your case entering text as well.
You can use the enter_text method to enter text in a webview (in addition to any other android widget).
enter_text("webView css:'input.login'", "run")
This will enter the text "run" into the first input field of the class 'login'.
Source: https://github.com/calabash/calabash-android/wiki/06-webview-support

Find hyperlink on webview and click on it

I am new on android, but i want to try to write an app for my friend. He is asking for something, who would let him record a sequence of hyperlinks and repeat it. So far i did a webview program, which shows desired web page ( actually it's wap game ) and i know how to do almost everything, except one thing.
So, i want to ask if it is possible to designate what for should program search in webview and if app find it - press on it, for example:
Webview shows a page of game with list of possible actions :
Cut tree,
Dig
and etc.
so, I want to know how i can tell program to press on "Cut tree" and then it should automaticly do it and go to pressed webpage.
I hope that someone understood me.
P.S. sorry for my bad English.
Your webview should allow for standard in-page loading of links. If you need data from the link passed to the app, then you need a javascript bridge:
Android WebView Java-Javascript bridge

Cannot see like option in facebook page from android device

I am trying to open a facebook page from my app in both android and ios. In ios the page shows LIKE button but in android it shows SUBSCRIBE button instead. Can anyone tell me how to change this to like button in android. I have given the screenshots below.
Solved this issue by using the URL fb://page/pageID instead of fb://profile/pageID

Icon that when clicked would launch to my website

I would think this would be one of the simpler and popular app questions on the net, but I have been unable to find any info…
I would like to create an icon that when clicked would launch to my website which has been modified for mobile devices. I would like to make this available on the android market.
Does anyone know how to do this or know where I can find a step by step guide?
Matt
Have you thought of using the WebView control? Then your UI can be a local HTML with an image button and you configure it with an onclick event that refresh the WebView control with your target website?

Categories

Resources