How to set DiscoveryLookupBinding.url in onvif RemoteDiscovery - android

I'm trying to develop an Android APP to discover and access onvif cameras under VS2017 and Xamarin.
By 'Add Web Reference', I added Web Reference of DeviceMgmt and RemoteDiscovery of onvif website.
For generated DeviceMgmt code, there is DeviceBinding class and when I set its url to e.g.
"http://192.168.0.22/onvif/device_service",
all functions like GetCapabilities() and GetDeviceInformation() can work.
For generated RemoteDiscovery code, I noticed there is DiscoveryLookupBinding class, but don't know how to set its url to call Probe().
I tried "239.255.255.250", but it's invalid.
If anybody has the related experience? Any ideas are appreciated, thanks.

For people who may be interested in.
Later for DeviceMgmt and Media services, I used Xamarin-generated references code.
But for Device Discovery, I created a Binding Library (Android) to still use my old java code. And it works well.

Related

Shared Images and Sounds in Xamarin with Xamarin Forms

we are currently working on a multi platform app for a university project and decided on using Xamarin. Our Database with sqlite as well as the business logic and shared resources should lie in xamarin forms, where as the View Controller and View are in the native xamarin.android and xamarin.Ios.
We can't seem to be able to use the Xamarin.Forms Images in the native ImageView on Android.
When going through the EmbeddedImages Section in the Xamarin Documentation (https://learn.microsoft.com/de-de/xamarin/xamarin-forms/user-interface/images?tabs=windows)
the following C# Code doesn't seem to work in our project.
var embeddedImage = new Image { Source = ImageSource.FromResource("WorkingWithImages.beach.jpg", typeof(EmbeddedImages).GetTypeInfo().Assembly) };
We can set the source to IamgeSource.FromResource("source") but typoeof(EmbeddeImages)... doesn't work. Even though the BuildAction is properly set to Embedded resource.
Also we can't really get the point of the "Using XAML" Section, where to put the C# code, as well as the XAML.
That's why we tried to convert the Xamarin.Forms.Image handed over from the logic into a bitmap using:
https://medium.com/#hakimgulamali88/a-helper-for-converting-a-xamarin-forms-imagesource-to-the-respective-native-images-56a5aaf98156
But when debugging the app turns black and the console shows multiple threats being started and finished. App stays unresponsive.
Are there any suggestions?
We appreciate any help. Thank you.

File upload field not working inside a web view in android

I have a webapplication made in Laravel Framework. I am launching it inside the web view of an android application. All works well but when i press the choose file It does no work. Its completely inactive. How to make it work?
I think you make use of the input attribute in your html, don't you?
As written here (FAQ part) it does not work out-of-the-box in webviews by now.
Maybe you can give the WebChromeClient.onShowFileChooser a shot (added API 21).

Chromecast & Air for Android Apps (AS3)

Anyone one know a simple way to use / intergrate a chromecast sender for my Air for Android Apps so they can cast directly to a TV.
I've done a few successful tests on webpages.
but as for intergrating the code into an entirely AS3 project, I don't know were to begin? and I can't seem to find any docs on how to do this.
Thank you in advance for your help.
There in an Air Native Extension that handles this: ANE-Chromecast on Github
The ANE on Github is not a solution (line 19 of AirCast.as specifically excludes Android).
More fundamentally, even after re-engineering the ANE to get around the original block, it is currently not possible to get a reference to android.os.Bundle (which is required) as the class is not reachable, no matter how many SDK jars you build into the ANE.
Until there is a means to get the bundle, then this call will always fail:
CastDevice mSelectedDevice = CastDevice.getFromBundle(route.getExtras());
With:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/cast/CastDevice;
But if anybody can get around this, please let me know as I would dearly like to get there...

Simulating Keyboard Events in Android

I have a project and I am trying to fire Keyboard events. I am using the Instrumentation Class, and it is working perfectly on the emulator, but when I launch it on my device, the call doesn't work, is there any way to make it work?
Also, I searched on the web, and I found some posts about the IWindowManager and the internal APIs, I fully understand the risk of using them, but my project is a research and is not intended to be published, so I don't mind using those APIs in my porject if they can solve my problem, but the problem is that I can't find the JAR that contains these classes.
TLDR : I need a solution that helps me fire keyboard events on my Android device, any ideas are appreciated
Actually, there is an easier method, that I found
Using Activity class or WebView class. Both have the same function.
The code looks something like this:
webView.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_1));
In instrumentation, there is the api to send keycode:
getInstrumentation().sendCharacterSync(int keycode);
If you have root access to the device, you can check the code here:
https://code.google.com/p/androidscreencast/source/browse/AndroidScreencastClient/src/net/srcz/android/screencast/client/ClientHandler.java ;
to use IWindowManager. The IWindowManager is apart of android system, you can find the class in android.jar, the source code can be downloaded from android official website.

WSDL2OBJC for Android?

I have been using Wsdl2Objc to generate proxy's for my web services to use during IPhone dev....it works GREAT!
I now need a version similar to it, that will generate Java code, the same way.
Any ideas?
Thanks
There exists wsdltoksoap which can be used to interface with the ksoap2 android library.
I have been having problems with the application, however. It is getting a null pointer exception on my particular WSDL, but it has worked for others
http://code.google.com/p/wsdltoksoap/

Categories

Resources