Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all 204402 articles
Browse latest View live

I developed an Application based on Android 8.1 and I need to downgrade it to Android 5.0

$
0
0

Once I did though the application gives me a lot of errors, even after downloading android SDK for 5.0, is it Nuget problem? if though how I downgrade the NuGet packages, what is the root cause?

**Some of the Errors:
Error max res 21, skipping mipmap-anydpi-v26 "max res 21, skipping mipmap-anydpi-v26".
Error No resource found that matches the given name: attr 'windowNoTitle'.
Error NU1202 Package Xamarin.Android.Support.v7.AppCompat 27.0.2.1 is not compatible with monoandroid50 (MonoAndroid,Version=v5.0). Package Xamarin.Android.Support.v7.AppCompat 27.0.2.1 supports: monoandroid81 (MonoAndroid,Version=v8.1)


Xamarin Forms apk size is 80 MB

$
0
0

Cannot reduce xamarin apk size below 80 MB. I did the following: 1) enabled proguard
2) Configuration: Release 3) Platform: Active (Any CPU). 4) Enable Multi-Dex: true
5) Enable developer instrumentation (debugging and profiling): false 6) Linking: SDK and User Assemblies(Tried sdk assemblies only also) 7) Supported architectures: Selected all
Visual studio community 2017 version: 15.9.6
Need some help on this...

After latest Visual Studio update, UWP apps take forever to build

$
0
0

I keep my Visual Studio and Xamarin fully updated.

After the last Visual Studio update (I'm running 2017 v 15.9.6), UWP apps take forever to launch! (building is still quick)

It went from a few seconds to about a minute.

As each dll is loaded, there is a long pause. They used to just fly ...

'MyApp.UWP.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Projects\MyApp\MyApp.UWP\bin\x86\Debug\AppX\entrypoint\MyApp.UWP.exe'. Symbols loaded.
'MyApp.UWP.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Projects\MyApp\MyApp.UWP\bin\x86\Debug\AppX\entrypoint\System.Runtime.dll'. Symbols loaded.

Xamarin Live Player connection lost 2 seconds after the connection is established

$
0
0

I am currently trying to test my app on my real android device. Running the map on the emulator works just fine. I have created a new project with just the "welcome to xamarin forms" page, and even then it doesnt work. I have tried pretty much everything. I tried the create a playerdevice in my playdevicelist.xaml in .config file, and I have made sure that the PC and the android device is on the same network, and the connection test returns everything as valid.
Please, any tips appreciated.

HighChart

$
0
0

Can we develop HighCharts using Xamarin ? can any one point me to link which explain the same

XAML - Change Label Text inside Viewcell from code behind

$
0
0

Hi everybody,
I need to change a label text put into a Viewcell from codebehind but I receive an error dispayng "the name likecount does not exist in the current context".

I want to show the label value initially(like count), it is working.

  <ListView x:Name="ListView1"  RowHeight="500">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>

        <Label 
            Text="{Binding likeCount}"
            x:Name="likecount" 
            Font="14" 
            TextColor="Black"
            HorizontalOptions="Start" 
            VerticalOptions="Center"/>  

                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

After like or unlike i want to change the label text(like count). For that i use the following code:

If(like){
 likecount.Text = item.likeCount + 1;
 } else{
 likecount.Text = item.likeCount - 1;
 }

Currently showing, The name likecount does not exist in the current context.

Can you show how you create the datamodel?

Please help me, Thanks in advance.

Change Label Text like quantity increase or decrease button inside list view

Xamarin essential without Xamarin.Forms

$
0
0

I'm trying to find some demo of xamarin essetials, but without the use of xamarin.forms. Any link to this kind of info ?


Sync data accross multiple devices (just like with iCloud on iOS)

$
0
0

What is the best way for an Android implementation to sync data accross multiple devices? I currently have iCloud implemented to iOS but now I still need an alternative for Android. My app is, at least now, only available in the Google Play Store but might be later added to Amazon for example.

Is there even an alternative that is similar to iCloud on iOS? Google Drive? Dropbox?

How to save the DirPath + The Filename of a picture selected from the Gallery in a SQLite Db.

$
0
0

Hello Guys,
I am constructing a Hybrid app using Xamarin, my App is Totally HTML + Css and JS, works fine(i am suing WebView Template Project), the app is just an Input form, the user can type text, select dates or check boxes etc, everything works fine, now i need to implement the functionality to attach an image(s) to the form and save the info into the DB, i would not like to save the image into the DB but save the DirPath and FileName as string. Later on the user could send the info of the Input Form (including the Images) to a Web Api Service . For now i just need to :

1.- Select the image from Gallery.
2.- Save the DirPath + The FileName.

Just keep in mind that i am not using Xamarin Forms, for that reason i need to trigger the functionality from an HTML button (this is not a problem for me ( i know how to do it) i just need the code to display the dialog box where the user can select an image from the Galley and later on just save the DirPath and FileName of the picture selected(could be more than one).

I really appreciate the help you can provide, KIND REGARDS.

App on Android Pie has issues with making HTTPS requests

$
0
0

Hi,
running into an issue with an existing app. When running on Android Pie, the app (and any third party library) will frequently have problems with making any HTTP/HTTPS request, it is not entirely consistent. When I first deploy the app to a device running Pie, where the app does not previously exist on the device, it will work. When I later return to the app, or re-start the app, it may hang because all HTTP/HTTPS requests in the app fails. The error that appears in the log is this: Message: failed to connect to api.xxx.yyy (port 443) from /10.0.1.106 (port 47568) after 120000ms: isConnected failed: ETIMEDOUT (Connection timed out)

If this occurs, and then I turn off WiFi, the app will work just fine over cellular data. I've confirmed in all cases that a WiFi connection exists and is working when the problem occurs.

Any ideas?

thanks,
Dennis

Uploading an iOS App – invalid signature

$
0
0

We have tried uploading an iOS App multiple times.
A few minutes after the upload we receive the following error message via e-mail:

Invalid Signature - A sealed resource is missing or invalid.
The file at path [manage4ALL_Xamarin.iOS.app/manage4ALL_Xamarin.iOS] is not properly signed.
Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate.
Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level).
Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target.
If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target.
For more information, please consult https........

The Apple Support referred me to you, because we are using visual studio, a third party resource.

The situation is as follows:
I am using a Windows computer which is connected to a Mac. I am creating an Ipa with Visual Studio on the Windows computer, which is then also stored on the Mac through a link.
After creating the Ipa I start the application loader on the Mac, choose the Ipa and begin the upload. The upload is executed and at the end I get the message that the app will be checked. Shortly after that I receive the error message (as stated above).

The certificate we are using is an “iOS Distribution” and not as stated in the error message an ad hoc certificate or development certificate. I have already tried different settings in the iOS project in Visual Studio regardinig the iOS Bundle Signature.
I have tried an upload using “automatic provisioning”. But here “iPhone Developer” is selected as signature identity, which is the reason I did not expect this route to work out. The other method I tried was “manual provisioning”. I used the corresponding provisioning profile and the corresponding signature identy “iPhone Distribution”. Other settings in the properties are as follows:

iOS Build

Configuration: Release
Platform: iPhone
SDK Version: Default
Linker Behavior: Link Framework SDKs Only
Supported Architecures ARM64
HttpClient Implementation: NSUrlSession (iOS 7+)

Use the LLVM optimizing compiler: no
Use Thumb-2 instruction set for ARMv7 and ARMv7s: true
Perform all 32-bit float operations as 64-bit float: no
Strip native debugging symbols: yes
Enable incremental builds: no
Use the concurrent garbage collector (Experimental): no
Enable device-specific builds: no
Additional mtouch arguments: empty
Optimize PNG images: yes
Internationalization: none selected

iOS IPA Options

Build iTunes Package Archive (IPA): true
iTunes Metadata: empty
Package name: the same name as appstoreconnect under app information -> name
Include iTunesArtwork images and the iTunesMetadata.plist: no

In case you need any additional information, please do not hesitate to contact me. Thank you very much in advance for your help.

Best regards

UWP LaunchUriAsync failing without error message

$
0
0

I have a UWP app, and I am trying to get it to ask the device to open a pdf in whatever manner it chooses.

The code looks like this:

async static partial void OpenFileWithNativeApp(string filepath)
    {
        Device.BeginInvokeOnMainThread(async () =>
        {
            Uri targetUri = new Uri(filepath);
            bool outcome = await Windows.System.Launcher.LaunchUriAsync(targetUri);
        });
    }

filepath is roughly: {file:///C:/Users/walter.fakename/AppData/Local/Packages/Guid/LocalState/PDFWhatever.pdf} . I can navigate to that place on my c drive, and the pdf is actually there.

When I run this code the outcome that is set by LaunchUriAsync is set to false, indicating that the Uri was not successfully launched. This is correct, as indeed, no other app launches the Uri. But it doesn't tell me how to fix it, such that the Uri would be successfully launched by whatever browser or pdf viewer the device associates with pdfs.

Does anyone see what I'm doing wrong?

-Regards,
Walter

sharpie binding error for GoogleMobileAdsMediationFacebook

$
0
0

I am trying to bind GoogleMobileAdsMediationFacebook using sharpie.

sharpie pod init ios GoogleMobileAdsMediationFacebook

works ok, but when I run:

sharpie pod bind

I get this error:

Done. Exiting with error code 1.
error: FBAudienceNetwork: framework requires SDK 'iphonesimulator12.1' which is not installed. You may need a newer Xcode.

Does anyone know where to get iphonesimulator12.1 and how to install it?

CarrouselView, what happened?

$
0
0

I read some posts about Xamarin.Forms.CarouselView, but this still in pre-release state "2.3.0-pre2".
In some forum thread I read that the project moved to https://github.com/alexrainman/CarouselView with the possibility of merging into Xamarin.Forms.
Has been merged already at this version (Xamarin.Forms 3.5)?? . If not, Is there any plans soon?


Displaying pdf files from internet in Xamarin.Forms UWP

$
0
0

I have a Xamarin.Forms application supporting only UWP. I need to be able to load pdf files from the web and display the content in my application. I cannot find a solution that would work with UWP and handle pdf files that are not part of a project. Please help.

ADMob not show in Android - Xamarin forms

$
0
0

Good Morning,

I Have a solution app in xamarin forms, and I need add ADMOB, and I do this, but, my ad not show, please help me:

My AdMob work:

I use plugin: Xamarin.GooglePlayServices.Ads - Version: 60.1142.1 - the last version.

MainActivity onCreate, My row of initialize MobileAd:
MobileAds.Initialize(ApplicationContext, "ca-app-pub-xxxxxxxxxxxxxxxxx~xxxxxxxxxx"); I tryed with ID: "xxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxx", but I not have success

My ADMobView class:

 **public class AdMobView : View
 {
 }**

My AdMobRenderer:

    ** [assembly: ExportRenderer(typeof(AdMobView), typeof(AdMobViewRenderer))]
     namespace Anuncie.Droid.Renderes
     {
         public class AdMobViewRenderer : ViewRenderer<AdMobView, AdView>
         {
             public AdMobViewRenderer(Context context) : base(context) { }

             string adUnitId = string.Empty;
             //Note you may want to adjust this, see further down.
             AdSize adSize = AdSize.SmartBanner;
             AdView adView;
             AdView CreateNativeAdControl()
             {
                 if (adView != null)
                     return adView;

                 // This is a string in the Resources/values/strings.xml that I added or you can modify it here. This comes from admob and contains a / in it
                 adUnitId = "xxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxx"; I tryed with ca-app-pub-xxxxxxxxxxxxxxxxx~xxxxxxxxxx, but I not have success
                 adView = new AdView(Forms.Context);
                 adView.AdSize = adSize;
                 adView.AdUnitId = adUnitId;

                 var adParams = new LinearLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.WrapContent);

                 adView.LayoutParameters = adParams;

                 adView.LoadAd(new AdRequest
                                 .Builder()
                                 .Build());
                 return adView;
             }

             protected override void OnElementChanged(ElementChangedEventArgs<AdMobView> e)
             {
                 base.OnElementChanged(e);
                 if (Control == null)
                 {
                     if (Control == null)
                     {
                         CreateNativeAdControl();
                         SetNativeControl(adView);
                     }
                 }
             }
         }
     }**

Thanks

New dev machine, PC laptop or Macbook Pro?

$
0
0

Hello,

Just thought I'd look for some input seeing I'm about to spend $$$.

Either new PC laptop, Win10, VS2017 etc etc, connect to existing Mac/xcode for iOS dev work/build purposes.
OR
New Macbook Pro, run Win10 in parallels or vmware and VS2017 there, connect to Xcode on host machine for iOS work/build purposes..

Btw, projects include an Azure App Service and need do some work outside of the Xamarin env. and only Azure and ASP.Net, hence on a Win10 instance, however that may be set up.

Not doing any Windows apps at all. Android & iOS only.

Your thoughts? :smiley:

thx!

SwipeGestureRecognizer don't work on android but works great in IOS

$
0
0

Hi,
I am trying to enable swipe gesture on android and IOS, I am using grid view for entire screen, it works perfectly on IOS but don't work on android , any Ideas?

Code:

<br /> <Grid x:Name="GridBox" RowSpacing="0" ColumnSpacing="0"><br /> &lt;Grid.ColumnDefinitions><br /> <ColumnDefinition Width="*" /><br /> <ColumnDefinition Width="*" /><br /> &lt;/Grid.ColumnDefinitions><br /> &lt;Grid.RowDefinitions><br /> <RowDefinition Height="*" /><br /> <RowDefinition Height="*" /><br /> <RowDefinition Height="Auto" /><br /> &lt;/Grid.RowDefinitions><br /> &lt;Grid.GestureRecognizers><br /> <SwipeGestureRecognizer Direction="Left" Swiped="Handle_Swiped_Left" Threshold="1" /><br /> <SwipeGestureRecognizer Direction="Right" Swiped="Handle_Swiped_Right" Threshold="1"/><br /> &lt;/Grid.GestureRecognizers><br /> <StackLayout BackgroundColor="White" Grid.Column="0" Grid.Row="0" ><br /> &lt;StackLayout.GestureRecognizers><br /> <TapGestureRecognizer Tapped="ProductPressedHandler"/><br /> &lt;/StackLayout.GestureRecognizers><br /> <Label HorizontalOptions="Center" Margin="0,5,0,0" Text="product Title" TextColor="Red" FontSize="20"/><br /> <Label Text="12345678902323424" TextColor="Black" FontSize="14"/><br /> <Image BackgroundColor="White"><br /> &lt;Image.Source> <br /> <OnPlatform x:TypeArguments="ImageSource"> <br /> <On Platform="Android" Value="logo.png"/><br /> <On Platform="iOS" Value="Logo.png"/><br /> </OnPlatform> <br /> &lt;/Image.Source><br /> </Image><br /> </StackLayout><br /> <StackLayout BackgroundColor="White" Grid.Column="0" Grid.Row="1"><br /> &lt;StackLayout.GestureRecognizers><br /> <TapGestureRecognizer Tapped="ProductPressedHandler"/><br /> &lt;/StackLayout.GestureRecognizers><br /> <Label HorizontalOptions="Center" Margin="0,5,0,0" Text="product Title" TextColor="Red" FontSize="20"/><br /> <Label Text="12345678902323424" TextColor="Black" FontSize="14"/><br /> <Image Source="Logo.png" /><br /> </StackLayout><br /> <StackLayout BackgroundColor="White" Grid.Column="1" Grid.Row="1" Grid.RowSpan="1" ><br /> &lt;StackLayout.GestureRecognizers><br /> <TapGestureRecognizer Tapped="ProductPressedHandler"/><br /> &lt;/StackLayout.GestureRecognizers><br /> <Label HorizontalOptions="Center" Margin="0,5,0,0" Text="product Title" TextColor="Red" FontSize="20"/><br /> <Label Text="12345678902323424" TextColor="Black" FontSize="14"/><br /> <Image Source="Logo.png" /><br /> </StackLayout><br /> <StackLayout BackgroundColor="White" Grid.Column="1" Grid.Row="0" Grid.RowSpan="1" ><br /> &lt;StackLayout.GestureRecognizers><br /> <TapGestureRecognizer Tapped="ProductPressedHandler"/><br /> &lt;/StackLayout.GestureRecognizers><br /> <Label HorizontalOptions="Center" Margin="0,5,0,0" Text="product Title" TextColor="Red" FontSize="20"/><br /> <Label Text="12345678902323424" TextColor="Black" FontSize="14"/><br /> <Image Source="Logo.png" /><br /> </StackLayout><br /> <ActivityIndicator Color="Red" x:Name="Loader" IsVisible="false" IsRunning="false" BackgroundColor="White" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="2"/><br /> <Button BackgroundColor="Red" Text="Order" HorizontalOptions="FillAndExpand" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Padding="0" Margin="0" TextColor="White" /><br /> </Grid><br />

Thanks!!
David

Bug? TextInputEditText.Hint only works from XML, not code

$
0
0

When the TextInputEditText.Hint attribute is established in XML, the label animation works just fine when you start typing in the field.

When the TextInputEditText.Hint attribute is established in code, the label animation doesn't work.

I don't mind using XML for the hint, but our localized strings are up in a shared Xamarin project, and it seems there's no way in Xamarin.Android to use XML data bindings to point the Android XML at my LocalizedStrings class.

The app is targeting Android 9.0 and using Xamarin.Android Nuget packages 28.0.0.1.

Viewing all 204402 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>