Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 89864 articles
Browse latest View live

ListView issue on Items offset screen (Scroll)

$
0
0

Hi there guys, a newbie on Xamarin Forms here.
I´ll try to explain my best, I prepared some images to clarify this doubt.

I have an app where you have a list to choose items (products), by clicking on an item takes you to the next list (brands), again a click takes you to the different elements of that product and brand, to end in a description of the chosen product.
It reads an XLS Excel file to get the info with NPOI.

and all this works perfectly for the elements that fit on the screen at that moment

but if I scroll to get ( Itemtapped) items on the list that are offset the screen (scrolling to reach them), a very curious thing happens, the last option to choose the specific item does not appear, the list is blank, but the "buttons" are there, so if I click on an empty button, it takes me to the correct description

I mean, the code internally works correctly, but the text is not showed on the screen (sometimes it show something, others none, is a very random issue, but always happens for the items offset screen).

Details: if I change in the excel database the position of the sheets, so for example, the items that were previously under, are now up, it works nicely, but now, again, the items that left offscreen are the issue ones XD, is very curious, because the code works, is not a fault on some "extrange format" in the excel sheets. Before posting here I tried every crazy thing I thought of it.

Are there any know issue with ListView and Itemtapped related (on a StackLayout), with items offset the screen?

This is my XAML code.

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

<StackLayout >
    <!-- Place new controls here -->
        <StackLayout >
        <Button Text="PRESUP DE ENMAR" 
                    Clicked="OnButtonMarcos"
                    HeightRequest="35" 
                    FontSize="12" 
                    TextColor="White" 
                    BackgroundColor= "#8e8e8e"
                    BorderRadius="15"
                    BorderColor="Black"
                    BorderWidth="2" />
    </StackLayout>


    <Grid>
        <Grid.ColumnDefinitions >
            <ColumnDefinition />
            <ColumnDefinition  />
        </Grid.ColumnDefinitions>

        <StackLayout  Grid.Column="0" >
            <Button Text="RESET" 
                    Clicked="OnButtonReset" 
                    HeightRequest="35" 
                    FontSize="12" 
                    TextColor="White" 
                    BackgroundColor= "#5e5e5e"
                    BorderRadius="15"
                    BorderColor="Black"
                    BorderWidth="2"/>
        </StackLayout>

        <StackLayout Grid.Column="1">
            <Button Text="MIS DATOS" 
                    Clicked="OnButtonMisDatos" 
                    HeightRequest="35" 
                    FontSize="12" 
                    TextColor="White" 
                    BackgroundColor= "#5e5e5e"
                    BorderRadius="15"
                    BorderColor="Black"
                    BorderWidth="2"/>
        </StackLayout>

    </Grid>


    <StackLayout Padding="0,10,0,10">
        <BoxView HeightRequest="5" BackgroundColor="Accent" />
    </StackLayout>


   <ListView  HasUnevenRows="True"  x:Name="myListView">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>

                   <StackLayout VerticalOptions="Center" HorizontalOptions="Center" Grid.Column="0">
                        <Label FontSize="20"  Text="{Binding Etiquetas}" TextColor="Black" HorizontalOptions="Center"/>

                        <StackLayout>
                       <BoxView HeightRequest="2" WidthRequest="500" BackgroundColor="Green"/>
                        </StackLayout>

                    </StackLayout>

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

</StackLayout>

Hope I explained well
Thanks guys!!!!


FCM token for push notifications - FirebaseInstanceId.Intance.Token obsolete

$
0
0

Hey everyone. All the examples I see for getting the FCM token in Xamarin use FirebaseInstanceIdService which gives a warning it is is depreciated and obsolete. The code snippet below is an example how I can get the FCM token, but since this is depreciated, what is the recommended way?

            public class MyFirebaseIIDService : FirebaseInstanceIdService
            {
                public override void OnTokenRefresh()
                {
                    var refreshedToken = FirebaseInstanceId.Instance.Token;
                }

            }

I have seen android specific code in Java that looks similar to this as the "new way", but I can't seem to translate this into Xamarin.

FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener( MyActivity.this,  new OnSuccessListener<InstanceIdResult>() {
     @Override
     public void onSuccess(InstanceIdResult instanceIdResult) {
           String newToken = instanceIdResult.getToken();
           Log.e("newToken",newToken);

     }
 });

Any suggestions or are people just continuing to use the depreciated method in Xamarin? Thanks!

Jeremy

"Completed" event is not called when we doesn't click "Done" button in the keyboard(Android/iPhone)

$
0
0

Hi,
when I was debugging my code I came to an conclusion that
1. when we enter values in entry field and click Done button in (Android/iphone) keyboard "complete" Event handler is working fine but
2. when we enter values in entry field and doesn't Done button it doesn't call complete Event handler

how can i achieve the solution for 2nd point

Clear TimePicker or DatePicker on android when navigating on lifecycle events

$
0
0

Hi all,

I'm running into an issue on android where our TimePicker and DatePicker stay visible when we navigate OnPause(). We need to redirect our users back to the login screen when they background the application, but if the TimePicker or DatePicker is active when they do this it stays on the screen. It appears above the login screen and pressing cancel or ok crashes the app.

We are hooking into the native android lifecycle events (not just using Xamarins built in hooks) and we redirect OnResume(). I've tested this in a barebones app though and it still happens OnPause().

Here is our TimePicker:

<TimePicker x:Name="VitalTimePicker" HorizontalOptions="Fill" VerticalOptions="Fill" IsVisible="false" PropertyChanged="OnTimePickerPropertyChanged"/>

And here is an example of redirecting from the barebones app I made:

protected override void OnSleep()
        {
            App.Current.MainPage = new NavigationPage(new NotesPage());
        }

Anyone have any ideas?

Shell Submenu item layout

$
0
0

I am attempting to migrate my current application to a Shell application and so far everything has gone pretty well. My last item I need to complete before I can commit to a full migration is to accomplish a sub-menu item in the flyout menu that needs to bind to a dynamic number of items that need to be synced.

I can get FlyoutItem and MenuItem to go underneath but so far getting them to be that close in proximity has been very tricky. Is there anyone who can give advise on how to get a FlyoutItem and MenuItem to be in this close proximity? So far my attempts have been running into overlay issues and I am a bit of a novice when it comes to XAML layouts.

That little bit of white is actually the "3 forms to sync" text. I feel like I will def need to use some combination of AbsoluteLayout and or RelativeLayout but I am not very familiar with them. Here is the code currently.

Is there any advice anyone can give for this? It's basically my last hurdle to feel comfortable doing a full migration.

How To Use Xamarin.Forms To Use Datalogic Android SDK

$
0
0

Hello.

I need to develop an application for Datalogic Memor 1 device (Handheld device that has android oreo and 1d laser integrated barcode scanner.)

They have a tutorial to use SDK with Xamarin. datalogic.github.io/xamarin/quick-start/

But their sample is Xamarin.Android project, not Xamarin.Forms. Is it possible to use barcode scanning feature from Xamarin.Forms only ? How can i integrate that to Xamarin.Forms?

Different references to same class

$
0
0

I have two custom Forms elements below and am running this test on Android.

namespace TestApp
{
    public class KeyboardView : AbsoluteLayout
    {
        public bool Swapped { get; set; }
        public bool Shifted { get; set; }
        public bool ShiftLock { get; set; }

        public KeyboardView(int left, int top, int fullKeyWidth, int keyHeight) : base()
        {
            var keyView = new KeyboardKeyView();
            SetLayoutBounds(keyView, new Rectangle(left, top, fullKeyWidth, keyHeight));
            Children.Add(keyView);
        }
    }
}

and the actual keyboard key...

namespace TestApp
{
    public class KeyboardKeyView : View
    {
        public KeyboardView ParentKeyboard {
            get
            {
                return Parent as KeyboardView;
            }
        }

        public KeyboardKeyView() : base()
        {
        }
    }
}

The KeyboardKeyView needs to know about the state of the parent KeyboardView to render appropriately. I've tried accessing the Parent element of KeyboardKeyView and casting as KeyboardView. When I don't use a safe cast in the getter above, I get an InvalidCastException even though I confirmed through debugging that the Parent already has the correct object stored.

Another symptom is that if I try to pass in the KeyboardView object to the KeyboardKeyView in the constructor and store it separately from Parent I get this compilation error:

Error CS1503 Argument 2: cannot convert from 'TestApp.KeyboardView [C:\Users\eleva\Projects\TestApp\CustomElements\Keyboard\KeyboardView.cs]' to 'TestApp.KeyboardView [C:\Users\eleva\Projects\TestApp\bin\Debug\netstandard2.0\TestApp.dll]'  TestApp.Android C:\Users\eleva\Projects\TestApp\CustomElements\Keyboard\KeyboardView.cs N/A

This seems to be a clue as to why I can't cast. It seems my application keeps different references to the same class. I've tried wiping out bin/obj and dropping and adding the reference to my Forms project and neither has helped.

How can i access to SIM card storage where the certificates are installed?

$
0
0

Hi,
I want to access to sim card datas. You can know that e-signature method recently appeared in mobile certificate. Installing certificate on sim card. Now I need to access the sim card with the mobile application and get the certificate there. Does anyone know about this topic?


Bind background color of DataGrid's Row Using Grial UI kit in Xamarin

$
0
0

Hello Developers

I am using Grial Kit UI in xamarin and implement a DataGrid Page, But i want to bind background color of each row in Grid data.

This is my UI Code

 <ContentPage.Resources>
        </ResourceDictionary>
<!--     Grid Styles -->
            <Style TargetType="grial:DataGrid">
                    <Setter Property="SelectedBackgroundColor" Value="#20BFE1FF" />
                    <Setter Property="HeaderRowBackgroundColor" Value="{ DynamicResource DataGridHeaderRowBackgroundColor }" />
                    <Setter Property="BackgroundColor" Value="{ DynamicResource DataGridBackgroundColor }" />
                    <Setter Property="GridSeparatorVisibility" Value="None" />
                    <Setter Property="HeaderSeparatorVisibility" Value="None" />
          </Style>

           <!-- Column Styles -->
            <Style x:Key="BaseColumn" TargetType="grial:DataGridColumn">
                    <Setter Property="IsSortable" Value="True" />
                    <Setter Property="SortIconsFontFamily" Value="{StaticResource IconsFontFamily}" />

                    <Setter Property="ColumnWidth" Value="0.1*" />
                    <Setter Property="HeaderTextColor" Value="{ DynamicResource DataGridHeaderTextColor }" />
                    <Setter Property="HeaderTextAlignment" Value="Center" />
                    <Setter Property="HeaderFontSize" Value="14" />
                    <Setter Property="HeaderFontFamily" Value="{ StaticResource AppBoldFontFamily }" />
                    <Setter Property="CellTextColor" Value="{ DynamicResource DataGridCellTextColor }" />
                    <Setter Property="CellPadding" Value="14" />
                    <Setter Property="CellFontSize" Value="14" />
                    <Setter Property="CellTextAlignment" Value="Center" />
                    <Setter Property="CellVerticalAlignment" Value="Center" />
                    <Setter Property="HeaderPadding" Value="4,14" />
           </Style>

       <Style x:Key="NC_Audit_Column" TargetType="grial:DataGridColumn" BasedOn="{StaticResource BaseColumn}">
                    <Setter Property="BindingPath" Value="NON_COMPLY_AUDIT" />
                   <Setter Property="HeaderText" Value="AUDIT" />
            </Style>
            <Style x:Key="NC_Score_Column" TargetType="grial:DataGridColumn" BasedOn="{StaticResource BaseColumn}">
                   <Setter Property="ColumnWidth" Value="75" />
                   <Setter Property="BindingPath" Value="NON_COMPLY_SCORE" />
                   <Setter Property="HeaderText" Value="SCORE" />
            </Style>
        </ResourceDictionary>
 <ContentPage.Resources>

<ContentPage.Content>
    <grial:DataGrid SelectionMode="Row" ItemsSource="{ Binding ItemList}">
          <grial:DataGrid.ColumnDefinitions>
                  <grial:DataGridColumn Style="{ StaticResource NC_Name_Column}" />
                  <grial:DataGridColumn Style="{ StaticResource NC_Score_Column}" />
            </grial:DataGrid.ColumnDefinitions>
      </grial:DataGrid>
</ContentPage.Content>

How can bind background Color in each row and i am passing color field in model

public string Row_BgColor {get; set;}

Thanks

HotReload LiveReload LiveXaml [Mac] [Windows] [nuget package] [opensource]

Pre-Release: Xamarin.Forms 4.2.0-pre1

$
0
0

We've published the 4.2.0-pre1 pre-release of Xamarin.Forms on NuGet; be sure to include pre-releases in your NuGet Package Manager in order to make the package visible. If you encounter any issues or have any feedback to provide, please visit GitHub.

Read the full release notes here.

Notable Additions

  • Shell Lifecycle (PR)
  • Switch ThumbColor (PR)
  • Color.ToHex() (PR)
  • FontImage Markup Extension for FontImageSource (PR)

Additional enhancements for Tizen are featured, as well:

  • Add CheckBox (PR), with Visual support (PR)
  • Support to TabbedPage.BarTextColor, SelctedTabColor, UnselecedTabColor (PR)

Regarding CollectionView

Our original roadmap listed the new CollectionView for official release in Xamarin.Forms 4.2. However, we have determined that it will maintain the Experimental flag for this release. Your feedback during the CollectionView Challenge was important in highlighting the features you need most; in this case, pull-to-refresh and header/footer templates were two of your top wants, among others. Although its development has come a long way, we want to make sure you have the best possible experience when using CollectionView at the time the Experimental flag is removed, which has led us to make this decision. Please continue to test it out if you have the time and let us know what you think. You can read the official spec here.

For more information, you can also read the current docs as well as the original blog post. The 4.2 release includes some bug fixes as well as fuller functionality including grouping on iOS (PR).

Manual Page Navigation Displays Page Incorrectly

$
0
0

Some of the pages in my Xamarin app are tabbed pages - navigation between these pages (using the tabs) works perfectly.

However, some of my pages are not accessible via the tabs, for example, I am displaying a list of items, and clicking on one of the items take you to a detail page for the list item that was clicked. This is handled in the cs code behind for the list page, and navigation is triggered using this:

await Navigation.PushAsync(new DetailPage(DetailPageViewModel)); 

This works, in that it does take you to the detail page, but the page is cut off, and only the lower part of the detail page can be seen - the top half of the page is not displayed and cannot be scrolled to. It only seems to be a problem with iOS, Android does not show the same issue.

Is this a known bug, or am I doing something wrong?

I'm using Xamarin Forms 4.1.0.581479

ObservableCollection for ListView Partially Updates ListView GUI

$
0
0

Has anyone ever experienced a ListView that only partially updates the GUI when binded to an ObservableCollection? I have a chat app that when the page loads, it grabs the chat messages stored in history. Using a foreach loop it loads them into an ObservableCollection. This binds to two labels in my xaml.

The project is set up as a MasterDetail and I am using MVVM.

My ListView gets populated but only shows the text for the first 19 entries in the ObservableCollection. Additional rows are added to the ListView for each object in the ObservableCollection, but the text for the Labels are blank on the screen. I have never had this happen before. It only happens on Android. My iOS app works as expected.

No error is thrown as far as I can tell. In the output there was a message: "gc_minor (nursery full)" so I created an env.conf text file and increased the nursery size. I set it's build action to AndroidEnvironment. That message is now gone from the output when I debug, but I still get the same results.

I have been chasing this ghost for a week now.

Jeremy

Accessibility - How to stop the Back Button always becoming the first Voice Over element

$
0
0

I'm doing some work with a client at the moment with regard accessibility. The app is Xamarin.Forms 3.6
I notice that any screen that has a back button, the button becomes the accessibility focus and thus on entering the screen VoiceOver for iOS announces "Back Button"
What is the best way to decide the first thing that should be said when a user transitions to a screen?

ControlTemplate TemplateBinding : Operation is not valid due to the current state of the object.

$
0
0

I Have a ControlTemplate in my App.Xaml to be used across pages.
All the TemplateBindings work within the ControlTemplate, except the ones within the ColumnDefinitions of the Grid.
Here's the Xaml

            <ControlTemplate x:Key="CommonPageTemplate">
            <Grid RowSpacing="0" 
                  BackgroundColor="Black">
                <Grid.RowDefinitions>
                    <RowDefinition>
                        <RowDefinition.Height>
                            <OnPlatform x:TypeArguments="GridLength">
                                <On Platform="iOS" Value="0.06*" />
                                <On Platform="Android,UWP" Value="0.06*" />
                            </OnPlatform>
                        </RowDefinition.Height>
                    </RowDefinition>
                    <RowDefinition>
                        <RowDefinition.Height>
                            <OnPlatform x:TypeArguments="GridLength">
                                <On Platform="iOS" Value="0.83*" />
                                <On Platform="Android,UWP" Value="0.83*" />
                            </OnPlatform>
                        </RowDefinition.Height>
                    </RowDefinition>
                    <RowDefinition>
                        <RowDefinition.Height>
                            <OnPlatform x:TypeArguments="GridLength">
                                <On Platform="iOS" Value="0.11*" />
                                <On Platform="Android,UWP" Value="0.11*" />
                            </OnPlatform>
                        </RowDefinition.Height>
                    </RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="{TemplateBinding Parent.CommonPageColumnDef1}" />
                    <ColumnDefinition Width="{TemplateBinding Parent.CommonPageColumnDef2}" />
                    <ColumnDefinition Width="{TemplateBinding Parent.CommonPageColumnDef2}" />
                </Grid.ColumnDefinitions>

                <!--<BoxView Grid.ColumnSpan="3" Color="Black" />-->
                <Image  Grid.ColumnSpan="3" Grid.Row="0" Grid.Column="0"
                        Source="{e:ImageMultiResource MyApp.Assets.Images.CommonImages.navbar}" 
                        Aspect="AspectFill"/>

                <StackLayout Grid.Row="0" 
                             Grid.Column="0"
                             IsVisible="{TemplateBinding Parent.AboutButtonIsVisible}"
                             Padding="{TemplateBinding Parent.AboutButtonPadding}">
                    <controls:AboutImageButton  
                                               VerticalOptions="Center" 
                                               HorizontalOptions="Start"
                                               AboutButtonIsVisible="{TemplateBinding Parent.AboutButtonIsVisible}"
                                               AboutButtonCommand="{TemplateBinding Parent.GoToAboutPageCommand}"/>
                </StackLayout>

                <Label Grid.Row="0" Grid.Column="1" 
                       Text="{TemplateBinding Parent.PageTitle}" 
                       Style="{StaticResource HeaderLabelStyle}" 
                       HorizontalOptions="Center"
                       VerticalOptions="Center"
                       Margin="{TemplateBinding Parent.CommonPageTemplatePageTileLabelMargin}">
                </Label>
                <StackLayout Grid.Row="0" 
                             Grid.Column="2">
                    <StackLayout.Padding>
                        <OnPlatform x:TypeArguments="Thickness">
                            <On Platform="iOS" Value="50,0,0,0" />
                            <On Platform="Android,UWP" Value="20,0,0,0" />
                        </OnPlatform>
                    </StackLayout.Padding>
                    <Button  
                        Style="{StaticResource SettingsButtonStyle}" 
                        VerticalOptions="Center"
                        HorizontalOptions="Center"
                        IsVisible="{TemplateBinding Parent.SettingsButtonIsVisible}"
                        IsEnabled="{TemplateBinding Parent.SettingsButtonIsEnabled}"
                        WidthRequest="{TemplateBinding Parent.SettingsButtonWidth}"
                        Command="{TemplateBinding Parent.GoToSettingsPageCommand}"
                        Text="{TemplateBinding Parent.SettingsText}"
                        Margin="{TemplateBinding Parent.SettingsButtonMargin}">
                        <Button.Padding>
                            <OnPlatform x:TypeArguments="Thickness">
                                <On Platform="iOS" Value="0,0,0,0" />
                                <On Platform="Android,UWP" Value="0,0,0,0" />
                            </OnPlatform>
                        </Button.Padding>
                        <Button.HeightRequest>
                            <OnPlatform x:TypeArguments="x:Double">
                                <On Platform="iOS" Value="23" />
                                <On Platform="Android,UWP" Value="28" />
                            </OnPlatform>
                        </Button.HeightRequest>
                    </Button>
                </StackLayout>
                <ContentPresenter Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" />
                <controls:CustomBottomBar Grid.Column="0" Grid.Row="2" HeightRequest="60" Grid.ColumnSpan="3"
                                          HorizontalOptions="FillAndExpand" VerticalOptions="EndAndExpand"/>

            </Grid>
        </ControlTemplate>

How do I resolve this issue for these TemplateBindings in the Grid.ColumnDefinitions?


How to add a Grid to ScrollView, so it can be scrolled later?

$
0
0

I have a big grid that don't mutch the screen size I wanted to add it to ScrollView so user could scroll through it. But it gives me an:

System.InvalidCastException: Specified cast is not valid

For now I am stuck I know the error is somewhere in cooperation between Grid and ScrollView but have no idea where.
Here is the code of DataTemplate that I use:

DataTemplate template = new DataTemplate(() =>
            {

                Grid grid = new Grid()
                {
                    BackgroundColor = Color.AliceBlue

                };
                grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); // 0
                grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); // 1
                grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); // 2
                grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); // 3
                grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); // 4
                grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });

                Label TransactionDate = new Label();
                Label CorrespondentName = new Label();
                Label CorrespondentEmail = new Label();
                Label trAmount = new Label();
                Label RestBalance = new Label();

                // Setting Binding
                TransactionDate.SetBinding(Label.TextProperty, "trDate");
                CorrespondentName.SetBinding(Label.TextProperty, "CorrespondentName");
                CorrespondentEmail.SetBinding(Label.TextProperty, "CorrespondentEmail");
                trAmount.SetBinding(Label.TextProperty, "trAmount");
                RestBalance.SetBinding(Label.TextProperty, "RestBalance");

                grid.Children.Add(TransactionDate, 0, 0);
                grid.Children.Add(CorrespondentName, 1, 0);
                grid.Children.Add(CorrespondentEmail, 2, 0);
                grid.Children.Add(trAmount, 3, 0);
                grid.Children.Add(RestBalance, 4, 0);

                return new ScrollView { Content = grid, Orientation = ScrollOrientation.Horizontal };
            });

            //TransactionsListView.HeaderTemplate = v;
            TransactionsListView.ItemsSource = TrHistoryList;
            TransactionsListView.ItemTemplate = template;

And here is the Task that fills the ObservableCollection:

private async Task SettingHistoryAsync(string email)
        {
            HttpResponseMessage responce = await httpClient.GetAsync(apiMethods.API_TransactionsHistory_GET() + email);
            string JsonResponce = await responce.Content.ReadAsStringAsync();
            List<TransactionsHistoryModel> TrModel = new List<TransactionsHistoryModel>();

            TrModel = JsonConvert.DeserializeObject<List<TransactionsHistoryModel>>(JsonResponce).ToList();
            foreach(TransactionsHistoryModel model in TrModel)
            {
                TrHistoryList.Add(model);
            }
        }

TransactionsListView is the ListView wich contains all the data.

Can anyone please give me some little tip where to look.

How to write custom layout that renders children

$
0
0

I want to do something like this:

<local:MyCustomHeader>
    <Image ... />
    <Label Text="Hello" />
</MyCustomHeader>

Is there any way to do that in Xamarin? The idea is to have a header that can render different content

How to share data only Facebook or Twitter in Xamarin Forms.

$
0
0

hi ,

I want open (Custom/Default) sharing functionality in my Application for only Facebook or twitter apps.
How can do it . Please give me Suggestion

Enable http clear text Text For Andriod 9 Forms

$
0
0

Hi, Folks, i have enabled internet on the permissions in the manifest but still, i get.

The server is not online and won't have a ssl that i will be accessing it will all be localhost not on the internet I seen examples but they don't work for xamrain forms how do I enable http clear text

{Java.IO.IOException: Cleartext HTTP traffic to 192.168.0.13 not permitted
at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <9ed4c1a7b8844cdcb5330cc881c1cd6a>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeAbstractVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00014] in <9ed4c1a7b8844cdcb5330cc881c1cd6a>:0
at Java.Net.HttpURLConnectionInvoker.Connect () [0x0000a] in :0
at Xamarin.Android.Net.AndroidClientHandler+<>c__DisplayClass44_0.b__0 () [0x0005a] in :0
at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <3a61d48d66dd458fa0b64990b6c8f8cc>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <3a61d48d66dd458fa0b64990b6c8f8cc>:0
--- End of stack trace from previous location where exception was thrown ---

at Xamarin.Android.Net.AndroidClientHandler.DoProcessRequest (System.Net.Http.HttpRequestMessage request, Java.Net.URL javaUrl, Java.Net.HttpURLConnection httpConnection, System.Threading.CancellationToken cancellationToken, Xamarin.Android.Net.AndroidClientHandler+RequestRedirectionState redirectState) [0x0012e] in :0
at Xamarin.Android.Net.AndroidClientHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x002be] in :0
at System.Net.Http.HttpClient.SendAsyncWorker (System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) [0x000ca] in <162fad71ed6e4a3cb7598d196d170e1b>:0
at FuelStockApp.RESTApi.FuelRestServices.GetBomLookups () [0x00065] in D:\Git\FuelStockAppLive\FuelStockApp\FuelStockApp\FuelRestServices.cs:72
--- End of managed Java.IO.IOException stack trace ---
java.io.IOException: Cleartext HTTP traffic to 192.168.0.13 not permitted
at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
}

3rd party app login, Disqus, in a webview.

$
0
0

Is there a way to make Disqus comments work within a webview? Currently using a Hybridwebview for my project which will load a page. In that page, there is a button the user can click which then slides open a panel containing comments. However, if the user tries to login, it stops working, it will take me to a page to enter my credentials. But it never actually logs in, or passes the credentials back to the app/webview.

I am a app beginner, this is my first xamarin project, been at it for a few weeks to get this far. I thought I was about to be finished with my first app, just pop the comments on and done. But , latest stumbling block.

Typically in a web browser, the login would open in a new modal/popup, then when you click Login, it disappears and the page reloads with your username.

Is using a plugin like Disqus possible in a webview (HybridWebView).

Viewing all 89864 articles
Browse latest View live


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