I am trying to interact with a website from an android application. More specifically I am trying to login to my online depot and retrieve different data like balances, profit/loss on current day and so on because I don't want to log on to the webpage manually every time I want to see how my stocks are doing. Unfortunately my bank does not have an android app for those purposes.
What I want is an app that automatically retrieves the information from the website and shows it as an notification. So I need to open the website, login with username, password and cookie and then find specific elements (e.g. by css selector).
So far I only achieved something similar with selenium webdriver on windows. Since selenium does not run on android I have to find another solution.
What I have look into so far:
HTMLUnit (not running on android)
HttpURLConnection + JSoup (not sure if this allows me to simulate clicks on specific buttons...)
Robotium (can it only be used for testing apps or also for my purposes?)
Are there alternatives? Can this be achieved with one of the listed tools?
Any ideas are appreciated. Cheers!
Related
We have several landing pages that link to Google Play and iOS App Store. I would love to know the landing page that a person came from within the app code. I have searched around and can't find any clear answer. Lots of gray area.
I just want to access the landing page URL in Java or Swift.
I realize iOS and Android are two separate beasts. But does anyone know how I could achieve this?
You will need to use Firebase Dynamic Links this helps you create various links using various alternatives as shown in this quote from the official Firebase source:
You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app.
Then your app can access the link in code using Java or Swift and the link will work even if the user has your app already in their phone and you can set a logic to handle that too and the links are also automatically direct the user to AppStore or PlayStore depending on which device is used.
Dont worry about whether the link will work for both Android and iOS and you can use the api to access the link as this quote says.
With Dynamic Links, your users get the best available experience for the platform they open your link on. If a user opens a Dynamic Link on iOS or Android, they can be taken directly to the linked content in your native app. If a user opens the same Dynamic Link in a desktop browser, they can be taken to the equivalent content on your website.
In addition, Dynamic Links work across app installs: if a user opens a Dynamic Link on iOS or Android and doesn't have your app installed, the user can be prompted to install it; then, after installation, your app starts and can access the link.
You can get more information on dynamic links here and check if it will solve your problem.
I'm a First time developer who is developing a basic WebView based app for android devices. I have some links that lead to profiles on facebook, twitter & instagram etc. At the moment whenever these links are clicked the relevant profiles open but in website form and not app. How can I make these links open the relevant app instead of the website. For example whenever I click on instagram it loads the mobile website for instagram instead of launching the actual app. Also if I have a telephone number set using href="tel: how can I set it to launch the phone app with the telephone number filled in. Sorry if these are stupid questions but I am very new to app development and am still learning. Many thanks for your time.
You will need to use the application specific URL schemes:
A good read on what this is:
https://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/
Once you understand what this is you will need to do some research to find the URL scheme and correct url for every app you want to target
Example: fb://profile/
Phone number this might work: 2125551212
I have 2 seperate free app versions that I want to promote via one link and have the IOS user sent to an IOS page and the android user sent to the android page. Have googled it and found htaccess answers and answers to send just ios traffic or ipad traffic but not how to split iphone /android on the one page.
Thanks in advance as I am very basic at java etc and still trying to learn.
You could make a simple php script that checks for the browser's user agent and then depending on that redirects to either the android or the iOS page.
I ask a suggestion about a user Experience issueaccessing a browser URL on a mobile phone:
how can a "basic" user EASILY can access a web app on the browser of a handset (mobile phone/tablet, with possibly a solution not dependent on the specific OS (as usual: Android (mainly I'm interested on this OS)/iOS/Windows Phone/etc. on the handset ?
In other terms:
How can I set a simple OS-indipendent (BROWSER-indipendent) URL desktop-shortcut ?
I explain better:
I realized a simple html/css/js/bootstrap web app (e-commerce) to be used from a handset. Some screnshots here:
https://twitter.com/solyarisoftware/status/478946171420155904/photo/1
https://twitter.com/solyarisoftware/status/477373808551411712/photo/1
The web app (that user access through the browser of the handset) could be a possible valid alternative to an expensive native app. But I have this problem:
because my application is an e-commerce (in food realms) that could be used by a vast body of people tipically "inexpert" ... in facts many users that access phone apps have difficulties to just enter a URL on a web browser...
I confess I get bored myself to enter a long URL, let say:
http://mysuperbecommerce.com/mymarketplace/myshop
so, how to do to SIMPLIFY the access to the URL for the lazy/inexpert users ?
I thinked about some possible solutions:
SOLUTION 1. A BROWSER DESKTOP URL SHORTCUT
(obvious! you could say!) Of course, but this is not so perfect:
- is usually a specific feature of the browser... and by example in my case, with an Android phone, with Chrome. Dolphin and native Android browser I get confused myself to save and retrieve shortcuts ...
- is dependendt by the OS
SOLUTION 2. "DIRECTORY" APP LUNCH AN "INTENT"
I thinked about a native app that just act as "redirector", I read here and there some Android code: the native app just start and run the "Intent" giving a URL to the browser... make sense ?
Maybe something interesting here:
Adding URL shortcut to mobile screen through a link on the website
Nevertheless I'm asking if there is a better way, maybe an (Android) app just made with this scope ? (I didn't find it)
SOLUTION 3. HYBRID-NATIVE APP
Ok... Embed the web app in some Hybrid-native framework (as Phonegap/Cordova)
Any suggestion welcome!
Thanks for your patience
giorgio
A possible "solution" for Android OS I used
is this very essential "Web Shortcuts" app:
https://play.google.com/store/apps/details?id=com.unknowndevelopers.bm
BTW, There are someones similar: "ShortcutToURL" or "URLWidget" apps.
Is not a perfect solution, any alternative suggestion still welcome.
I have a number of Drupal 7 websites (http://drupal.org) that have a mobile theme with JQuery mobile (http://jquerymobile.com/) for users browsing with smart phones or tablets. Although this provides a great mobile experience I would like to create an app for the Android and Iphone that uses a few built in features for content creation (mainly just the camera on node creation). I have eclipse and the android emulators all installed and have an installation of Phonegap working for Android testing. Here is where I need some advice on the best approach to my particular problem.
Basically each app can be almost entirely just a webview (easy), but I do need 2 features which should add enough uniqueness to make it able to get approved in the MAC app store.
Ability to add nodes using a REST service (along with phonegap) have access to the use phone’s camera to populate an image field.
A start or front-page has a fast login, and allows instant access to add content (all assets stored locally on phone, so even if the phone is offline, this page will still come up).
Ability to go from the regular mobile site (webview) back to the local node creation page (with access to the camera) or frontage.
Ability to pass something to the webview so I can hide content creation links that access the web version of node creation forms (which would not have the camera for example).
Here is where I’m confused. I don’t want to recreate the entire site and retrieve all the data using services (lots of tutorials and stuff I’ve seen are doing this including DrupalGap - http://drupal.org/project/drupalgap). That seems like a ton of redundant work that will require lots of continuous updates when the site is upgraded and changed with no real gain other than speed (For this it’s ok that it won’t be as fast).
For my mobile apps, when a user wants to view their profile, look at various pages etc, that should all happen in a webview, I only need services and the typical approach to mobile development for the front page, authentication and node creation. The rest should happen in a webview. So what is the best way to switch between adding nodes and authentication using a service and just going to a regular webview? Should I try embedding a webview in a page and having a small menu on the top that doesn’t’ change which links to the add content and login?
How do I setup the session for both the webview content and the service? Or how I can I force authentication through REST and then pass that on to the webview?
You don’t have to answer each one of those directly, I would just like some tips to get me started in the right direction. So far I’m thinking I create a “frontpage” for the app with all it’s assets stored locally on the phone, which has a login which authenticates through a web service (REST). After you login it shows the link to add nodes and a link to view the webview. The big question is how I use the same session for both and how to navigate between the 2 well?
I accomplished the goals stated above, by have the login use a REST service via jquery mobile in a regular html page (like this tutorial http://tylerfrankenstein.com/code/android-app-with-drupal-7-services-phonegap-and-jquery-mobile) this is also where the create content links can be placed. When you want the user to be able to open the "regular" mobile website and already be logged in, use the childbrowser phonegap plugin (https://build.phonegap.com/docs/plugins). Users can close the childbrowser and go back to the main dashboard by clicking the X, or you can create a listener that responds to them vising a specific URL (like the homepage).