I m using android view client to find id using the command "java -jar androidviewclient-3.0.0.jar dump",it is showing id for some screens but on some screens thre error is "UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-60: or inal not in range(128)" can anyone explain me what is the problem??
Give the latest AndroidviewClient release (https://github.com/dtmilano/AndroidViewClient/releases/tag/v3.1.2) a try. UTF-8 support is constantly improving.
Related
I have a problem that is happening in Xamarin Forms UWP and perhaps also will happen in Android and iOS.
I have on XAML side a entry text field called for example textEntry.
I have on code side the definition textEntry.Completed += textEntry_Completed
on my textEntry_Completed I should have the content of the textEntry.Text.
When I write via keyboard something and press return, on the textEntry_Completed I get the textEntry.Text value correctly.
When I use a barcode scanner with keyboard emulation that after reading is also appending a return code, I get a textEntry.Text empty string inside the textEntry_Completed.
How can I solve this situation ?
Thanks,
Paulo
I have small app which runs on iOS and tvOS where I’m displaying a video in UIView.It does support iOS 12 and tvOS 12.
Now want to show PIP for tvOS hence trying to use AVPictureInPictureController gives error “Use of undeclared identifier 'AVPictureInPictureController”.
Even though deployment target set to tvOS 13. In Xcode, capabilities -> Background mode -> enabled “ Audio,Airplay and Picture In Picture”.
This basic code gives error.
#import <AVKit/AVKit.h>
if ([AVPictureInPictureController isPictureInPictureSupported]) {
// code
}
Any other settings missing or something else I need do ?
Thanks
Not supported in tvOS, as stated in Apple's documentation
SDKs
iOS 9.0+
macOS 10.15+
Mac Catalyst 13.0+
POSSIBLITY OF ISSUES DUE TO THE GAPS IN IMPLEMENTATION :
Experince with the AVPlayerViewController:
Initially make Sure that we set Playback audio category, Generally when we use a AVPlayerViewController to play video content. PIP mode will automatically get invoked if the developed application enters background , but only if satisfies the below mentioned condition,First one is the Player which we are using should be in Full Screen mode,the second is we should make sure that the Video Should be Playing in it and third one is PIP Should be supported by the device and last of all write delegate method to restore our player UI when the user returns from Picture in Picture mode.
Implmentation with _AVPictureInPictureController :
You can find an working example in the below thread.
How to display AVPictureInPictureController?
Drilling down the issue:
In order to confirm the undeclared error was not due to the gaps in implementation and it was due to environmnet in Xcode, Download the source and then add the Sources folder inside another folder in your workspace.Add the folder using "Add Files to ..." option and now verify inside xcode.
POSSIBLITY OF ISSUE DUE TO REFRESH IN THE XCODE
Try Fix By Approach 1
Include the class explicitly in header and/or body - instead of the *.pch file. Then this error might go away. Also deleting the derived data workes once in a while. Did you change the location in preferences recently by any chance. Some get this error when they use a ramdisk for derived data and then they go back to default. This is the most annoying case - since it causes this error to appear then in almost every file.
Try Fix By Approach 2
Sometime a simple solution might help delete one of the #import lines from the pch file and recompile which will fail as expected.Then put the deleted line back in, recompiled and it compiled normally with all the false errors gone.
POSSIBLITY OF ISSUE DUR TO XCODE ERROR CACHE, FOLLOW THE BELOW STEPS
Clean Build : Command-Option-Shift-K to clean out the build folder.
Reset Simulator : choose iOS Simulator > Reset Content and Settings
Restart Xcode
Delete your DerivedData folder in ~/Library/Developer/Xcode/DerivedData
Restart Computer
Delete the /var/folders in a very targetted way.
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
Source:
How to Empty Caches and Clean All Targets Xcode 4 and later
Xcode "Use of undeclared identifier" errors, compiles/runs just fine
Use of undeclared identifier in Xcode 9.0
https://developer.apple.com/documentation/avkit/adopting_picture_in_picture_in_a_standard_player
To create a simple video player
First, you'll need to implement a basic video player in your project's ViewController.m file, like so:
#import "ViewController.h"
#import <AVKit/AVKit.h>
#interface ViewController ()
#property(nonatomic) AVPlayerViewController *playerViewController;
#end
#implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor blackColor];
// Create a stream video player.
AVPlayer *player = [[AVPlayer alloc] init];
self.playerViewController = [[AVPlayerViewController alloc] init];
self.playerViewController.player = player;
// Attach video player to view hierarchy.
[self addChildViewController:self.playerViewController];
self.playerViewController.view.frame = self.view.bounds;
[self.view addSubview:self.playerViewController.view];
[self.playerViewController didMoveToParentViewController:self];
}
#end
For further help go through https://help.apple.com/xcode/mac/8.0/#/dev51a648b07
I have followed the following URL : https://github.com/aritchie/bluetoothle
But I didn't get that much clarity, is there anyway to get he solution a bit easily ? I just need the list of devices and RSSI....
I'm using plugin from https://github.com/xabre/xamarin-bluetooth-le. To scan the list of devices:
adapter.DeviceDiscovered += (s,a) => deviceList.Add(a.Device);
await adapter.StartScanningForDevicesAsync();
There is also a sample app in the plugin source code for reference.
I've noticed that this qr-code is not recognized by the current version. I downloaded it from the wikipedia page about qr-codes. https://en.wikipedia.org/wiki/QR_code its v25. I did test it in the online zxing decoder found here: https://zxing.org/w/decode.jspx
The Zbar app does not recognize it either. But apps like 'DataMatrix scanner' do without problems.
Is this a bug?
ZXing only supports up to v20 QR code at mobile client, you can find from the source codes, I attach the codes as follows:
protected static final int MAX_MODULES = 97; // support up to version 20 for mobile clients
I have been using pyudev to look for bluetooth devices and then used the "features" attribute to determine if the device has LE support. However, just recently in the latest version of Ubuntu, udev no longer reports anything for "features".
Here's what details I do get:
$ udevadm info --attribute-walk /sys/class/bluetooth/hci0
looking at device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0':
KERNEL=="hci0"
SUBSYSTEM=="bluetooth"
DRIVER==""
ATTR{name}=="ubuntu-0"
ATTR{type}=="BR/EDR"
ATTR{address}=="08:3e:8e:xx:xx:xx"
And then on another device that is continuing to work as I expected I get:
$ udevadm info --attribute-walk /sys/class/bluetooth/hci0
looking at device '/devices/platform/sw-ohci.1/usb3/3-1/3-1:1.0/bluetooth/hci0':
KERNEL=="hci0"
SUBSYSTEM=="bluetooth"
DRIVER==""
ATTR{bus}=="USB"
ATTR{sniff_min_interval}=="80"
ATTR{name}=="linaro-nano-0"
ATTR{type}=="BR/EDR"
ATTR{hci_version}=="6"
ATTR{class}=="0x000000"
ATTR{idle_timeout}=="0"
ATTR{address}=="00:02:72:xx:xx:xx"
ATTR{features}=="0xbffecffedbff7b87"
ATTR{sniff_max_interval}=="800"
ATTR{manufacturer}=="15"
ATTR{hci_revision}=="4096"
Is there some sort of configuration change somewhere that causes the difference in responses?
EDIT
I've found that most of those missing values are now in /sys/kernel/debug/bluetooth/hci0/ but I have no idea why that's so. However the format of the features file is different. Is this controlled by a configuration file, compiler options, or something else?
I think changes have been made in the kernel code to use debugfs instead of sysfs for several bits of information. So, I'll just have to rethink how I get that information now.