Sample Contacts on Android Emulator for Testing? - android-emulator

Short of a) using a real device, or b) exporting/importing contacts via SD card ... then creating the SD card 'file' for the emulator, and importing it after each emulator launch ... is there a more turnkey (saner) way to get a set of sample contacts onto the emulator for test purposes?

Easier than I thought! Whew.
When creating your Android Virtual Device (AVD), be sure to create a SD card of nominal size. (I used 20MB, which is plenty big for my purposes.) That's it in a nutshell.
Start the AVD, launch Contacts, tap Menu and create a few. When you close the AVD and launch next time, the contacts are still visible. Same thing goes for email accounts.

Related

Android cold start How do I find what devices have issues

I uploaded a Flutter app to Google Play Console for some external testers to try.
In the Google Play Console there's a section Pre-Launch Report. In this section's "Overview" there's a subsection called "Performance", in here there are two items:
Cold start time
Your app took 6,982ms to launch for the first time, after being installed on this device model
and
Cold start time
Your app took 8,250ms to launch for the first time, after being installed on this device model
It has an arrow next to both items implying you can find out what device model had these huge start up times.
However, all it does is take me to a list of models that didn't have issues. That's not very useful to anyone.
Is there a way to find out what models it has issues on?
Look closely and you will see the device:

How to receive a text stream in flutter

I have a barcode scanner which automatically outputs the barcode into whichever app you have open in the USB attached windows PC, if it can handle it. For example if I have chrome open, I click the address bar and then scan it outputs to there. Similarly if I click on a website textarea and then scan it'll dump it in there.
I have a simple flutter application which I simply want to detect the scan receival. I don't care how, but I don't even know what exactly to search for to get my answer. My aim is to have a windows app in flutter, which when I scan a barcode it receives this, displays the product details in the flutter screen (aka needs an API call straight after getting the scan). Any help on even what topic to search for will help, cheers.
Barcode scanner: Symcode MJ-340 Automatic Desktop USB Wired Barcode Scanner.
After a lot of trial and error I worked out that a common way to interact for barcodes through USB to apps is via the USB HID aka keyboard presses. By wrapping the app around a RawkeyboardListener with autofocus true, you can filter via RawKeyUpEvent (or down) and then simply set the state.
In my case, it always ended with an enter key to detect the end of a code.

Which option allows me to come closer to creating the most 'real-world' Device in the Emulator?

We are going to use an Android device with a built-in barcode scanner (not a consumer phone such as a Galaxy, etc.)* to run our in-development Android app. For the barcode scanning portion of the testing, I realize that I will need to attach directly to the device (will not be able to use an emulated device for that).
Specifically (probably) the TC55
However, for those portions of testing the app that don't require usage of the barcode scanner (which I can thus test with an emulator), how should I set that up? IOW, what is the closest I can get to replicating that device via emulation?
The reason this is ambiguous is that from the AVD (Android Virtual Device) Manager, there are two options: With the "Android Virtual Devices" tab selected, the "New..." button shows this:
With the "Device Definitions" tab selected, the "New Device..." button shows this:
Am I better off basing my new virtual device on an existing virtual device (which I assume is what you can do with the former dialog) or creating a brand-spanking-new one (with the latter dialog)?
Both options are almost similar. You can notice that the device options you get from under the "Device definitions" tab are also listed under Device: drop down box after you do "Android Virtual devices-> New" .
Also notice the bottom line of the screen under "Device Definitions" . There are two icons informing which are generic definitions and which are custom ones. If you don't find any generic definitions closer to the real device you are targeting build a custom one as per the real device.

How to know if an Android App stores data on SD Card?

This is a research question. I want to know if an Android application stores any data on SD Card. By installing and looking at the directories on SD Card, I know whether an app stores data on SD Card. But, is there an automatic way or tool to know this? Additionally, do you know in which directory the data is stored?
Look in Android Configuration menu, Application Management, and select the application. It will tell you if SD card storage is used or not and how much.
Cedric Simon is correct, but you can view apps data on the sdcard by navigating to the "android" folder on your sdcard, that is where a few apps save there data but apps can save in any location on your sd card and the folder containing data usually has a "." in front off the name to hide the folder from view, for example /sdcard/example (Un-hidden) and /sdcard/.example (Hidden), there is an option to show hidden files/folders on most file explorers.

Force fake location on device?

I need to demo my app to my supervisor. At the minute I have set all the testing up so that it works with the highway drive in cali. When I demo it I will be in an office (stationary) so the real location data for the phone wont show the demo results at all.
Is there anyway to make the iphone do the city drive? - When its running natively i.e. not connected to the machine.
There are various CLLocationManager simulators on github that you could include in your demo build, such as the CLLocationManager_simulator here.
Alternately you can set up your apps to record location data to a file and then create a CLLocationManager simulator that plays back the file. With that testers can record test drives and then devs can play them back in the office to debug or examine what happened or retest with new builds.
If you don't mind using the Simulator to demo it, there's simulated location available. Look in the Simulator menu under Debug -> Location.