Difference between By and MobileBy - android

I have just noticed in an example here that there are two options of defining locator when working with mobile applications: By and MobileBy. I was only aware of regular Byand simple Google search didn't reveal too much information about MobileBy. Would be great to get some clue about what is the difference between these ones and when (if at all) the usage of MobileBy is preferred?

MobileBy is optimised for MobileUIs mainly for Android and IOS instead of the generic By for mainly web locators. Read through the java docs, hope this helps.

Related

Understanding how to access the embedded secure element

I have been looking at this blog https://nelenkov.blogspot.com/2012/08/accessing-embedded-secure-element-in.html, this is really good however I am having trouble understanding how to add the com.android.nfc_extras to my project. Also, the way the etc/nfc_access.xml file works.
If there is anyone that will help me break through this process then it will be nice, since I am new to this.
It really depends.
The most basic answer is: disregard the article (it's 6 years old, Android changed a lot!) and try to use GlobalPlatform Open Mobile API. It is API for accessing secure elements present on many phones.
Expanded answer: it varies between manufacturers. Some will allow you to access their embedded secure element (eSE) via OMAPI, sometimes you might need to use propietary service as a proxy. One example of vendor-specific service is Samsung KMS Agent (still, eSE is visible in OMAPI).
After that introduction, if you want to access eSE and you are new to this, you probably want to use OMAPI. If you are writing app targeting Android P - great news, OMAPI is now part of Android.
But in reality you would probably target older Android version, so bad news is - you don't know if OMAPI is present on the phone. See: List of OMAPI supported devices
But assuming you have OMAPI present, then take a look at Android documentation for OMAPI: https://developer.android.com/reference/android/se/omapi/package-summary and GlobalPlatform.org documentation e.g. OMAPI docs

Using PyQt5 to interact with HTML content in Android app

As the title says, I need a way to use PyQt5 to interact with HTML/JS web elements from within an app that should be deployed (also) to Android. I started looking at QWebEngine and QWebChannel and the result in terms of interaction is exactly what I need. Sadly, I realized that QWebEngine is not supported by Qt for Android, and I am kind of stuck right now.
I've been reading that is somehow possible to use the deprecated QWebKit instead of QWebEngine, but:
One would need to compile PyQt with QWebKit (and I don't know how to do that)
I have no idea how to replace the functionality of QWebChannel (is this required or should I be able to use it along with QWebKit?)
I don't know if it worths the effort, given that QWebEngine is newer and possibly it will be supported in the (hopefully near?) future.
Last, I should add I don't know anything about QML and its interactions through PyQt, if this is important in this scenario.
Can anybody suggest if using QWebKit now is the way to go, or an alternative path to follow? Should I consider giving up using PyQt for my purpose at present?
-- EDIT1 --
I think I found something interesting regarding using QtWebView.
Qt WebView provides a way to display web content in a QML application
without necessarily including a full web browser stack by using native
APIs where it makes sense.
This is useful on mobile platforms such as Android, iOS, and WinRT;
especially on iOS, where policy dictates that all web content is
displayed using the operating system's web view.
Unfortunately, this imples understanding a bit of QML and using QQuickWidget to embed the QML webview inside a widget (as suggested here).
Does anybody have experience in using QtWebView with PyQt5 and can provide some suggestions? Would this be a reasonable path?

ScrolledListView in Android

I found this Image on the web and want to use a such list in android. Do you have an idea where I can find a such List in Android Studio?
There are certain lists that others have provided as free source code to be used within your applications. What you have discovered is not a built-in feature of Android (the IDE has not relevance on this).
You can however find resources to use a wheel such as those. One of which used in the past has been from the android-wheel code. Most will demonstrate examples and provide useful tips on going forward with implementation. But you can find others if you look hard enough.

android MGBox2 library equivalent?

Is there an Android equivalent of the MGBox2 library for iOS? Thanks for any pointer!
The library seems to actually be mocking the Android API itself in a lot of ways. While it's obviously a bit more fancy, there is a clear mimic of Android naming conventions and ease of use with pre-existing Objective-C (or Java in the Android API) data types.
However, given that you appear to want something with a (bad subjective) "better" interface, I'll recommend DroidUX:
http://www.droidux.com/
I haven't used it myself but man, those apps look sexy. Speaking objectively of course, there's a price tag, which may make it not worth your time.
There are plenty of other custom Views and Animations that the open-source community have created. I'll update shortly to list a few, but you're probably best off with a google search to try and find something that gets you as close to MGBox2 as possible.

Application android Hybrid

I have to develop an android application that use geolocation, and I am confused to choose between web framework mobile and native Android application, and if I must to choose a web frawework which one do you recommend to me?
Actually there are many kinds of framework : like JQuery mobile , Phonegap , titanium , Windev for mobilephones
Regarding the firs part of your question, I'd say this depends on a couple of factors:
1.) Previous experience: Do you already possess experience working with HTML/CSS + JQuery or do you possess experience working with Java? If your answer is yes to the first part: go for web framework development. If your answer is yes to the second part (Java): go for native app development, trust me, it's really easy to pick up if you have already worked with Java before and possess basic knowledge about inheritance and working with packages etc., also, start with the tutorials on developer.android.com If your answer is no to both parts of that question then I'd suggest you go with native app development since picking up Java is relatively easier compared to HTML/CSS+Javascript, in my opinion. If your answer is yes to both parts of the question (i.e you've worked with both Java and HTML/CSS+JS) then look at point 2.
2.) Personal Preference: Clearly, you don't have one right now so just go with what feels easier.
3.) For a geolocation app I'd say native app development is easier, I've been working on a geolocation based app for a while now and I felt that using the Google Maps API was pretty easy and you'll also find significant amounts of help from stackoverflow since everyone and their mothers have tried to make a geolocation-based app. I found the answers to most of my problems here on SO.
If you need more suggestions on this matter don't hesitate from asking!

Categories

Resources