hello
I have an App which uploads pictures to a server.
A year ago if you wanted to upload a picture I created a task which encapsulated a httpclient postasync
the only issue is that when I put the app to background the upload tasks where cancelled.
I developed a version using background services. It took me some time but it worked.
Today I tested with the old version and now android do not cancel the upload httpclient post when going to background.
Did something changed in android that I am not aware.
Thanks in advance
xamarin background upload in android
How to do a simple InputBox dialog?
I'm struggeling with a simple thing.
How can I display a prompt in a dialog box, thats waits for the user to input text or click a button, and then returns a string containing the contents of the text box with Xamarin.Forms?
With Android or WP8 I was able to create a popup with some controls, but I didn't find any similar in Xamarin.Forms.
Thx, Tom
XAML intellisense not working
I use VS Version 16.2.0 Preview 3 with Xamarin 16.2.0.81.
With a new Mobile App (Xamarin Forms) Xaml intellisense is not working. It did work several month ago (I don't know the exact versions).
With a Blanc App (UWP) Xaml intellisense is working correctly.
How to further diagnose and correct this problem?
"IsPassword=True" Reverse the alignment of entry placeholder on some devices but others not
Crash after iOS app launch
Hello devs...I'm running into an issue where my app launches and then immediately crashes. The app will run fine in dev and even if I push a release version directly to the phone - no errors or crashes. Only crashes with an appstore build. Looking at the Device Log, this is the only instance of an error with the app? Using VS 2019 for Mac with latest updates and packages.
Error (72) / assertiond: SyscallError: setpriority(PRIO_DARWIN_ROLE, 10656, 3): No such process
Something to do with load arguments? Just difficult to troubleshoot since this only happens with the appstore.
Any suggestions or help would be greatly appreciated.
Get Result of async Task from another page
I have two pages. One for calling an async task and the other for get the result. How to get the result of an async task of the first page in the second page?
anyway, I open the second page when the task in the first page was not completed
Handling device Token with “Plugin.FirebasePushNotification”
I installed the plugin written in the title. I'm a little bit confused about the devices token. I'm using this code in MainActivity class for android:
FirebasePushNotificationManager.Initialize(this, true);
CrossFirebasePushNotification.Current.OnTokenRefresh += (s, p) =>
{
System.Diagnostics.Debug.WriteLine($"TOKEN : {p.Token}");
StaticClass.NotificationsToken = p.Token;
};
so I get the token and save it in my static class. But when I set the resettoken to false to run the application normally on the device like this :
FirebasePushNotificationManager.Initialize(this, false);
How do I Get the device token? And is there something that could be called in PCL to save the token for both iOS and Android? Thanks in advance
Bluetooth LE and WPF on Windows 10, using Xamarin.Forms. Can it be done?
First, I feel I should make my case for wanting to do this: We have a small company that wants to support an app that is on iOS, Android and WINDOWS. Currently, we have a couple of Xamarin.Forms apps deployed on iOS & Android, and a WPF app for Windows 7 and 10, using a Bluetooth LE dongle. The dongle approach has obvious drawbacks, especially as more and more customers are moving into Win10 machines with native BLE support.
One obvious "solution" would be to have 2 windows apps -- a WPF version for older machines using the dongle, and a UWP version which does not use it. But, I know my company well enough to know that they will think this is very confusing for the customer. Plus, we would need to validate and maintain two separate apps.
I've also noticed recently "news" that Microsoft is backing away from their stance that UWP is the right way to do things in the future, and that they will be providing all those Win10 goodies (hopefully, including BLE support) in a rational way going forward to other frameworks like WPF.
It would be ideal for me to have a single app which would run on both Win7 & Win10, detect whether BLE is natively supported, and use dongle if not. I think this would need to be a WPF app.
CAN it be done? SHOULD it be done?
OR, maybe someone will say, best idea is to make an installer that figures it out, then installs the "right" program?
Thank you all for any input on this!
collectionview loadmore
how can add command loadmore with fix page size to collectionview,
Please help me
**********Please help me, I want to create such twitter when I write a tweet or state I want to see at home How do I create?**********
Keep in iOS keyboard open
Hi developer,
I want in iOS continuously keyboard open when tab on button(send message), Am implementing chat app.
thanks.
How to trigger every change in the Entry field?
This the Entry Field which the user will input the data.
<StackLayout Grid.Row="0" Grid.Column="0" Padding="16,13,16,9">
<StackLayout Orientation="Horizontal" Padding="10,0">
<StackLayout.GestureRecognizers>
<TapGestureRecognizer Tapped="OnTapVINRecognizer"/>
</StackLayout.GestureRecognizers>
<local:CustomLabel x:Name="VINLabel" Text="VIN" TextColor="#3680a4" Style="{StaticResource AccordTitleStyle}"/>
<Image x:Name="VINImage" Source="arrow_down.png"/>
</StackLayout>
<StackLayout x:Name="VINAccordion" IsVisible="True" Padding="0,5,0,16" Spacing="10">
<StackLayout Spacing="0" Orientation="Horizontal">
<local:CustomEntry x:Name="VINText" Placeholder="17 CHARACTERS" HorizontalOptions="FillAndExpand"/>
</StackLayout>
<local:CustomLabel Style="{StaticResource AccordLabelStyle}">
<local:CustomLabel.Text>
If the motor has a VIN, enter the VIN. A VIN is the 17 character identifier recorded on most vehicles built after 1998
</local:CustomLabel.Text>
</local:CustomLabel>
<local:CustomButton Clicked="OnClickSearchBtn" ClassId="vin"/>
</StackLayout>
</StackLayout>
I would like to capture every time the text changes cuz I will query the local db to check if there's a data matches from what the user inputted and then display the result below the field. How am I gonna do it in xaml?
Thanks for the suggestions and help.
e commerce product details screen
We are developing a e commerce app using xamarin froms, here we need to build a screen like this
image/ video of the product, and bottom thumb images.
I have tried with image view for display image and grid view for thumb image, but the usage is very nasty.
Any one suggest how to implement this kind of view with data binding
How to serialize an image
Hi Xamarin Forum
I was able to pull data and image from my database but now I want to serialize my data that I have pulled, Im having an error that says
Error getting value from 'ReadTimeout' on 'System.IO.MemoryStream'
anyways here is my code for pulling and serializing into Json
string SystemPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
string filename = "pulled_data.json";
string filePath = Path.Combine(SystemPath, "pulled_data.json");
if (!File.Exists(filePath))
{
File.Create(Path.Combine(SystemPath, filename)).Dispose();
DataSet ds = new DataSet();
Pipeline databaseConnect = new Pipeline();
SqlCommand selectPost = new SqlCommand("SELECT * FROM t_Post ORDER BY Id DESC", databaseConnect.connectDB());
SqlDataReader reader = selectPost.ExecuteReader();
postslist = new List<Post>();
while (reader.Read())
{
string postContent = (string)reader["Post_Content"];
string uploader = (string)reader["Uploader"];
var stream = reader["Photo"];
string imageUrl = Convert.ToBase64String((byte[])reader["Photo"]);
var postWall = new Post
{
PhotoSource = imageUrl,
PostContent = postContent,
Uploader = uploader
};
postslist.Add(postWall);
json = JsonConvert.SerializeObject(postslist);
}
listViewPost.ItemsSource = postslist;
using (var file = File.Open(filePath, FileMode.Create, FileAccess.Write))
{
using (var strms = new StreamWriter(file))
{
strms.Write(json);
strms.Close();
}
file.Close();
}
}
else
{
DisplayAlert("Alert", "Exist", "OK");
}
Am I missing something?
How to Login to Xamarin.Forms with Identity Providers Like Google,Facebook,Twitter
l am new to programming and xamarin too. l have been trying for days to implement login to xamarin using google,twitter and facebook. l have read the documentation on microsoft and have been not been able to grasp it.Can anyone share a recent tutorial on how achieve this.
'C:\Program' is not recognized as an internal or external command, operable program or batch file. ?
Hi'
I'm new to xamarin forms. I'm getting this error " 'C:\Program' is not recognized as an internal or external command,
operable program or batch file." when I try to run the android emulater. Any ideas on how to solve this problem.
Scroll effect with collapsing sections of the screen.
I'm looking for help on how to do this effect:
On a page is a ListView that is 3cm from the top of the page, below a 3cm tall logo. When the user scrolls up the list view, the entire list view scrolls up to take up the 1/2 the space of the logo. Reverse when going down. So basically the Logo gets it's size allocation reduced. Both the logo and the listview can be in a scroll view, but how do I resize the logo
Using Xaml and get "Additional information: An item with the same key has already been added."
I have the following Xaml:
<ContentPage.Content>
<ScrollView>
<ListView ItemsSource="{Binding GroupedItems}" IsGroupingEnabled="true" GroupDisplayBinding="{ Binding Name }" GroupShortNameBinding="{ Binding ShortName }" IsEnabled="False">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Title}" Detail="{Binding Text}" IsEnabled="False"></TextCell>
<Grid HorizontalOptions="CenterAndExpand">
<Image></Image>
<Image></Image>
<Image></Image>
<Image></Image>
<Image></Image>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ScrollView>
</ContentPage.Content>
I keep getting the following exception:
_An exception of type 'System.ArgumentException' occurred in mscorlib.ni.dll but was not handled in user code
Additional information: An item with the same key has already been added._
What is it referring to? I have had this on a number of occasions but not sure what rules I'm breaking...
Google Assistant Integration with Xamarin Form
Hi,
Could any one tried google assistant implementation with xamarin form.
It should be great if you have any samples.
Thanks in advance
Google Assistant Integration with Xamarin Form
Hi,
Could any one tried google assistant implementation with xamarin form.
It should be great if you have any samples.
Thanks in advance