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

Getting the Alias of a Paired Bluetooth device

$
0
0

In Android phone you can go into Bluetooth settings and change the displayed name of a paired device, to make it more meaningful, e.g. DESKTOP-E44108B becomes WorkPC.

I use devices=btAdapter.BondedDevices to get a list of the paired devices, but the only 'Name' I can find in the resultant BluetoothDevice structure is the original name ;DESKTOP-E44108B'. Does anyone know how you get the alias?

Ta
PS: I've tried Method method= device.getClass().getMethod("getAliasName"); but that won't build as BluetoothDevice does not contain a definition for 'getClass' and no extension method. I am using Java.Lang.Reflect.


BarBackgroundColor

$
0
0

MainPage = new NavigationPage(new ProductList())
{
BarBackgroundColor = Color.Red,
BarTextColor = Color.White
};
BarBackgroundColor is not working but BarTextColor worked.I tried by replacing color code like FromHex("#77D065") and adding NavigationPage.HasNavigationBar="true"

Can anyone help me?

Where's Main.axml in the forms project?

$
0
0

I was following a example for send push notification in link and the author say to change the file:

Resources => Layout => Main.axml

but in my project folder(Resurce->Layout) i have:

Tabbar.axml
Toolbar.axml

Do i must create a Main.axml file?

Do i need extra configuration to receive message in my App with firebase

$
0
0

Do i need extra configuration to receive message in my App with firebase?

Because i'm not receiving message with this code:

using System.Threading.Tasks;
using FirebaseNet.Messaging;
using System;

namespace MessageSender
{
    class MessageSender
    {
        static void Main(string[] args)
        {
            Task t = new Task(async () =>
            {
                await foo();
            });
            t.Start();


            Console.ReadLine();
        }

        public static async Task<IFCMResponse> foo()
        {
            FCMClient client = new FCMClient("AAAAx6rZ8I8:APA91bEAXEDGanoON2gKV2sAblRwZqe9lNCAFsD0r_FAg_P_Zq3C3JANTCDWbMo18pAzDy4wJ0720sQLsKUhOpoNdT9QERe3H6D9kb7y59_fO7ucwrdYg6Mu9x8HgUN9YLpiznLFxNRP"); //as derived from https://console.firebase.google.com/project/
            var message = new Message()
            {
                To = "APA91bE-YeutsWsWdwO_E5UJteVTThBgeWCK4WD-yzhiZB1LTttoAVd-fKMbo6BKRXyH5Df-RzvTw-c-ncjtZw0eRG5R23I0uiqTIUtPf7eXRkvNoK2Zj0f6GSzS7EOCp6xIecvm5P18", //topic example /topics/all
                Notification = new AndroidNotification()
                {
                    Body = "great match!",
                    Title = "Portugal vs. Denmark",
                }
            };
            var result = await client.SendMessageAsync(message);
            return result;
        }
    }
}

It no has error, but the message do not arrive. Is there how do I debug with firebase and xamarin.forms? The code above i got it here

How to install Xamarin.Forms to .net standard in Xamarin.Native?

$
0
0

I made a solution that consists in 5 projects, 3 .net standard, blank app android project and blank app iOS project, I have a component that only works fine in xamarin.forms, I want to create a xaml page in a .net standard project, when I tried to install xamarin.forms from ''Manage nugets package for solution'' the console show this error "Package restore failed, Rolling back package changes for MyProject"

How can I create a Xamarin.Native solution with a .net standard project that has Xamarin.Forms?

DevExpress Grid for Xamarin forms IOS Error MT2002: Failed to resolve assembly

$
0
0

I am using Visual Studio 2017, I have added DevExpress grid from Add new components. Checked references in both PCL and IOS looks fine. When doing build for IOS it gives following error:
Error MT2002: Failed to resolve assembly: 'DevExpress.Mobile.Core.v17.1, Version=17.1.2.0, Culture=neutral, PublicKeyToken=null' (MT2002)

Also tried clean rebuild, still the same error. Also tried setting linker to "Don't link" and "Link SDK assemblies" both still the same issue.

Android project builds fine.

Please advise

Thanks

Passing Xamarin.Forms.Maps instance from one activity to another

$
0
0

Hi,

I have defined Xamarin.Forms.Maps.Map in shared library. On click of button i have to show current location in the map.

So on click of button i am passing instance of Map to my ViewModel. From ViewModel i am passing instance of Map to method defined in class present in my android project.

Problem is from that class i have to start an activity which require map instance so that location in map can be updated. But i am not able to pass instance of Map using intent. Please help me on this.

Please tell how i can pass object of map using intent.

Thanks,
Prasoon

cannot access a disposed object in PulltoRefresh + xamarin.forms

$
0
0

i used Refractored.XamForms.PullToRefresh.dll for pulltorefresh in my one child page of tabbed page.but when i redirect from other page to this it gives me error

cannot access a disposed object of PullToRefresh Renderer

i think pulltorefresh dispose its object when we navigate to other page and when we come back to this page.it will not able to access its object so it throws error.

but i dont understand why it is behaving like that.what is the solution of it.

please help if anybody else too faced this issue

many many thanks in advance


Adapt.Presentation NuGet Release 1.3.0

$
0
0

We are maintaining a library and would like to encourage others to grab the library, give us feedback and contribute.

The package is Adapt.Presentation.

Here are a list of some of the cross platform features:
-Multi Choice, async ready ListView
-DateTimePicker
-Modal DateTimePicker
-In App Notifications
-File Selector
-Camera/Media
-File Picking
-Dynamic XAML Rendering
-GeoLocator
-WrapLayout
-Text masking Entry behavior

Sample app pic (UWP):

Repo:
https://github.com/MelbourneDeveloper/Adapt.Presentation.git

NullReferenceException: Platform.UWP.ImageRenderer.UpdateAspect()

$
0
0

I'm getting the above exception when re-entering a page in my UWP cross platform app in Visual Studio. I'm using some SyncFusion controls namely SfDataGrid and SfDigitalGauge on the page in question. The page is the 2nd of 5 tabbed pages. When I first enter the page, all is fine, but when I Navigate to another, then come back I get the above error. Any help appreciated.

Full exception:

**{System.NullReferenceException: Object reference not set to an instance of an object.
at Xamarin.Forms.Platform.UWP.ImageRenderer.UpdateAspect()
at Xamarin.Forms.Platform.UWP.ImageRenderer.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()}
**
PS: I get a message about not being able to debug this due to it being Native, but if I set mixed managed/native debugging it doesn't seem to help.

edit: Just tried a release build and it crashes even the first time entering the page, and it doesn't display at all, whereas in debug it displays and seems to work fine, I can interact with it etc.

how to handle bindable picker done click in xamarin forms for iOS ?

$
0
0

I have binding bindable picker with a viewmodel. Here I'm unable to do the alphabetical order for the items in picker and reset the bindable picker after choosing the selectedvalue item from that picker.
In xamarin forms iOS, when I choose an item from picker it will bind to the Entry control field without clicking the Done button. and if I click on that picker again it is displaying the last selected value in it.
Could you please tell me how to handle the Done click, how to reset the picker value(like just to show select one) and sorting (like alphabetical order).

Thanks in advance.

Xamarin.Forms - read failed, socket might closed or timeout, read ret: -1

$
0
0

Hi All,

Currently I am trying to connect and print text on label printer RPP320. I am using C# and Xamarin.Forms.

So what I have are 3 different ways to connect to printer and all of them are failing.

**foreach (var parcelUuid in parcelUuids)
{
mBluetoothAdapter.CancelDiscovery();
//METHOD A

try
{
    var method = Device.GetType().GetMethod("createRfcommSocket");
    mmSocket = (BluetoothSocket)method.Invoke(Device, new object[] { Port });
    mmSocket.Connect();
    Debug.WriteLine("Connected...");
    isConnected = true;
    DoDeviceConnected();
    break;
}
catch (Exception e)
{

}

//METHOD B

try
{
    var method = Device.GetType().GetMethod("createInsecureRfcommSocket");
    mmSocket = (BluetoothSocket)method.Invoke(Device, new object[] { Port });
    mmSocket.Connect();
    Debug.WriteLine("Connected...");
    isConnected = true;
    DoDeviceConnected();
    break;
}
catch (Exception e)
{

}

}

if (!isConnected)
{
//METHOD C

try
{
    IntPtr createRfcommSocket = JNIEnv.GetMethodID(Device.Class.Handle, "createRfcommSocket", "(I)Landroid/bluetooth/BluetoothSocket;");
    // JNIEnv.GetMethodID(device.Class.Handle, "createRfcommSocket", "(I)Landroid/bluetooth/BluetoothSocket;");
    IntPtr _socket = JNIEnv.CallObjectMethod(Device.Handle, createRfcommSocket, new global::Android.Runtime.JValue(Port));
    mmSocket = Java.Lang.Object.GetObject<BluetoothSocket>(_socket, JniHandleOwnership.TransferLocalRef);
    /*
    mmSocket =
        mBluetoothAdapter.GetRemoteDevice(Device.Address)
            .CreateRfcommSocketToServiceRecord(
                UUID.FromString("00001101-0000-1000-8000-00805F9B34FB"));
    */
    mmSocket.Connect();
    DoDeviceConnected();
}
catch (IOException connectException)
{

    Debug.WriteLine("IO Error: " + connectException.Message);
    // Unable to connect; close the socket and get out
    try
    {
        mmSocket.Close();
    }
    catch (IOException closeException)
    {
        Debug.WriteLine("Error: " + closeException.Message);
    }
    throw new Exception(connectException.Message);
    return;
}

}**

In Method A this code returns null for method variable => var method = Device.GetType().GetMethod("createRfcommSocket");
In Method B this code returns null for method variable => var method = Device.GetType().GetMethod("createInsecureRfcommSocket");
In Method C this code => mmSocket.Connect(); throws exception:

**
{Java.IO.IOException: read failed, socket might closed or timeout, read ret: -1 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in :0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeAbstractVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00014] in :0 at Android.Bluetooth.BluetoothSocket.Connect () [0x0000a] in <85286732fd894fbbba95d2215e5f9ec6>:0 at DemoApp.Droid.Printing.ConnectThread.ProbeConnection () [0x001a4] in D:\DemoApp - old\DemoApp\DemoApp\DemoApp.Android\Printing\ConnectThread.cs:203 --- End of managed Java.IO.IOException stack trace --- java.io.IOException: read failed, socket might closed or timeout, read ret: -1 at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:907) at android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:866) at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:540) at md5270abb39e60627f0f200893b490a1ade.ButtonRenderer_ButtonClickListener.n_onClick(Native Method) at md5270abb39e60627f0f200893b490a1ade.ButtonRenderer_ButtonClickListener.onClick(ButtonRenderer_ButtonClickListener.java:30) at android.view.View.performClick(View.java:6199) at android.widget.TextView.performClick(TextView.java:11090) at android.view.View$PerformClick.run(View.java:23647) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6724) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) }
**

I am not sure where the problem is, should I continue with this approach and try fix it and change the way I'm connecting to printer.

I found several other questions about this issue in stackoverflow and other platforms, but most of them we're with solution written in Java or weren't applicable in my case.

Thanks in advance for help !

iOS SignalR Client Error via HTTPS (PCL-Project)

$
0
0

Hello ,

I've got the error from iOS project (PCL-Project) using SignalR-Client when Hubconnection.Start(); via HTTPS but the code it's worked perfectly on Android how should i solve this problem.

And this is the error

{System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error getting response stream (ReadDone1): ReceiveFailure ---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags) [0x00017] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs:1773 at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x0009b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/System/net/System/Net/Sockets/NetworkStream.cs:513 --- End of inner exception stack trace --- at Mono.Net.Security.MobileAuthenticatedStream.EndReadOrWrite (System.IAsyncResult asyncResult, Mono.Net.Security.AsyncProtocolRequest& nestedRequest) [0x00056] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:335 at Mono.Net.Security.MobileAuthenticatedStream.EndRead (System.IAsyncResult asyncResult) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:278 at System.Net.WebConnection.ReadDone (System.IAsyncResult result) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System/System.Net/WebConnection.cs:475 --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00059] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1031 at System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func2[T,TResult] endFunction, System.Action1[T] endAction, System.Threading.Tasks.Task1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <6314851f133e4e74a2e96356deaa0c6c>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <6314851f133e4e74a2e96356deaa0c6c>:0 at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x00406] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:388 --- End of inner exception stack trace --- at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x0049f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:392 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <6314851f133e4e74a2e96356deaa0c6c>:0 at System.Net.Http.HttpClient+d__48.MoveNext () [0x00080] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:276 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00013] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:2159 at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:3189 at System.Threading.Tasks.Task.Wait () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:3054 at Taxi.Mobile.Global.InitialSignalR () [0x00027] in E:\Projects\Projects_VS2015\Workspace\Taxi\Taxi.Mobile\Taxi.Mobile\Global.cs:27 ---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error getting response stream (ReadDone1): ReceiveFailure ---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags) [0x00017] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs:1773 at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x0009b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/System/net/System/Net/Sockets/NetworkStream.cs:513 --- End of inner exception stack trace --- at Mono.Net.Security.MobileAuthenticatedStream.EndReadOrWrite (System.IAsyncResult asyncResult, Mono.Net.Security.AsyncProtocolRequest& nestedRequest) [0x00056] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:335 at Mono.Net.Security.MobileAuthenticatedStream.EndRead (System.IAsyncResult asyncResult) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:278 at System.Net.WebConnection.ReadDone (System.IAsyncResult result) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System/System.Net/WebConnection.cs:475 --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00059] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1031 at System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func2[T,TResult] endFunction, System.Action1[T] endAction, System.Threading.Tasks.Task1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <6314851f133e4e74a2e96356deaa0c6c>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <6314851f133e4e74a2e96356deaa0c6c>:0 at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x00406] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:388 --- End of inner exception stack trace --- at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x0049f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:392 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <6314851f133e4e74a2e96356deaa0c6c>:0 at System.Net.Http.HttpClient+d__48.MoveNext () [0x00080] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:276 <---}

Cannot access a disposed object. Object name: 'Android.Widget.ListView'.

$
0
0

Has anybody encountered a crash like this? Is there any workaround?

StackTrace:
[MonoDroid] System.ObjectDisposedException: Cannot access a disposed object.
[MonoDroid] Object name: 'Android.Widget.ListView'.
[MonoDroid] at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <6cd960837cc24c26bab2a0a29b597627>:0
[MonoDroid] at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <6cd960837cc24c26bab2a0a29b597627>:0
[MonoDroid] at Android.Widget.ListView.RemoveHeaderView (Android.Views.View v) [0x00031] in :0
[MonoDroid] at Xamarin.Forms.Platform.Android.ListViewAdapter.OnDataChanged () [0x0002c] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\SliderRenderer.cs:21
[MonoDroid] at Xamarin.Forms.Platform.Android.ListViewAdapter.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\SliderRenderer.cs:20
[MonoDroid] at Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedItemsList.cs:758 [MonoDroid] at Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e, System.Boolean fixWindows) [0x0047a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedItemsList.cs:1101
[MonoDroid] at Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedItemsList.cs:955 [MonoDroid] at Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].OnItemsSourceChanged (System.Boolean fromGrouping) [0x00061] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedItemsList.cs:936
[MonoDroid] at Xamarin.Forms.Internals.TemplatedItemsList`2[TView,TItem].BindableOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00020] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedItemsList.cs:648
[MonoDroid] at (wrapper delegate-invoke) :invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
[MonoDroid] at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:137
[MonoDroid] at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:388
[MonoDroid] at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x000f4] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:592
[MonoDroid] at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:389
[MonoDroid] at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:174
[MonoDroid] at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:56
[MonoDroid] at Xamarin.Forms.BindingExpression+BindingExpressionPart.b__47_0 () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:540
[MonoDroid] at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in :0
[MonoDroid] at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in :0
[MonoDroid] at (wrapper dynamic-method) System.Object:d901f7dc-e1dd-4118-a519-234449748f0c (intptr,intptr)
[Mono] GC_BRIDGE waiting for bridge processing to finish
[art] Starting a blocking GC Explicit
[art] Explicit concurrent mark sweep GC freed 4861(418KB) AllocSpace objects, 13(260KB) LOS objects, 8% free, 22MB/24MB, paused 421us total 7.220ms
[Mono] GC_TAR_BRIDGE bridges 14 objects 14 opaque 0 colors 14 colors-bridged 14 colors-visible 14 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.03ms tarjan 0.02ms scc-setup 0.03ms gather-xref 0.01ms xref-setup 0.01ms cleanup 0.42ms
[Mono] GC_BRIDGE: Complete, was running for 8.83ms
[Mono] GC_MINOR: (Nursery full) time 5.93ms, stw 9.15ms promoted 2022K major size: 18896K in use: 17158K los size: 19456K in use: 15869K
[Mono] GC_BRIDGE waiting for bridge processing to finish
[art] Starting a blocking GC Explicit
[art] Explicit concurrent mark sweep GC freed 7972(615KB) AllocSpace objects, 18(456KB) LOS objects, 8% free, 21MB/23MB, paused 440us total 7.116ms
[Mono] GC_TAR_BRIDGE bridges 584 objects 45678 opaque 14980 colors 293 colors-bridged 260 colors-visible 260 xref 53 cache-hit 0 cache-semihit 0 cache-miss 33 setup 0.05ms tarjan 9.97ms scc-setup 0.06ms gather-xref 0.06ms xref-setup 0.02ms cleanup 6.02ms
[Mono] GC_BRIDGE: Complete, was running for 18.32ms
[Mono] GC_MAJOR_SWEEP: major size: 18720K in use: 16595K
[Mono] GC_MAJOR: (LOS overflow) time 32.03ms, stw 35.39ms los size: 9216K in use: 634K
Steps to reproduce:
1. Opening app
2. Press physical back button (close the app)
3. Above 2 steps many times (and once app is crashing)

Android web view not sizing properly on rotate. (Using Xamarin)

$
0
0

I am encountering an issue when using a custom web view with Xamarin forms where when the device rotates the viewport sizing seems to gets messed up and thinks the device has impossible dimensions. I will attach screenshots at the end of what this looks like when debugging with Chrome shortly. Essentially what is happening is when the web view loads up, everything works just fine. When the device is rotated height dimension (as confirmed by javascript) is shoots up to about 2000px. When rotated back to it's original position, the height dimension remains messed. This creates an issue where part of the screen is not visible and cannot be scrolled to.

Here's the Renderer:

[assembly: ExportRenderer(typeof(HybridWebView), typeof(HybridWebViewRenderer))]
namespace HBMDashXF.Droid
{
    public class HybridWebViewRenderer : ViewRenderer<HybridWebView, HSRWebView>
    {
        const string JavaScriptFunction = "function invokeCSharpAction(data){jsBridge.invokeAction(data);}";

        protected override void OnElementChanged(ElementChangedEventArgs<HybridWebView> e)
        {
            base.OnElementChanged(e);


            if (Control == null)
            {
                var webView = new HSRWebView(this.Context);

                Android.Webkit.WebView.SetWebContentsDebuggingEnabled(true);

                webView.LayoutParameters = new LinearLayout.LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent);
                webView.Settings.JavaScriptCanOpenWindowsAutomatically = true;
                webView.SetWebViewClient(new GeoWebViewClient());
                webView.Settings.JavaScriptEnabled = true;
                webView.SetInitialScale(1);
                webView.Settings.LoadsImagesAutomatically = true;
                webView.Settings.DomStorageEnabled = true;
                webView.Settings.DatabaseEnabled = true;
                webView.Settings.SetAppCacheEnabled(true);
                webView.Settings.SetGeolocationEnabled(true);
                webView.Settings.SetGeolocationDatabasePath(webView.Settings.DatabasePath);
                webView.Settings.UseWideViewPort = true;
                webView.Settings.LoadWithOverviewMode = true;
                webView.ScrollBarStyle = Android.Views.ScrollbarStyles.OutsideOverlay;
                webView.ScrollbarFadingEnabled = false;
                webView.SetWebChromeClient(new WebChromeClientCustom(Forms.Context));
                SetNativeControl(webView);
            }
            if (e.OldElement != null)
            {
                Control.RemoveJavascriptInterface("jsBridge");

                Control.ClearHistory();

                var hybridWebView = e.OldElement as HybridWebView;
                hybridWebView.Cleanup();
            }
            if (e.NewElement != null)
            {
                Control.AddJavascriptInterface(new JSBridge(this), "jsBridge");

                if (Element.Uri.StartsWith("http"))
                {
                    System.Diagnostics.Debug.WriteLine("Navigating to: " + Element.Uri);
                    Control.LoadUrl(Element.Uri);
                    InjectJS(JavaScriptFunction);
                }
                else
                {
                    Control.LoadUrl(string.Format("file:///android_asset/Content/{0}", Element.Uri));
                    InjectJS(JavaScriptFunction);
                }
            }
        }

        void InjectJS(string script)
        {
            if (Control != null)
            {
                Control.LoadUrl(string.Format("javascript: {0}", script));
            }
        }

        private class GeoWebViewClient : WebViewClient
        {
            public override bool ShouldOverrideUrlLoading(Android.Webkit.WebView view, string url)
            {
                System.Diagnostics.Debug.WriteLine("ShouldOverrideUrlLoading:" + url);

                if (url.StartsWith("mailto:") || url.StartsWith("tel:"))
                {
                    Intent intent = new Intent(Intent.ActionView,
                            Android.Net.Uri.Parse(url));
                    Forms.Context.StartActivity(intent);
                    return true;
                }

                // When user clicks a hyperlink, load in the existing WebView
                view.LoadUrl(url);
                return true;
            }

        }
        private class WebChromeClientCustom : WebChromeClient
        {
            private readonly Context _context;

            public WebChromeClientCustom(Context context )
            {
                _context = context;
            }

            public override void OnGeolocationPermissionsShowPrompt(string origin, GeolocationPermissions.ICallback callback)
            {
                System.Diagnostics.Debug.WriteLine("Asking for location permission.");

                callback.Invoke(origin, true, false);

            }
        }

    }
}

Here's the MainActivity:

[Activity(Label = "HBMDash",
    Icon = "@drawable/icon",
    Theme = "@style/MainTheme",
    ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{

    protected override void OnCreate(Bundle bundle)
    {
        TabLayoutResource = Resource.Layout.Tabbar;
        ToolbarResource = Resource.Layout.Toolbar;

        base.OnCreate(bundle);

        global::Xamarin.Forms.Forms.Init(this, bundle);
        LoadApplication(new App());
    }
}

SQLite: fix a corrupt database and shrink

$
0
0

Hi guys,
is there a way to shrink a database from the code? I found in my database some tables are corrupted: how is it possible to detect that from code and fix it?

Thank you in advance.

TLS Exception with TLS1.2 in VS2017

$
0
0

Hi,
I am trying to connect through TLS1.2 from Android in Xamarin.Forms.

I have set HttpClient as Android and SSL/TLS Implementation as Native TLS 1.2+ in Droid properties.

In the code I set:

            System.Environment.SetEnvironmentVariable("MONO_TLS_PROVIDER‌​", "btls");
            System.Environment.SetEnvironmentVariable("XA_TLS_PROVIDER‌​", "btls");
            System.Environment.SetEnvironmentVariable("XA_HTTP_CLIENT_HANDLER_TYPE", "Xamarin.Android.Net.AndroidClientHandler");
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

And I have tried to create my HttpClient object as:

            using (HttpClient client = new HttpClient())

or
using (HttpClient client = new HttpClient(new NativeMessageHandler()))
or
using (HttpClient client = new HttpClient(new Xamarin.Android.Net.AndroidClientHandler()))

But in all cases when I execute:

HttpResponseMessage responseHttp = await client.PostAsync(new Uri(new Uri(Constants.ApiBaseUrl), "authorize"), content);

I get the exception:

System.Net.WebException: Error: SecureChannelFailure (Ssl error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL
at /tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/boringssl/ssl/handshake_client.c:808) ---> Mono.Btls.MonoBtlsException: Ssl error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL
at /tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/boringssl/ssl/handshake_client.c:808
at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00047] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Btls/MonoBtlsContext.cs:201
at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncProtocolRequest asyncRequest, Mono.Net.Security.AsyncOperationStatus status) [0x0002a] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:594
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (Mono.Net.Security.AsyncOperationStatus status) [0x0006b] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:272
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation () [0x0000d] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:218
at Mono.Net.Security.AsyncProtocolRequest.StartOperation () [0x0003c] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:204
at Mono.Net.Security.AsyncProtocolRequest.StartOperation (Mono.Net.Security.AsyncOperation operation) [0x00024] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:189
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00057] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:216
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x0006c] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:218
at Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x0000c] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:126
at Mono.Net.Security.Private.MonoSslStreamWrapper.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/MonoSslStreamWrapper.cs:75
at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x0007b] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:116
at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest request) [0x00073] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net/WebConnection.cs:412
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00059] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net/HttpWebRequest.cs:1031
at System.Net.HttpWebRequest.GetResponse () [0x0000e] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net/HttpWebRequest.cs:1043
at TlsTest.GetWebPage (System.String url) [0x0009e] in <7ad9caa5280c42fa9e47b5cc3d9b1e0e>:0
at TlsTest.Main (System.String[] args) [0x0029c] in <7ad9caa5280c42fa9e47b5cc3d9b1e0e>:0

On the other hand, if I try with this other code:

            HttpWebRequest httpWebRequest = WebRequest.CreateHttp(new Uri(new Uri(Constants.ApiBaseUrl), "authorize"));
            httpWebRequest.Method = "POST";
            httpWebRequest.Credentials = CredentialCache.DefaultNetworkCredentials;
            httpWebRequest.ClientCertificates = cryptoSvc.x509HostCertificates;
            Stream sw = httpWebRequest.GetRequestStream();

I get another exception:

errorMsg
"RestService-SendJsonDataAsync ERROR: Error: SecureChannelFailure (Ssl error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL\n at /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/external/mono/external/boringssl/ssl/handshake_client.c:808)"

Does anyone know what is wrong, please?

Thanks so much for your helping and time.

I get an error that shows a dll.mdb file is missing.I thought this was supposed to be auto-generated

$
0
0

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(5,5): Error MSB3030: Could not copy the file "C:\Users\Tolu\Documents\ICE Dialler\Dialler1\Dialler1\Dialler1\bin\Debug\Dialler1.dll.mdb" because it was not found. (MSB3030) (Dialler1)

Question around using Xamarin.Forms with Paypal.Forms

$
0
0

Q1) In order to use Paypal.Forms, ... should I assume I should go ahead to create a new app in the 'REST API apps' in Paypal website first?
Q2) Accorrding to this website 'https://github.com/AlejandroRuiz/PayPal.Forms', It shows how we can make a request for a single or a list of buying items. But, how about 'Profile sharing' and 'Obtain a Client Metadata ID'? I am not quite sure when to use this? Or why we need profile sharing or client MetaData? and what is the sequent? How to start?
Q3) Do I need to use OAuth for paypal.forms implementation?
Q4)Do I need to write any server side script to validate and capture the payment, and host it on a web hosting server?
Q5) How about the return URL upon the completion of the payment? .... If I have no hosting a website, what should I put for the return Url?

Event when my ContentPage is popped off the stack?

$
0
0

Hi guys,
I must be going code-blind, I can't see an event or method to override in my custom ContentPage that will let me know when it has been popped (e.g. when in iOS the user taps the top left back option). OnDisappear doesn't work as that also gets called if another view is pushed onto the stack on top of my page.
Anything I can do here?

Regards
John

Viewing all 77050 articles
Browse latest View live