I need absolute positioning in 4.6 application, but AbsoluteFieldManager is not supported (>=5.0),
sould I create my own Manager or is there some easier way?
You should create your own manager.
Related
After upgrading Xamarin Forms and Maps to version 2.3.3.193, on my Android app, I now receive the following error when I attempt to display a map:
{Xamarin.Forms.Platform.Android.ViewRenderer}
{System.MissingMemberException}
Android.Gms.Maps.MapView.get_Map' not found
Any idea what is going on? It worked before the update. Any assistance would be appreciated.
Screen shots of my Nuget manager showing 2.3.3.193 as latest stable version.
Xamarin.Forms.Maps 2.3.3.193 requires Xamarin.GooglePlayServices.Maps version to be 29.0.0.1. Not 29.0.0.1 or higher!
Dependencies
From your screenshot, you have 42.1001.0
I'm in the same boat. Still got to use the nuget package built in march 2016!
Update
The issue is fixed in the latest stable version of Xamarin Forms 2.3.4.224.
Original Answer
Refer to https://bugzilla.xamarin.com/show_bug.cgi?id=52625 for discussion about this issue.
Google removed their java getMap method which had been obsoleted for some time (even in 29.0.0.1 you can see the equivalent Map property is marked obsolete). The Forms renderer uses the Map property (so the underlying java getMap method), which no longer exists in newer versions of play services, so crash occurs. The Forms renderer will need to change to use the GetMapAsync method.
Rob Lyndon (Bugzilla discussion) created the patch you could use: https://www.nuget.org/packages/XamarinForms.Maps.Android.TemporaryPatch
I couldn't use the patch directly from Nuget due to PCL profile missmatch, so I ended up doing the following:
Copy MapRenderer from the patch to your Android project. Make sure to adjust namespace
Extend Map in your PCL project
public class CustomMap : Xamarin.Forms.Maps.Map { }
Create custom renderer in Android project
[assembly: ExportRenderer(typeof(CustomMap), typeof(MapRenderer))]
namespace StanleySteemer.Nimbus.Mobile.Renderers
{
public class CustomMapRenderer : MapRenderer {}
}
Use CustomMap instead of Map in your View
I'm accustomed to using Autofac and with autofac with one line of code I can register all the interfaces in the assembly so that they resolve to whatever classes implement that interface.
In Unity it's looking like I need to register every interface manually. I'm wondering if there is a simpler way to globally register everything, then for lifecycle differences create individual entries.
thanks
There isn't in Unity 2.
There are however contrib projects that try to add this behavior on top of Unity, such as:
Unity Auto Registration
Unity Contrib project
TecX
UPDATE
Unity 3 seems to be just released that contains support for batch-registration.
Unity 3 now supports auto-registration.
Anyone have some source code or something to do an application with html content?
I found it more easy than learning Java.
I want to do something like the phoneGap does but it works only with OS 5.0 and higher.
I found BrowserField but wouldn't work with 4.5 (field2 api not found), and BrowserContent I found it more difficult to learn.
There is no way to make a PhoneGap or any webworks-like application for SDK 4.5.
The reason is simple, SDK 4.5 does not support BrowserField2 class, this class plays the main role in rendering of webworks application.
I want to use a PeerComponent in my Lwuit application for using a native Blackberry Field like this example:
Player player = Manager.createPlayer("capture://video");
player.realize();
VideoControl vc = (VideoControl) player.getControl("VideoControl");
Field viewFinder = (Field) vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
player.start();
My problem is that my project is java-me (not Blackberry). Using a native RIM component don't compile my project. I need differentiate cases between Blackberry devices and other Java devices and in Blackberry case use a Field, How can I do? It's possible with a PeerComponent?
If you are using the new project structure generated by the GUI builder or manually as is done in the resource editor this should be very easy. In the new project structure the code of your application resides in a portable J2ME library project, the RIM/J2ME/J2SE/Android specific code resides in a separate project that just includes the library.
Once you do that you can define an interface to invoke a generic interface which you just implement differently for the platform specific code.
Alternatively you can always use a pre-processor and targets such as Netbeans allows, I understand Eclipse's mobile plugin has a similar facility as well.
I developed an application with simulator 4.6 and 5.0 then a couple of weeks later, today I finished the Torch version of my application (JDE 6.0 and simulator 9800)
My application works great with Torch but for the other older versions I got a
class net.rim.device.api.ui.ScrollView error.
I googled and found some advices like a "try with JDE 5.0 or stg else" but I didn't work.
So how can I solve my problem? Is it possible for a application to works with every model of BlackBerry Device?
The ScrollView is not part of the API before version 6.0.
You will have to use a normal view(Manager) and send in the property to use scroll.
http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/container/VerticalFieldManager.html
Behaviour A vertical field manager
lays out fields top to bottom in a
single column. You can build this
manager with Manager.HORIZONTAL_SCROLL
to accommodate fields wider than the
manager's visible frame; you can build
this manager with
Manager.VERTICAL_SCROLL to accommodate
collections of fields taller than the
manager's visible frame.
You want to use the BlackBerry Preprocessor, and generate a build for each version of BlackBerry OS you support.