React application on chrome os - reactjs

I have such problem. I had order on React Native App for Android. After provide prototype client told me that he want it on device (huge tablet) with chrome os. Google answered me that impossible is run on this device Android native apps.
My question is: Does it possible to make in ReactJS/React native webapp for Chrome OS what use device camera and use it for barcode scan? The best by ready barcode scanner component.
I found react-native-for-web but I'm not sure how I should use it. Will appreciate for any hints. Unfortunately information what I found so far are not clear for me.
Also helpful would be information, how I can run any emulator on macOS because this device is far away from me.
Thanks in advance for any information.

Related

Why can't I use Chrome webpages on my android emulator?

Why does my emulator screen look like gibberish?
The emulator works fine, but when I try to visit any webpage on chrome using the emulator, it crashes as you can see.
I don't know where else to look, and I need to get this up and running soon, so I can contribute to my companies repository.
I'm hoping somebody with more experience may have had issues with this and experience handling it.
Note: I had to enable SVM and IOMMU in my BIOS to even get the emulator to start on windows. All because I'm using a Ryzen 5 processor.
Also there are no windows options to enable hyper-v.
Thanks in advance!
-Allen

Codename one: Dont allow to create dual app on same device

I have created app using codename one which can be installed on same device two times with dual app features which provided by android.
I dont want to allow my app to install multiple time on same device so I want that my app should not support that dual app feature so what should i do for that?can you help me to solve this problem?
thanks in advance.
It doesn't seem to be an Android feature but rather a vendor customization. As far as I can tell the whole idea is to hide the fact that this is the same phone from the app developer so there is probably no easy way to detect this.
If you find native Android code that detects it I can explain how you would do this in Codename One.

Running selenium test through physical device

I work on test automation for a mobile version of a website. I have several tests that I generally run through ChromeDriver or Browserstack. However, what I would really like to do is hook up my phone and run my tests through the phone. I have tried appium but I am starting to realize that it is only used for apps and not mobile versions of websites.. Does anyone have any experience in running tests through a physical device? If so, what tools did you use or do you know of any good online tutorials?
Appium IS for testing websites on mobile devices.
You must pass the appium server the browserName parameter instead of the app parameter.
I suggest reading the appium documentation.
I have used Appium, Selenium Grid and testNG to run parallel tests for websites on real devices, so if you need any further guidance feel free to ask.
Hope this helps,
Liam.
Yes of course you van use Appium for mobile web application test. In fact you can use native browser or chrome browser in Android. And Safari browser in IOS.
If you want to start the web automation for Android i suggest you to follow the following tutorial with the example code.
appium-web-application-automation-in-android
I am writing this off the top of my head, not while I am doing it. This often leads to it not being 100% correct. There might have to be made some adjustments.
iPhone
This is what I have done:
Download and run Appium Server
Install xCode Tools
Run iPhone Simulator
Get your devices ID, in console, type
instruments -s devices
Set capabilities
WebDriverManager.setGlobalExtraCapability("platformName", "iOS");
WebDriverManager.setGlobalExtraCapability("platformVersion", "14.4");
WebDriverManager.setGlobalExtraCapability("deviceName", "iPhone 11");
WebDriverManager.setGlobalExtraCapability("appium:automationName", "xcuitest");
WebDriverManager.setGlobalExtraCapability("appium:udid", "your devices ID");
WebDriverManager.setGlobalExtraCapability("browserName", "Safari");
WebDriver driver = WebDriverManager.getWebDriver();
On the phone you have to set some mode, but I can not find anymore, which one that was. (Please write in comments if you know.)
Run Test
I hope I have not forgotten anything, as this was a process.

Cross-mobile background service

The goal is to record and analyze GPS tracks:
For iOS and Android devices with GPS it is required to record/analyze in the same time
For other devices (tablet - desktop) it is enough to analyze previously recorded tracks (in the browser)
It is OK to have some platform-specific code, but I'd like to share "analyze" part between iOS, Android and Web AND to be able to run this code while iOS/Android app is backgrounded.
I have some "analyze" code written in JavaScript, so I started looking for options in this order:
1) Do everything in a web app
iOS Safari stops running JavaScript when backgrounded.
No luck.
2) Use PhoneGap or alike
JavaScript stops when backgrounded. It is proposed to write ALL service code as native plugin.
No luck.
3) Use Titanium
Spent two weeks only to find that Android Service implementation in Titanium is incomplete. It lacks startForeground(..), which is used to ask Android to not kill the service. Someone tried to implement native module for this, but reports that while service itself is running, JavaScript don't.
4) Use Marmalade for mobile and compile C++ to JavaScript for Web
Quick googling said C++ code can't be run from service
5) Use MoSync for mobile and compile C++ to JavaScript for Web
Quick googling said they do not support services. On the other hand I saw startForeground(..) in their sources, so maybe worth rechecking.
7) Write in C: native for iOS, JNI for Android, compile to JavaScript for Web
Haven't checked yet
6) Use Codename One for mobile and compile Java to JavaScript for Web
Haven't checked yet
And my questions:
Q1. Can you confirm for each above option if it can or can not be used for such an app
Q2. I specifically interested in Titanium (as already invested in it). I'm thinking of a native Android module with dummy Service that does nothing but asks Android to not kill its process where real Titanium service is running along side with an Activity.
Will it work?
Q3. Other options / general advice?
Thank you.
When we met the "super-duper" framework limitations I came with native knowledge: add a plugin for Phonegap learn how to link it, write for both platforms.
Titanium no experience, sorry. I don't think I would even open they page to read they hello word.
Back to your original task, just look again outside of your shoes ( as I would ask it and you should respond)
"The goal is to record and analyze GPS tracks:
I'd like to share "analyze" part between iOS, Android and Web AND to be able to run this code while iOS/Android app is backgrounded."
Suggestion 1: Just re-write the code in C / C++. Compile the .so Link with Android SDK / NDK and iOS.
Suggestion 2: "I have some "analyze" code written in JavaScript, so I started looking for options " Move the code to server side, where you will run a node.js and your existing code. Your apps will get a notification with result.
Suggestion 3: Write the real platform specific app finally and use the hardware + OS capabilities fully. The JavaScript purpose it is other then do hard maths.

Where can I find mobile emulators to test my website with?

I want to use mobile emulator/simulators to test my website with. I only found Opera Mini (http://www.opera.com/mobile/demo/) and Windows Mobile 6 (http://www.microsoft.com/download/en/details.aspx?id=9263)
Where can I download emulators for more recent mobile devices?
P.S. Please let me know if this does not belong in StackOverflow, thanks.
I found MITE to be most helpful.
Even better, you get a lot of support for the free version, but (if you pay for Pro) you get almost every mobile browser out there, the ability to remotely test (load speed) and a lot of other cool features.

Resources