i want to use Notification in xamarin cross-platform ,it can possible

i use CrossPushNotification than andorid application execute than error build failed
how can solve this problem

Posts

  • DerProgrammiererDerProgrammierer DEMember ✭✭✭

    @csatsupport It would be really helpful if you provide some more information. Show the errors, your code and tell us what exactly you are trying to do!

  • csatsupportcsatsupport INMember

    I'm creating Login page than it's meany problem

    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:local="clr-namespace:WorkingWithImages;assembly=WorkingWithImages"
    x:Class="CsatDynamicRate1.Loginpage>

    <ContentPage.Content>

      <Image Source="manhattan1.jpg" BackgroundColor="Transparent" WidthRequest="150" HeightRequest="150"/>
    
    
      <Button  Text="Sign" BorderColor="Silver" TextColor="Black"  BackgroundColor="Silver" Clicked="OnButtonClickedsign"></Button>
       </StackLayout>
    

    </ContentPage.Content>

    private async void OnButtonClickedsign(object sender,EventArgs args)
    {
    var userviewModel = BindingContext as UserViewModel;
    if (userviewModel != null)
    {

               await Navigation.PushAsync(new Signpage(userviewModel));// this point is error
    
            }
        }
    

    signIn page








    public Signpage(UserDetails userdetail)
    {
    InitializeComponent();
    BindingContext = userdetail;
    }

  • csatsupportcsatsupport INMember

    I'm using Command parameter in button than it's problems

    Search page........
    <?xml version="1.0" encoding="utf-8" ?>

    <StackLayout Orientation="Vertical" Spacing="12">
    
      <Entry Text="{Binding keyword,Mode=TwoWay}"/>
      <Button Text="Search" Command="{Binding SearchCommand}"/>
    


    Searchpage.cs...........................
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using CsatDynamicRate1.Models;
    using CsatDynamicRate1.ViewModels;
    using CsatDynamicRate1.Services;
    using Xamarin.Forms;

    namespace CsatDynamicRate1
    {
    public partial class Signpage : ContentPage
    {
    public Signpage(UserViewModel userViewModel)
    {
    InitializeComponent();
    BindingContext = userViewModel;
    }
    }
    }

    ViewModal.cs..............
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.CompilerServices;
    using System.Text;
    using System.Threading.Tasks;
    using CsatDynamicRate1.Models;
    using CsatDynamicRate1.Services;
    using System.ComponentModel;

    namespace CsatDynamicRate1.ViewModels
    {
    public class UserViewModel: INotifyPropertyChanged
    {
    private List _userlist;
    private UserDetails _selectedUser = new UserDetails();
    private List _searchUser;
    private string _keyword;

        public string keyword
        {
            get { return _keyword; }
            set
            {
                _keyword = value;
                OnPropertyChanged();
            }
        }
    
        public List<UserDetails> SearchUser
        {
            get
            {
                return _searchUser;
            }
            set
            {
                _searchUser = value;
                OnPropertyChanged();
            }
        }
        public List<UserDetails> Userlist
        {
            get
            {
                return _userlist;
            }
            set
            {
                _userlist = value;
                OnPropertyChanged();
            }
        }
    
        public UserDetails Selecteduser
        {
            get { return _selectedUser; }
            set
            {
                _selectedUser = value;
                OnPropertyChanged();
            }
        }
    
        public command SearchCommand
        {
    

    get
    {
    return new command(async =>
    {
    var userServices = new Userservices();

                    SearchUser = await userServices.GetuserByKeywordAsync(_keyword);
    
                });
            }
        }
        public  UserViewModel()
        {
          IniyislizeDataAsync();
        }
    
        private async Task IniyislizeDataAsync()
        {
            var userServices = new Userservices();
            Userlist = await userServices.GetuserAsync();
        }
    
    
    
        public event PropertyChangedEventHandler PropertyChanged;
    
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    
    }
    

    }

    Please Help me.

Sign In or Register to comment.