Quantcast
Viewing all 204402 articles
Browse latest View live

CMSampleBuffer Attachment Setting

Trying to set DisplayImmediately setting but cannot se how, got so far...

CMSampleBufferAttachmentSettings[] sampleBufferAttachmentSettings = sampleBuffer.GetSampleAttachments(true);
sampleBufferAttachmentSettings[0].DisplayImmediately = true;


WatchOS 5.1 TCP Outgoing connection problem

Hello.

My Watch App call web service on https protocol in Internet.
I have always nw_resolver_create_dns_service_locked error:

WatchKit Extension[326:81502] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
WatchKit Extension[326:81502] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
WatchKit Extension[326:81502] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
WatchKit Extension[326:81502] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:8 Err:-1 Errno:1 Operation not permitted
WatchKit Extension[326:81502] [] nw_resolver_create_dns_service_locked DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
WatchKit Extension[326:81502] TIC TCP Conn Failed [1:0x1669aaa0]: 10:-72000 Err(-65563)
WatchKit Extension[326:81492] Task . HTTP load failed (error code: -1009 [10:-72000])
WatchKit Extension[326:81492] NSURLConnection finished with error - code -1009

I added to file
com.apple.security.network.client

but I have new error
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.OPGbCB/extracted/Payload/isafereader.app : 0xe8008016 (The executable was signed with invalid entitlements.)
error MT1006: Could not install the application '/Users/dev/Projects/qaz/qaz/bin/iPhone/Release/qaz.app' on the device 'iPhone (Daniel)': Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).

I checked provisioning options on developer.apple.com.
I have all permissions checked.

What am I doing wrong?

Code MSB4062

Hi Xamarin Forum,
I notice one thing when I update my Xamarin.Forms to 3.0.0.446417 in VS 2017 when I start a new project either .Net or shared I immediately got the error MSB4062 The "Xamarin.Forms.Build.Tasks.XamlGTask" task could not be loaded from the assembly. Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

So how can I fix this?
Thank you

D8 and R8 build experience/results

I was so excited and spent entire day to make these settings working for one my apps. Final results are totally disappointing. First of all, some nuget packages giving trouble. some Proguard settings arent liked by r8. especially -optimizations causing errors. there are already 3 github issues created for those. anyhow finally i could make it compile and package without any error.

 Aot+lvvm+bundle into native assemblies+ CreatePackagePerAbi+ Full linking used for each 2 tests
1) app with multidex+proguard  = apk size 26,4mb  dex size 3,4mb
2) app with d8+r8+ no multidex+no proguard=apk size 26,2mb dex size 2,7mb

So my gain was 0.2mb which is not worth it and my app crashes now. probably some classes were removed by r8. i dont want to bother to fix it.
Maybe they arent mature yet. thats why for now it makes no sense to use for me. I would like to suggest Xamarin team to show us results based on some complicated app instead of hello world app next time. So we will have better estimation before we jump into it and waste a lot of time.

CarouselView with previewing side elements (Here is how)

Functions can't be access in Android using Embeddinator-4000

I had followed the tutorial of getting started in android and use the Embeddinator-4000 to code in C# and build in Android Studio. I met some problems when calling the functions from C# class.

These are the codes

using System;
using System.Collections;
using System.Collections.Generic;

namespace CalculatorLibrary
{
public class TestingCalculator
{
    public TestingCalculator()
    {

    }
    public double Addfunction(double value1, double value2)
    {
        return value1 + value2;
    }

    public ArrayList ArrayListFunction(string first)
    {
        ArrayList al = new ArrayList();
        al.Add(first);

        return al;
    }

    public int Testing(int value1)
    {
        return value1;
    }

    public List<String> List(string first)
    {
        List<String> List = new List<string>();
        return List;
    }

    public IDictionary<int, object> GetProducts(int departmentID)
    {
        return new Dictionary<int, object>
            {
                { 1, new { Description = "Something" } },
                { 2, new { Description = "Whatever" } },
            };
    }

    public string[] StringArray(string arr)
    {
        string[] array;
        array = new string[3];
        return array;
    }

    public int[] intArray(int a)
    {
        int[] array;
        array = new int[3];
        return array;
    }

    public object objectm(object a)
    {
        object b = new object();
        return b;
    }

}
}

After I build the project it would output an aar file. Then I import the aar file into Android Studio.

package com.example.khortsuming.calculatorfinal;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import calculatorlibrary.calculatorlibrary.TestingCalculator;
import md54223a39312377e7a37c3fe640756f5f0.CalculatorActivity;

public class TestingActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_testing);

            TestingCalculator testingCal = new TestingCalculator();
            testingCal


}
}

When I want to call in Android Studio I only can access

It only passes Addfunction(double) and Testing(int) others could not be seen!

Project must be deployed before it can be started

I'm using Visual Studio 2013 and I'm trying to run the Xamarin store app for the Android project side and I receive the message:

The project XamarinStore.Droid needs to be deployed before it can be started.
Verify the project is select to be deployed in the Solution Configuration Manager.

I'm using the Xamarin Android Player for an emulator. Is this the recommended practice? All examples I see always shows "Mixed Platforms" when debugging.

deploying error

1>------ Deploy started: Project: TipCalculator, Configuration: Debug Any CPU ------
1>Error: Cancelled
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

on visual studio 2017


Core Media Examples?

I'm trying to process H.264 video from a raw UDP stream.
I have working swift code, however I am trying to use xamarin... there is no documentation, no examples, and I'm nearing my limit of banging my head against brick walls...
Does anybody know of any examples or further documentation on this, for example getting CMFormatDescription using FromH264ParameterSets, does it include the NAL header or not etc etc etc.....
Why is there not definition for CMSampleBuffer.Create..... the closest I can find is CMBlockBuffer.FromMemoryBlock, which is not the same underlying function....

Missing required Icons

Hi,

we have a problem uploading our app to the iOS app store for some days now. Actually it is a Forms App but hope it's still correct in this forum.
The app was working before but since we updated to Mojave and updated some of the Xamarin stuff there seems to be problem in building the asset catalog.
When trying to upload the ipa to the app store we get errors like:

ERROR ITMS-90023: "Missing required icon file. The bundle does not contain an app icon for iPad of exactly '76x76' pixels, in .png format for iOS versions >= 7.0."
ERROR ITMS-90023: "Missing required icon file. The bundle does not contain an app icon for iPad of exactly '167x167' pixels, in .png format for iOS versions supporting iPad Pro."
ERROR ITMS-90023: "Missing required icon file. The bundle does not contain an app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 7.0."

We already deleted bin/obj folders. Recreated the asset catalog. Checked the path in info.plist.
Everything seems to be fine.

I could figure out that the Assets.car that is created in copied to the ipa is empty or includes a default Xamarin Forms image.
I checked my build output and there are two entries related to the Assets.car:

    Copying file from '/Users/.../iOS/obj/iPhone/Release/actool/bundle/Assets.car' to '/Users/.../iOS/bin/iPhone/Release/....iOS.app/Assets.car'

and later:

    Copying file from '/Users/.../iOS/obj/iPhone/Release/Assets.car' to '/Users/.../iOS/bin/iPhone/Release/....iOS.app/Assets.car'

This makes actually no sense to me. The first copies the correct file to the bin path with the related assets. The second seems to copy an empty template file. Does that make sense to anyone? Is it possible to change the build process or is the actool building incorrect?

Any help is appreciated.

Chris.

How To Select Multiply Images And Send Them To Server in as A stream content ?

I need To Get Some Images Form Phone And Send Them to Server , I'm Trying To Select 1 Image and Send it To PHP Backend WebService as a Stream Content . Thanks

How to add images taken from camera to a Listview?

Hi everyone,
I would like to add images to a Listview?(or other layout) after each image is taken by the camera, something similar to the image above. How would I approach this?
I was be able to follow this example code from James MediaPlugin

I am unable to set the particular page in Carousel view

Hi, I am implemented the Carousel view using https://blog.xamarin.com/flip-through-items-with-xamarin-forms-carouselview/. And I am able to implement the Carousel,
**But My Problem I want to set the startup page while opening (I mean when page is loaded the carousel view should show 5th page or 4th index) **

Plugin Used
Xamarin.Forms.CarouselView (2.3.0-pre2)

What I tried
Case 1: I have used Data binding in xaml but it always showing first page or index of zero

Case 2: I have used Data binding from .cs file like CarouselView.ItemSource= Images; and CarouselView.Position=5; but is giving unhandled exception i.e, System.DivideByZeroException: Attempted to divide by zero.

Here is the Sample code

Case 1:

            <cv:CarouselView Position="{Binding Position, Mode=TwoWay}" ItemSelected="CarouselAlbumItems_ItemSelected" ItemsSource="{Binding AlbumItems}" x:Name="CarouselAlbumItems">
                <cv:CarouselView.ItemTemplate>
                    <DataTemplate>
                        <Grid  VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Image x:Name="imgAlbumItemName" Grid.RowSpan="2" Aspect="AspectFit" IsVisible="{Binding IsImage}" >
                                <Image.Source>
                                    <UriImageSource Uri="{Binding AlbumItemPath}" CacheValidity="14" />
                                </Image.Source>
                            </Image>
                        </Grid>
                    </DataTemplate>
                </cv:CarouselView.ItemTemplate>
            </cv:CarouselView>

Case 2:

    protected  override void OnAppearing()
    {
        base.OnAppearing();
        CarouselAlbumItems.ItemsSource = selectedItem.AlbumItems;
        CarouselAlbumItems.Position = position;            
    }

Xamarin Forms / Best way to share file on Android?

Hi! I have an app in production on the iOS side of the world. It includes the ability to share a local file (a simple zip archive I create of local app data). On the Android side of things, I see all over the forums that Android tightened security restrictions for file access sometime in late 2017 or early 2018, thus requiring the use of a FileProvider. I found some blogs on how to implement a FileProvider directly in Java and the manifest file, but I can't find anything for Xamarin Forms using an Android dependency... or I'm just entering the wrong search criteria! Any pointers would be greatly appreciated. I just want my Android users to be able to attach a zip or text file to an email or share it via another method using a Share Intent.

Thanks for any heads ups or links to already existing good documentation!

Capturing NFC intents in a class library

Hi folks,

I'm a C#/Windows developer porting an NFC/JavaCard library to Xamarin/Android and I'm stuck on the Activity/Intent concept as it applies to Android.NFC.

In Windows, I have an NFC library that is de-coupled from the UI and is responsible for interrogating the NFC reader, raising events (CardDetected, etc) and then allowing the application to communicate with the Javacard afterwards. The calling application has nothing to do with NFC directly.

In Android, it seems that you need to have an Activity that listens for particular intents (i.e. ActionTechDiscovered). However an Activity seems to be inherently a UI concept used by Android to activate applications/screens in response to events.
I have the goal of still keeping the NFC library/interface completely separate from the UI, so how can I capture the same Intents in a class library that doesn't subclass Activity? Or do I have to just make a fake Activity implementation, in which case how do I then connect that to the Intent dispatch system?

I would really appreciate any guidance on this. Thanks!
ko


Xamarin.Forms CardsView nuget package

Hi all) I've released new package for Xamarin.Forms (Something like Tinder's CardsView)
Maybe, someone will be interested in it

nuget.org/packages/CardsView/ -- nuget
github.com/AndreiMisiukevich/CardView -- source and samples

Navigating and Navigated events of webView not working on Android

I am using navigating and navigated events of webView in xamarin forms, these events working fine on ios but on android when page load these event does'nt work. I am using these events to add busy indicator

Parsing JSONString

Hi
I have trouble parsing my JSONstring retrived from my url.
below is my JSONString
php_resp = "{\"customer\":\"turkerler\",\"authority\":\"1023\",\"url\":\"http:\/\/gultekinteknik.com.tr\/file\/TURKERLER-LOGO1.png\",\"message\":\"Welcome\"}"

I need your urgent help guys! Thanks in advance.

How to get Absolute Layout and Relative Layout to Autosize to the size of their child element

The design requirement is to put a label and a button on the image. The Image is in a DataTemplate of ListView. I want to use Absolute Layout. But it expand way out of the child element (image). So how to make the absolute layout the same size of the image. On the other hand if I use relative layout it also expands out of the child element. But it takes less space than absolute layout. I know Absolute Layout and RelativeLayout are the best for this scenario. But they were leaving lots of empty space between list view items. Please help me out and explain how to use both of these layouts appropriately in order to size them according to their child elements. The code is as follows


<ListView.ItemTemplate>

                     <AbsoluteLayout >

                        <Image Source="BuyersCard.png" > </Image>

                       <Label Text="{Binding Name}" AbsoluteLayout.LayoutFlags="PositionProportional" AbsoluteLayout.LayoutBounds=".1,.2"></Label>

                            <Button Text="Contact" BorderColor="Red" AbsoluteLayout.LayoutFlags="PositionProportional" AbsoluteLayout.LayoutBounds=".7,.2"></Button>

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

    </ListView>

What do I have to do to use a native reference from a Nuget package?

I am pretty sure this used to work but I haven't tried in quite a while. Everything works well on simulator (probably because no AOT is done) but when compiling for a device I get an mtouch error because of "framework not found" on the Framework I am trying to reference.

I see here at the MTouch task that it is passing the full path:

--framework=/Users/borrrden/.nuget/packages/couchbase.lite.enterprise.support.ios/2.1.1-b0006/build/xamarinios/LiteCore.framework in the middle. But then later I see this:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -framework Foundation -framework UIKit -weak_framework LiteCore -weak_framework CFNetwork -Xlinker -rpath -Xlinker @executable_path /Users/borrrden/Development/couchbase-lite-net-ee/couchbase-lite-net/src/Couchbase.Lite.Tests.iOS/obj/iPhone/Debug/device-builds/iphone8.2-11.0/mtouch-cache/arm64/Couchbase.Lite.Support.iOS.dll.o /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.1.29/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonosgen-2.0.dylib /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.1.29/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libxamarin-debug.dylib -lz -liconv -gdwarf-2 -std=c99 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.1.29/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -Qunused-arguments -miphoneos-version-min=10.0 -arch arm64 -shared -read_only_relocs suppress -install_name @rpath/libCouchbase.Lite.Support.iOS.dll.dylib -fapplication-extension -o /Users/borrrden/Development/couchbase-lite-net-ee/couchbase-lite-net/src/Couchbase.Lite.Tests.iOS/obj/iPhone/Debug/device-builds/iphone8.2-11.0/mtouch-cache/arm64/libCouchbase.Lite.Support.iOS.dll.dylib -DDEBUG

ld: framework not found LiteCore
clang : error : linker command failed with exit code 1 (use -v to see invocation)

Even adding the native reference directly to the app does not help. This is an absolute showstopper for our Nuget package if it cannot be worked around. I've tried with the latest version (11.14), the previous (11.10) and the version shown here (11.8) all with the same results.

Full build log here -> https://gist.github.com/borrrden/5a58e51af5bec86689cbae4bf4d000f4

Viewing all 204402 articles
Browse latest View live


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