Posts

Showing posts with the label xamarin

How do I bind to an image from an api endpoint?

How do I bind to an image from an api endpoint? Currently, I have an app where I want to display a list of image thumbnails on my layout. I'm able to get the json response from the api endpoint and deserialize it. Now, I have an image object and in that object, I have an image preview url (the thumbnail image). My question is how do I display a list of thumbnail images in my layout? Here's the method that gets called to display images and some property setup: private List<string> images; public List<string> Images { get { return images; } set { SetProperty(ref images, value); } } private async Task DisplayImages() { var imageObj = await _mediaService.GetCatImages(); //imageObj.Hits[i].PreviewUrl; <-- how to a reference to the previewurl but what property should it bind to? } Here's my layout at the moment: <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" ...

How to use Push Notifications in Xamarin Forms

How to use Push Notifications in Xamarin Forms I'm an app using Xamarin.Forms targeting IOS, Android and WP 8. I need push notifications feature in my app. I have seen the pushsharp demos and seems promising. But all the codes I had seen is done separately for each platform. I would like it to be done in the Xamarin.Forms project, somewhere in the App.cs so that I don't need to repeat the code for registering device, and handle how push notifications should be processed. Any help would be greatly appreciated. Sample codes or tutorial references are welcome. Edit : I implemented it based on Idot's answer. Here is the link for my answer. This question has been addressed in the official Xamarin Forum, have a look: forums.xamarin.com/discussion/20845/… – Wizche Mar 14 '15 at 14:07 Its purely based o...

The “LinkAssemblies” task failed unexpectedly when building for Android Release with Xamarin.Forms

The “LinkAssemblies” task failed unexpectedly when building for Android Release with Xamarin.Forms When trying to build the release APK for my android app I'm getting the error: "The "LinkAssemblies" task failed unexpectedly." I've tried everything I can find on other forum posts and online and nothing is working. (Posts I've seen include - A reference to xamarin.ios , minimum target android version needing to be 21 or higher. Both have been checked and aren't causing the issue). I've checked the common case here https://docs.microsoft.com/en-us/xamarin/xamarin-forms/troubleshooting/questions/android-linkassemblies-error but I'm still getting the error. 1>------ Build started: Project: NewProject, Configuration: Release Any CPU ---- 1>C:UsersJonathanDocumentsAppsNewProjectNewProjectNewProjectNewProject.csproj : warning NU1701: Package 'Plugin.CrossPlatformTintedImage 1.0.0' was restored using '.NETFramework,Version=v4.6.1...

How to navigate on specific page in Xamarin Forms iOS?

How to navigate on specific page in Xamarin Forms iOS? I am using Xamarin Forms and working with ANH notification. I am able to receive Notification from ANH. But the problem is when I am receiving notification and try to open it from notification area I want to redirect on a specific page of notification in iOS. I have used PendingIntent on Android, But for iOS I have no idea. Xamarin Forms ANH PendingIntent Also, I want to display a badge on the tab when an app is open and received notification. I am using CustomRenderer for iOS. My code is for TabRenderer is : CustomRenderer public class BottomTabbedPage : TabbedRenderer { public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); TabBar.UnselectedItemTintColor = UIColor.FromRGB(208,208,208); TabBar.BackgroundColor = UIColor.White; TabBar.Items[1].BadgeValue = SettingClass.MenuNotificationCount == 0 ? null : SettingClass.MenuNotificationCount.ToString(); ...