xamarin - MvvmCross Plugin Loading Issue in Windows Phone 8.1 -
xamarin - MvvmCross Plugin Loading Issue in Windows Phone 8.1 -
i develop custom plugin of mvvmcross windows phone 8.1 , ios
its loading in ios project giving error in windows phone 8.1 @ manager.ensureplatformadaptionloaded();
public class pluginloader : imvxpluginloader { public static readonly pluginloader instance = new pluginloader(); public void ensureloaded() { var manager = mvx.resolve<imvxpluginmanager>(); manager.ensureplatformadaptionloaded<pluginloader>(); } } error is
an exception of type 'cirrious.crosscore.exceptions.mvxexception' occurred in cirrious.crosscore.dll not handled in user code
additional information: not load plugin assembly type confiz.mvvmcross.plugins.timer.pluginloader
i loading plugin in windows phone 8.1 using next code
public class timerpluginbootstrap : mvxpluginbootstrapaction<confiz.mvvmcross.plugins.timer.pluginloader> { } i using windows phone 8.1 , mvvmcross 3.2.1 , next more info
confiz.mvvmcross.plugins.timer(portable)
itimer.cs
public interface itimer { void start(); void stop(); action callbackmethod { get; set; } } pluginloader.cs
public class pluginloader : imvxpluginloader { public static readonly pluginloader instance = new pluginloader(); public void ensureloaded() { var manager = mvx.resolve<imvxpluginmanager>(); manager.ensureplatformadaptionloaded<pluginloader>(); } } confiz.mvvmcross.plugins.timer.windowsphone
mvxwindowsphonetimer.cs
public class mvxwindowsphonetimer : itimer { private readonly dispatchertimer timer; public mvxwindowsphonetimer(double kronosapirecalltimeinminutes) { timer = new dispatchertimer(); timer.interval = timespan.fromseconds(kronosapirecalltimeinminutes); timer.tick += timer_tick; } void timer_tick(object sender, object e) { callbackmethod.invoke(); } public dispatchertimer timer { { homecoming timer; } } public void start() { timer.start(); } public void stop() { timer.stop(); } public action callbackmethod { get; set; } } plugin.cs
public class plugin : imvxplugin { public void load() { mvx.registersingleton<itimer>(new mvxwindowsphonetimer(1)); } }
the plugin extension name silverlight windowsphone
for jupiter xaml windows phone apps, extension name windowscommon (if shared win81) , windowsphonestore store only.
so confiz.mvvmcross.plugins.timer.windowsphone.dll silverlight
and confiz.mvvmcross.plugins.timer.windowsphonestore.dll jupiter xaml apps
xamarin windows-phone-8.1 mvvmcross
Comments
Post a Comment