Android Studio for blind developer - windows

I am a blind Java developer. I am following a training in full stack JavaScript and we are learning React Native after React for the web.
I would like to test code with Android Studio emulator, instead of installing on a device.
At the moment I am not able to test my code, and it is very disturbing to learn.
Is there a solution for me to use my screen reader (NVDA on Windows and orca on Linux) with Android Studio emulator window? Because actually my screen readers recognize emulator window as a picture, it is not able to focus widgets.
I would like to use emulator and use the integrated Android screen reader talk back in Android Studio to test my code.
I have followed instructions on this page:
https://developer.android.com/studio/intro/accessibility
I use Expo to launch my project on terminal.
I launch Android studio and start an Android emulator.
I used a NVDA which is 32 bits software.
So I had set up a Java 8 32 bits, because it's the only 32 bit version that I found.
I enabled the Java access bridge with command line in JRE 8 directory, but I have also an Open JDK 11 64 bits installed, it could be a problem.
The main problem that I can not get focus on Android emulator windows.

As far as I know, you can't.
If I remember correctly the Android emulator is not a fully fledged VM, like VirtualBox or Qemu, so you can't use it like a device with the full Android operating system.
In simple words, the Android emulator catches all system API calls and makes your application think it is running into a real Android device. So because TalkBack or accessibility services are separated apps and the emulator can't run your application alongside the accessibility services.
I'm so sorry, but probably the simplest way is to grab an Android phone, a used one from E-Bay for example, to connect directly to Android studio and test your apps.
When choosing a test device take into account the fact that most of the time smartphone vendors apply customizations on the Android version that ships with their devices, so make sure that TalkBack is proved to work reasonably well.
About Java, NVDA and AccessBridge: if you are using the latest version, both NVDA and Android Studio, you don't have to worry about AccessBridge and 32bit stuff. I'm pretty sure that with recent NVDA versions the program runs in 64bit mode and Android Studio ships with his 64bits VM with AccessBridge already there, I'm working with this configuration. In case you may try to activate it with jabswitch --enable command.
On Linux the things are rather difficult, you have to use a distributions with all accessibility software up to date, including Java ATK wrapper, but take into account that Android Studio is not officially supported with Linux accessibility framework at the moment so you have to work with Eclipse or with a simple editor like VS Code.

Please use your Android Phone for such features, because Android studio is not a full fledge Emulator. But using your phone continuously with your Laptop/PC can be a big hassle, so using following method (by getting someone's help) get your phone connected to Android studio Wirelessly.
adb tcpip 5555
adb shell ip addr show wlan0
adb connect ip-address-of-device:5555
IP Address can be found in Settings → About → Status.
This is how you can use all android features for blind people.

Related

Will Android Studio work on Mac with an ARM processor?

Will Android Studio work on Apple with arm chips ARM (the new Mac devices)?
Good news !
Edit on May 2021 🎉 🌈
Apple Silicon Support
There is an arm64 version available for Android Studio Arctic Fox (2020.3.1) Canary 15 ... Beta03 You can download it here https://developer.android.com/studio/archive
NDK builds doesn't work
First post
Android Studio 4.1 works, but I'm not able to make Emulator work.
Even the ARM image shows me a CPU does not support VT-x
I can confirm, this preview of Emulator works properly https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html
Since v3 even audio-out works (no audio-in)
Update March 2021
You can simple use one of these and it's working out of the box
For most programming, the chip "underneath the hood" doesn't matter. It only matters if you're working very low-level.
To support old and new apps, Apple will use Rosetta 2, integrated emulation software, to enable ARM-based Macs to run Intel code
The IntelliJ issue for ARM support
The pull request for ARM support on IntelliJ
Intellij (and Google to a lesser extent) has a financial interest in making sure that it does work. Emulation might be slow, but I would be shocked if the IDEs and other tools aren't recompiled to work pretty soon after the release.
Edit: Their IDEs already work on ARM-based Chromebooks, which hopefully means there's little work in making it work for ARM Macs
And on the bright side, emulators will probably be faster?
Android Studio supports it starting at Arctic Fox 2020.3.1 Canary 15. The related ticket.
Android Studio is Basically InteliJ with the Android plugin enabled by default, so if you're impatient, you can use the M1 build of IntelliJ and enable the Android plugin here.
Currently, this has an issue with the bundled sqlite-jdbc not being compatible with Apple Silicon. To resolve this:
Download sqlite-jdbc 3.34.0 or later at https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/
Go to finder > applications > right click on "Intellij Idea" > "show package contents". Go to Contents>lib and replace the old sqlite-jdbc.jar with the latest downloaded sqlite-jdbc.jar file.
Go to https://github.com/google/android-emulator-m1-preview to get an M1 compatible emulator.
I am using Apple Silicon(M1) Macbook and running Android studio on it. There are 2 things -
Does Android studio work on M1 - YES, it is using Rosette2 to convert android studio binary for ARM. And performance is pretty impressive.
Do i have emulator for M1 - YES, download "Android Emulator M1 Preview2" of emulator from here - https://github.com/741g/android-emulator-m1-preview/releases/tag/0.2
Steps:
Double click the .dmg. It will open folder
Drag and move emulator file to Applications
Right click on emulator file and click open. It will show developer security message. Bypass that from "Security & Privacy" window on Mac.
Right click and Open. And it will launch the emulator.
There are few issues with emulator that will resolve in future releases. You can read more on google page - https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html
In android studio, you will see this emulator as "Virtual device" in running device drop. Select and run your app.

Can I connect an iPhone to a windows 10 machine to see my work in Flutter?

I want to see my work without using a simulator from Android Studio. Currently I have an Android Phone and it works when I connect my phone with Windows 10.
Can I do the same with an iPhone?
Flutter relies on Xcode and the iOS SDK to perform the underlying compilation and publishing of iOS apps. Unfortunately, it's not possible to do iOS development on Windows, a Mac is required.
Some googling reveals there are several online services, such as MacInCloud and MacStadium that provide a means to pay for a remotely accessible VM in the cloud if you'd prefer not to purchase a Mac, though not having used any, I can't personally vouch for any of them.

Xamarin workflow on Windows

I'm aware that a Mac or a Mac service e.g. MacInCloud.com is necessary for building and submitting iOS apps.
My question is about the actual workflow of building an app on Windows using Xamarin on Visual Studio 2017.
We need to write code, test and debug throughout development cycle. How does this work with Xamarin running on Windows? How would I actually see what my mobile app looks like or behaves during the actual development cycle?
While developing my web apps in Visual Studio, there are many trips back and forth to the browsers and back to VS in order for me to see the results of my code. How does this work with Xamarin running on Windows? Is Xamarin Live Player the only option for development cycle? Is there a solution through MacInCloud or similar services so that tethering a device to dev machine is not necessary?
I'm just trying to understand how a healthy development cycle is created for Xamarin developers on Windows.
I will answer your question in few section: Coding, Debug, Test
Coding
You will be using Visual Studio to write your codes. iOS and Android code will be written in C#. You will get access to UI Designer for both iOS and Android to edit the layout files and storyboard/xibs. For 3rd party library, there is NuGet to serve your needs.
Debug
You can use Xamarin Live Player without connection to a Mac/MacInCloud for basic preview. However, some features of iOS is not available in Xamarin Live Player (e.g. xibs files not supported...).
If you setup with connection to a Mac, you will be able to see a list of Simulator that available in the Mac you connected to. By default, if you debug it, the simulator will still show up in the Mac. Then you will need to VMWare or remote into the Mac to check the simulator output. If you have Visual Studio Enterprise license, you can get access to a Remote iOS Simulator feature. You will need to turn the option ON. After that, you will able to see a remote iOS Simulator showing in your Windows machine without the needs to remote into Mac machine anymore. For debugging in actual iOS devices, you will still need to plug your device into the Mac. Previously (more than 1 years ago), Xamarin announce that they are working on "iOS USB remoting" to allow you to plug in iOS device into Windows machine and debug on it. But it is not release until now.
For Android, you can get access to Android Emulator Manager to add emulator to debug or you can deploy apps to physical phone just like what you can do with Android Studio.
Test
I will be referring to Xamarin.UITest for this part. You will be able to write UITest code in C# inside Visual Studio. Xamarin have product "Xamarin Test Cloud" to allow you to upload test code and binary and then run your test in cloud periodically. If you want to run the test locally in your machine, you will only able to run Android UITest in windows machine. To run iOS UITest locally, you will only able to run it in Mac machine. Using a Mac, you can also run Android UITest.
You can use a simulator/emulator instead of a device. For iOS, the simulator would run on the Mac Build Host that you are connected to. You can select the option for "Remote iOS simulator" in Visual Studio -> Xamarin.iOS options and you'll be able to interact with the simulator without having to RDP/VNC/look at the mac. For android, you can just run an emulator in Window and interact with it like that. Using your web apps comparison, you would use a simulator/emulator instead of browser but, for the most part, the process would be similar.
I have been developing a Xamarin MVVM app targeted at iOS and Android. I initially did the iOS development on Windows with VS 2022 and an iPhone attached via USB. I knew that I was going to have to eventually move to the Mac for final provisioning but I ended up taking that painful step earlier than planned because certain Xamarin features were just not working on Windows. First I could not get my app icon to be anything other than the Xamarin default and then Xamarin.Essentials.FilePicker would not select a file:
https://github.com/xamarin/Essentials/issues/1710
So after a week of struggling I finally got my project building and deploying on the Mac. However, I am not nearly as comfortable working on the Mac as I am on Windows where I have all my familiar development tools. So then the question was how to share the project files between the PC and the Mac so that I could edit and compile on the PC and then move to the Mac for final testing.
At first I tried iCloud but I could never get the files to sync reliably between the shared folder on the PC and the Mac. I am used to Dropbox and OneDrive, which work as expected. iCloud not so much.
So what I have been doing is committing and pushing the changes to github and then pulling the changes into the project on the Mac. It is quick and has the added benefit of version control using an offsite server. I am happy with this workflow and publishing the app on the Apple Store should be an easy task when that time comes.
Update:
This process is still working for me. I have taken the additional step of doing the release configuration on VS Mac and publishing my app to App Store Connect. That experience was convoluted and frustrating but it now works and I have people testing my app via TestFlight.
One hiccup is that when selecting Automatic iOS Bundle Signing in the project properties on VS Windows, this change gets pushed to the Mac side and causes a build error under Debug until I select the Automatic provisioning profile on the Mac. Somehow it gets set to the Wildcard profile on the Windows side.

Is there a way to convert Windows Desktop applications to Universal UWP and Vice Versa?

In Visual Studio I am trying to decide which type of application I should start with. I want to make it available to as many devices as I can.
If I make a Windows desktop application (.NET/WPF), I could convert it to a UWP but it only targets desktop applications, which is pointless device-wise.
But if I make a UWP, it would work with Microsoft devices, but not ones running a Windows older than Windows 10. A lot of people still use older versions of Windows, and I would rather make a Windows desktop application than limit the use to a specific version of Windows.
It would also be cool to be able to make it work on other devices like Android.
QUESTIONS: Is there a way to convert a Desktop application to a Universal UWP (with or without the code)? Is there a way to convert a Universal UWP to a Desktop application (or make it run on older Windows machines)? If not, what would be the best application type and why?
Also, is there a different application type I should use instead that I'm not thinking of?
NOTE: Microsoft Project Centennial converts Desktop applications to UWP's, but they only work on desktop machines.
I would go UWP and use Xamarin forms if I were you.
Using Xamarin you can write the one UWP app and deploy to Windows, Android, and iOS.
You answered most of your question yourself already. You have the following options (considering you want to continue using your .NET/XAML skillset as you mention WPF and are not looking into a web alternative):
Write a desktop app in WPF: you want to support Windows 7 or need features that are currently not available yet in UWP (some APIs, sandboxed UWP, ..). As you mentioned, you can use the Desktop Bridge to bring the app to the Windows 10 store as well with the downside of not running on mobile, HoloLens, Xbox (as of today). Then again, WPF doesn't run on those platforms either.
Write the app from scratch in UWP: run on Windows 10 on all available platforms. Yes, you will leave the Windows 7 users in the cold but not that Windows 7 is already in the extended support block so people will have to upgrade at some point.
Write the app from scratch with Xamarin.Forms, creating a single app that runs on Windows 7 (WPF), UWP, Android and iOS. Note that this is a somewhat different XAML dialect right now, but XAML Standard is working on unifying the dialects in the future.
A bit more work is to share most of your code with .NET Standard or PCL libraries and write multiple native UI's on top of it (which can be done with Xamarin).
If you're looking for longer term support pick either UWP (the way forward for Windows) or Xamarin.Forms.
Try Microsoft's Desktop Bridge tool for UWP. Using the Desktop Bridge, you can gradually migrate your code to the Universal Windows Platform (UWP) to reach every Windows 10 device, including phones, Xbox One, and HoloLens
Using Desktop bridge tool, you can
Convert MSI to APPX package
Upload your Desktop app (after conversion to APPX package) to Store
Take advantage of UWP features like Live tiles, Push Notification and many more)
And, for Android and iOS app try Xamarin. UWP project cannot converted to xamarin project. You've to write seperate project. I recommend you to try Xamarin.Forms which allows you to boild UWP, Android and iOS app with shared code.

Does Xamarin Monotouch run on Microsoft Windows Phone mobile?

Need to program a GUI for iOS, Android, and Microsoft Windows Phone devices (Windows Phone 7/8).
Does same program written in Xamarin Monotouch C# run on all three platforms?
To elaborate a bit on #choper answer...
Xamarin.iOS (formally MonoTouch) gives you the tools and the API/SDK required to write .NET applications that will run on iOS devices (or the simulator);
Xamarin.Android (formally Mono for Android) gives you the tools and the API/SDK required to write .NET applications that will run on Android devices (or the emulators);
Xamarin.Mac gives you the tools and the API/SDK required to write .NET applications that will run on OSX computers;
All products are based on the open source Mono project. They all provide addins to work with the Xamarin Studio IDE (and optionally XI and XA can work inside Visual Studio, see note).
So the same product won't allow you to write once, run everywhere. However they will let you share a great deal of logic code (often beyond 80%) between the Xamarin-supported platforms and others .NET platforms (Windows, Windows Phone...). Some design patterns (MVC, MVVM) and libraries (e.g. MVVMCross) can help you maximize code sharing - but they are optional (i.e. you can roll your own).
You'll still need to write some user interface code for each specific platform - but that gives you the ability to provide a native, high quality user experience on each platform, without rewriting the application everytime (e.g. ObjC on iOS/Mac, Java on Android and C# on Windows/Windows Phone).
note: A Mac is still required to build/debug iOS applications from Visual Studio.
No, it isn't. It will run only on iOS and also like Xamarin.Android/Monodroid will run only on Android

Resources