Automation for mobile devices - android

Do we have any separate tool or add on like anything to get the x path in
android devices?
Else how can i get the values for android mobile devices?

It seems that you are asking about, How to inspect element in the android app, to find an element ID.
If you are using Native android application, then Android Studio is giving facility to inspect UI elements.
Once Android SDK installed, navigate to link
c:\users\username\AppData\Local\Android\sdk\tools you'll notice a batch file with name 'uiautomatorviewer.bat'. Double-click on it to launch "Uiautomatorviewer" GUI.
If your app is using web-view then you can use Google-inspector
Google-chrome-devtools

Related

PWA - Android, iOS, MacOS, Windows Store, Chrome Add to Home Screen - Problems with multi tenancy app with multi domains

I have couple questions about generating PWA App. Maybe at the first step I explain something about app for better understanding my problems with generating app for multiplatforms.
Multi Tenancy App
I can't say much more about application. This is application where users can create own account. Accounts is separated at servers, eg. app1, app2, app3 etc. Every server has his own domain, eg. app1.example.com etc. Every user can upgrade his account to premium type and define own domain, which can be go on and login to his account without using global domains (here is a problem with PWA app, multi domains). I think it is everything what you need to know, if you need more specific info, give me a feedback, I will try to help you. I need to use WebView because app need access to localStorage.
My problems
Problem is with multi domains. In manifest.json configuration is possible to define one domain, which app will be use to display application and authorize it (with assetlinks.json) to don't display URL Bar (for "Add to Home Screen" - with android app is possible to add wildcard).
I need possibility to use application with multi domains (I achieve it on android - explanation in the following part of post).
Problem is too with adding application from mobile Chrome "Add to Home Screen" and on the desktop "Install app...". After redirect to other URL, URL Bar is shown.
Next problem is to compile Windows Store app from Visual Studio (explanation in the following part of post).
I need more info about compiling app for iOS and MacOS - is this possible to compile and test it without Apple devices? I tried to use pwabuilder.com, but after download MacOS package folder is empty. Maybe virtual machine could help me with that? What you recommend too use to make that application? I tested what I found in google, but it wasn't what I expect.
Installation from Chrome browser
Is possible to change user URL without showing URL Bar? Now after autorization user and redirect him on the properly his premium address url bar is showing - i don't want users to have to go on properly domain and install app from "Add to Home Screen" - they should install it from any domain and use it like Native App.
Android
Partially solved problem with subdomains for every account. It's working properly, but maybe someone has any other authorization solution where I don't need custom subdomain for authorize app.
Windows Store
I installed Visual Studio, make new application with this documentation but I getting error
Error Project must have a reference to an application. Please add a reference under the 'Applications' node in the Solution Explorer.
Here is an issue - Maybe problem is with newest version of Visual Studio? Next question is, even if I compile the App, what with multi domain - URL Bar will be visible when user will be redirected? What if Chrome don't be installed?
iOS and MacOS
Maybe someone has good documentation how to create apps on this platform and where can I test it? What with multi domain? URL Bar will be shown? Is possible to make it invisible like an Android App eg. wildcard or other solution?
My questions
How to create PWA app for iOS and MacOS. Maybe is nice documentation for it.
How to build application for Windows Store. I made app with Microsoft documentation, but it doesn't work - problem was open on GitHub Issue, but without solution.
Is possible to use multi domains and don't show URL Bar for applications installed from mobile Chrome like a "Add to Home" or desktop Chrome "Install app...".
What if Chrome don't be installed on device? Application will be working properly? I know from android 8.1 is possible to remove chrome from android. I don't know if after remove Chrome application will be working?
Thanks everyone for help and your patience, I counting on much help from you.
I'm recently building a PWA with Vue and I'm trying to find a way of making the IOS package out of It. So far I haven't done yet but for Windows, Android & MacOs are pretty easy ... There a lot of blog tutorials for that and if you don't want to go through much of coding then the PWA Builder is the best option for you.
For your 4th question if you want to run a PWA from a browser the browser you have must support standalone desktop apps.
I wanted to try my PWA on iPhone from Chrome and couldn't because that chrome does not have the feature to pin an app to screen so I had to rely on safari only

Gamemaker Studio Android open browser

I am trying to launch a website from within an Android game. When the user clicks a button it should launch the website. open_url() and open_url_ext() etc. works for windows, but does nothing for the android export. Is this possible with gamemaker?
This seems to have been an android access problem, not a function in gamemaker issue. After testing across a range of devices and android versions I found that sometimes the function works and sometimes it does not. One some devices, I have to allow access to local media. So to answer my own question - it is possible in gamemaker provided the OS allows the activity.

How to embed a website into an Android App?

I have a mobile website, users user smart phone browser to access my site.
Now some users would like to have an Android App.
So is there any easy and fast way to create an Android App which will access the existing mobile website so that I can have an Android App without developing Android app?
You would have to create a "wrapper" Android App. That is a native Android App with a Main Activity that contains a WebView with JavaScript enabled and some sort of navigation controls either on the mobile website or the native app (buttons or menu) but you could bump into problems such as:
Users being stuck in a particular page with no way to navigating back or forward.
Google is now more picky with the apps and they have policies to reject or ban apps that are only wrappers or point to external websites (kind of what Apple did for iOS)
Any case, you would have to create a mobile layout for your website or a make it responsive (special CSS and JS UI/UX that fits better on mobile devices).
Another alternative is to make your website compatible with PROGRESSIVE WEB APPS (https://developers.google.com/web/progressive-web-apps/) which is basically a Web app with some special elements that allow it to receive push notifications, put a shortcut or app icon on the device's home screen, etc.
Good luck! Hope this helped!
You can use android WebView. For more details you go through the link Android Webview
the only way to do that, using WebView on your apps or you need to create manually
You can put your code into Cordova and convert it into other IDE like android studio or eclipse .
reference:
Import Cordova project in Android Studio

Cordova / PhoneGap : open file from other app

I recently started working with PhoneGap based on cordova to build an app for ios, android and windows phones.
For now I'm testing it on iphone, which is the main platform for this app and this question as well.
To make it easier, lets call my PhoneGap application "Scanner".
Here's what I'm trying to achieve:
You're in a random app, lets say the mail app. Click on an attachement and select "Open with..." Scanner. That should send the file to the scanner and send the path of that file to a javascript variable.
For now, I had no problem opening the xcode build and adding the document type, so my app is displayed in the open with menu.
Any idea how to get the app to display a file ? A pdf for example ?
If there's a global solution for the 3 platforms, that would be like heaven...
Thanks to all of you !
What you need is called "deep linking"
some plugins.
https://github.com/nordnet/cordova-universal-links-plugin
Happy codding!
******************* Edit *******************
I see your need, you are talking about Uniform Type Identifiers, but I dont find any information about how to use in cordova. Probably you will need to write your own plugin
https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319

Accessing device native features in cordova webview

I am making a Hybrid Application using cordova-cli. My requirement is that the first page in my application must redirect to a website. The entire data required for the application will be loaded into this website from some other data-sources.
The requirement is to access device native features such as camera, accelerometer etc. from pages on this website.
I am using
location.href="http://www.example.com";
to open the pages. I need a unified cordova.js file with all the plugins embedded into it.
Currently I am putting the individual plugins into the lib\android\plugin\android and by using the grunt -f command from grunt-cli, the cordova.js file recieved for android does not seem to produce expected results.
Can't be done I am afraid - because of the way Cordova interacts with the device.
What happens if, using a non-mobile device, you accessed the same website from elsewhere? The website will not know what on earth Cordova is.
Cordova interacts with the native code on the device, so requires this to handle the passing of JS-to-native, and vice-versa.

Categories

Resources