I need to play a video in a Xamarin Forms by getting the URL input from the user. I have used plugin.mediamanager.forms.I am getting the following error "'VideoViewRenderer' does not contain a definition for 'Init'... What is the mistake I am doing here?
Check how to init the class:
https://github.com/Baseflow/XamarinMediaManager#important-initialize-plugin
Make sure to call Init() in all the native platforms on startup of your app.
CrossMediaManager.Current.Init();
Related
I refer to the document https://developers.google.com/calendar/v3/reference/events/insert to call the insert method, but there is an error insufficientPermissions. I want to know what the general situation is, and I can use gapi.client.calendar.events.list() method to get the result normally.
You are probably using one of the Calendar API Quickstarts which is why calls to events.list works but events.insert doesn't. You need to change the scope to https://www.googleapis.com/auth/calendar because that is required for events.insert.
Also don't forget to delete the previously saved credentials when adding the new scope.
Have been stuck for days ... and then I found what was the issue
I have two pages one in case of tablet and the other in case of phone . Since they have different names then using ViewModelLocator.AutowireViewModel to share the same view model as a binding context does not work . So for this case I am using the classic binding context, as i did not want to create a viewmodel copy for each page.
My problem was when I run it gives me an error saying "no parameterless constructor defined for this object prism" The reason of this error is that the viewModel has a contructor that expects a navigationService.
To solve this error i have to remove the navigation service as an argument , but then I need it so i can navigate with it .
In this case I would recommend using the ViewModelLocationProvider.Register method. So in the application's RegisterTypes method, you can put a condition similar to this:
if (Device.Idiom == TargetIdiom.Tablet)
ViewModelLocationProvider.Register("MainPage", () => your logic);
else
ViewModelLocationProvider.Register("MainPage", () => your logic);
EDIT: Actually, you'll still have to manually resolve the INavigationService doing it this way. I am going to reopen your Prism Issue. We can look into improving the ViewModelocationProvider.Register method to enable this scenario.
I have followed the instructions at http://msdn.microsoft.com/en-us/library/windows/desktop/dd375010%28v=vs.85%29.aspx to create a property page for my CSourceStream based stream.
When testing with amcap I can see that amcap now shows the menu item to show the capture pin properties (ISpecifyPropertyPages::GetPages is queried). The problem is that when amcap calls OleCreatePropertyFrame it returns with E_FAIL and I am not sure why, it does not seem to even get to the stage of quering my dll for the factory method to instantiate the CBasePropertyPage based property class.
The problem was my DllRegisterServer only registered my filter.
I can use AMovieDllRegisterServer2 to register all components in g_Templates but that function does not register source filters properly so for the moment I am just calling AMovieDllRegisterServer2 and then re-registering my filter with source filter specific code.
Listed below is the definition of my function (vb).
I am trying to check the value of a checkbox inside the function. I am currently unable to do this without getting an error stating that
"Error 305: Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class."
Is there anything I can change so that I can get the value to see that if a checkbox is checked or not? The method must be shared, so it works with the existing javascript and the use of pagemethods
Thanks
<System.Web.Services.WebMethod()> _
Public Shared Function Load(inputs here - taken out for stack overflow) As String
edit- the only other solution i can think of is to find a way for the page's javascript onload to run before the server side, this would solve my issue as well if anyone knows how this can be done.
Yes. Do what the message suggests and make the method non-shared, then you'll be able to access the members of the page.
My application currently contains a number of Widgets that are managed by a Widget Manager. When the user clicks on a widget (e.g. a Helper widget), the Widget Manager loads the widget into a separate sibling application domain with the following line of code:
wgtInfo.load(null, null, null, moduleFactory); //wgtInfo = IModuleInfo
However, I am unable to use the widget's variables and functions later on. I attempt to find the Helper widget from the Widget Manager's list of widgets, and I do successfully. But when I try to caste the Helper Widget from type IBaseWidget (the interface all widgets share) to type HelperWidget, I receive the following error:
TypeError: Error #1034: Type Coercion failed.....
This is because the application domain of the class trying to use the Helper widget is different from the application domain of the Helper Widget. I tried to fix this by loading all widgets into the same application domain as the loader:
wgtInfo.load(ApplicationDomain.currentDomain, null, null, moduleFactory);
I now get the following error whenever I attempt to load the Helper widget:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
How can I load my Helper widget into a common application domain that is accessible by the other widgets?
I believe your problem comes from the class not being included in the swf. This is because Flash doesn't compile in classes in a swf if they aren't used to reduce filesize. To prevent this, you only need to create a variable with the helper class you need in that class, like this:
private var helper:HelperWidget;
See if that helps.
I'm gonna repost my 'comment' as a real answer. I'm guessing that the error is not based on the ApplicationDomain but based on which classes you are being compiled into your Module. When Flex compiles the SWF it automatically optimizes unused classes out of the SWF. You can force them back into the SWF in one of two ways:
Use the compiler argument include-libraries to force the Flex compiler to add the class to your SWF.
Add a fake variable in in your application so that the Flex compiler thinks it is used and adds it to the final SWF. Something like this.
private var myFakeObject : HelperWidth;
After trying a number of solutions unsuccessfully (including the other responses on this page), I resorted to another, event-driven, solution.
I ended up dispatching a custom event to notify my other widgets when the Helper widget had completed loading:
(HelperWidget.mxml)
ViewerContainer.addEventListener(AppEvent.WIDGET_OPEN_TAB, widgetOpenTabHandler); //listen for other widgets to open a tab within the Helper Widget
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_READY_OPEN_TAB)); //notify other widgets that loading is complete
My other widgets listen for this event to fire, and upon completion, dispatch another event (AppEvent.WIDGET_OPEN_TAB) to perform a function within the Helper widget.