Pass data between pages not working in release mode

Hello,
Everything working good in debug mode in android emulator then i deploy release and see data passes between page not working in release mode, i have blank page.

In my viewmodel i have :

private void OnImageTapped(object obj)
{
var photo = obj as Photo;
var bphotos = new BPhotos
{
Name = photo.Media_url.ToString(),
Koala = photo.Permalink.ToString()

};
var PhotoDetail = new PhotoDetail();
PhotoDetail.BindingContext = bphotos;
App.Current.MainPage.Navigation.PushAsync(PhotoDetail);
}


internal class BPhotos
{
public string Name { get; set; }
public string Koala { get; set; }
}
and in Photodetail.xaml
Grid.Row="3"
Padding="0,10,0,3">
BackgroundColor="{DynamicResource Gray-White}">
CacheValidity="1"
CachingEnabled="true"/>
x:Name="kiki"
Text="{Binding Koala}"
TextColor="Black"
IsVisible="false"/>

3 Replies 1 reply marked as answer

LN Lakshmi Natarajan Syncfusion Team September 15, 2020 06:29 AM UTC

Hi Milka, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Pass data between pages not working in release mode” from our side. We would like to inform you that we are unable to reproduce the reported scenario from our side. We have tested our sample based on your requirement with Syncfusion v18.2.0.58 and Syncfusion v4.8.0.1364 in Android 8 – API 27 emulator. We have attached the tested sample in the following link, 
 
Could you please check our sample and let us know if you still facing the same issue? If not, could you please modify our sample to reproduce the issue and revert us back with the following details, 
  • Share ListView related code snippets
  • Share device configuration details
  • Share Syncfusion and Xamarin updated version
 
It will be helpful for us to check on it and provide you the solution as soon as possible.  
 
Regards, 
Lakshmi Natarajan 



MI milka September 15, 2020 02:14 PM UTC

Strange if i change

private void OnImageTapped(object obj)
{
var photo = obj as Photo;
var bphotos = new BPhotos
{
Name = photo.Media_url.ToString(),
Koala = photo.Permalink.ToString()

};
var PhotoDetail = new PhotoDetail();
PhotoDetail.BindingContext = bphotos;
App.Current.MainPage.Navigation.PushAsync(PhotoDetail);
}

to 

private void OnImageTapped(object obj)
{
var photo = obj as Photo;
var bphotos = new BPhotos
{
Name = photo.Media_url.ToString(),
Koala = photo.Permalink.ToString()

};
var PhotoDetail = new PhotoDetail(bphotos.Name,bphotos.Koala);
PhotoDetail.BindingContext = bphotos;
App.Current.MainPage.Navigation.PushAsync(PhotoDetail);
}

It work in release mode too but... I don't know why there is this difference



LN Lakshmi Natarajan Syncfusion Team September 16, 2020 10:18 AM UTC

Hi Milka, 
 
We have checked the reported scenario from our side. We would like to inform you that the PhotoDetail’s parameterized constructor may set the data for the properties which resolved the reported scenario. Please let us know if you need further assistance. 
 
Regards, 
Lakshmi Natarajan 


Marked as answer
Loader.
Up arrow icon