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

ILT0005 Gatekeeper exe exit code- 532462766

$
0
0

Hello Guys,

I am trying to deploy my Xamarin UWP app on mobile in release mode with ARM but it’s giving some issue in deployment. I am sending you screen sort. Please check the attached file and give some solution and suggestion so that I can solve these issue.

Thanks,


Prism absolute navigation problem

$
0
0

Hi,

i extended the INavigationService with the following method:

public static async Task NavigateAbsoluteAsync<TPage>(
            this INavigationService nav,
            NavigationParameters navigationParameters = null,
            bool useModalNavigation = false,
            bool animated = true
            )
            where TPage : Page
        {
            await nav.NavigateAsync(
            new Uri($"app:///{nameof(NavigationPage)}/{nameof(MainPage)}/{nameof(NavigationPage)}/{typeof(TPage).Name}",
            UriKind.Absolute), navigationParameters, useModalNavigation, animated
        );
        }

^This is for resetting the whole navigation stack. But i came up with this problem:

When i use this extension method on e.g. NavigateAbsoluteAsync<HelloPage>(), the NavigationPage settings of MainPage are showed in HelloPage?! So i cant explicit set the ToolbarIcons and the Title of HelloPage.

Any suggestions?

Thanks in advance

Xamarin Form Notification with FireBase

$
0
0

Hello Guys,

Can any one tell me about xamarin form notification with firebase. I read out many blogs and tutorials, they are using xamarin.android. But i want to implement notification with xamarin form.
Can any one help me out of it.

Thanks

Excel creation in xamarin.android and xamarin.iOS

$
0
0

Is there any free or opensource component to create excel worksheet for Xamarin.Android and Xamarin.iOS.? Below are the libs that I tried

  1. Microsoft Interop services but it is incompatible with xamarin.

  2. Open Xml SDK seems like its used for reading

MonoTouch garbage collector doesn't seem to collect non-reachable custom managed object. Bug?

$
0
0

Reposting a question from StackOverflow that hasnt received any responses there:

[For context, my question is a follow-up to the accepted answer on this SO post]

I'm trying to understand precisely when and why the MonoTouch GC fails to collect a cycle that spans managed and native objects.

The basic behavior as I understand:

  1. When there is a custom managed object derived from a framework class (such as UIViewController), it is free to be garbage collected if its native peer has a ref count of 1.
  2. Conversely, if the native object's ref count is more than 1, its managed peer is prevented from being collected.
  3. So if a cycle involves a native object referencing a custom managed object's native peer, then the GC will not collect the native peer (as per #.2 above) and therefore there will be a resource/memory leak.

I created a simple example to show a cycle where a native peer does NOT have another native object referencing it. I expected this type of cycle to be collected correctly by the GC due to #.1 above, but this doesnt happen. Any ideas whats going on?

Briefly, here is whats happening in the code:

  1. Create OuterVC, MidVC and InnerVC each extending UIViewController.
  2. OuterVC adds MidVC.View as a subview
  3. MidVC adds InnerVC.View as a subview
  4. InnerVC adds a button with a delegate referencing a field 'string foo' in InnerVC.
  5. Invoke MidVC.View.RemoveFromSuperview()
  6. I see that MidVC is disposed from the finalizer as expected.
  7. InnerVC is not disposed - this is the part I don't understand why, since there shouldn't be any native references to InnerVC's native object at this point. Given that the managed MidVC object is disposed, its native peer (which was the only reference to InnerVC's native object earlier) should be released.
  8. As a side note, commenting out the access to foo in the button's delegate results in InnerVC being disposed from the finalizer.
  9. I have tried invoking GC.Collect() and GC.WaitForPendingFinalizers() multiple times but that doesnt change the results.

At the moment, I'm more curious to know whats going on behind scenes rather than suggestions on how to solve the problem. I already know that breaking the cycle will resolve the issue (say by assigning foo to a local variable and using that in the delegate instead of the field to avoid baking-in 'this').

Any insight on why the GC doesnt collect InnerVC in this case? I dont see why/how the managed InnerVC object would be reachable from a root object and prevent collection.

Here is the code:

    public class OuterVC : UIViewController
    {
        private MidVC midVC;
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            midVC = new MidVC();
            View.AddSubview(midVC.View);

            Task.Factory.StartNew(() => {
                Thread.Sleep(5000);
                BeginInvokeOnMainThread(() => { midVC.View.RemoveFromSuperview(); midVC = null; });
            });
        }
    }

    public class MidVC : UIViewController
    {
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            View.AddSubview(new InnerVC().View);
        }

        protected override void Dispose(bool disposing)
        {
            Console.WriteLine("MidVC.Dispose invoked. disposing = " + disposing); //Always invoked disposing = False
            base.Dispose(disposing);
        }
    }

    public class InnerVC : UIViewController
    {
        string foo;

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            UIButton button = new UIButton();
            button.TouchUpInside += (object sender, System.EventArgs e) =>
            {
                //Commenting this invokes InnerVC's Dispose from finalizer
                var bar = foo;
            };
            View.AddSubview(button);
        }

        protected override void Dispose(bool disposing)
        {
            Console.WriteLine("InnerVC.Dispose invoked. disposing = " + disposing); //Only invoked if button's delegate does not access foo
            base.Dispose(disposing);
        }
    }

Endless Detecting installed packages

$
0
0

This is probably a device level issue, but Xamarin or Microsoft has to give us some kind of workaround. If Android Studio can still send new packages to this phone, then Visual Studio for Mac needs to be able to do it as well. Can't we skip 'detecting installed packages', or automatically trigger a delete of already installed packages based on some checkbox somewhere?

Has anyone at Xamarin got a device that is misbehaving in this way? I'm at my wits end.

Google Pixel. I've got an extra Pixel that I can publish to just fine. I don't think my wife wants me taking her nice pink phone all day, tho.

I've tried everything other threads have talked about. Alpha channel version of Visual Studio for Mac doesn't address this problem.

Build started 7/6/2017 1:32:12 AM.


Project "/Development/SomeCompany/SomeApp/Droid/SomeApp.Droid.csproj" (Install target(s)):

Target _SetLatestTargetFrameworkVersion:
Found Android SDK. API levels: 23, 25
Target _ValidateAndroidPackageProperties:
PackageName: com.SomeCompany.SomeApp
Target _GetProjectReferenceTargetFrameworkProperties:
__________________________________________________
Project "/Development/SomeCompany/SomeApp/Droid/SomeApp.Droid.csproj" is building "/Development/SomeCompany/SomeApp/SomeApp/SomeApp.csproj" (GetTargetFrameworkProperties target(s)):

Target ResolveProjectReferences:
__________________________________________________
Project "/Development/SomeCompany/SomeApp/Droid/SomeApp.Droid.csproj" is building "/Development/SomeCompany/SomeApp/SomeApp/SomeApp.csproj" (GetTargetPath target(s)):

Target BclBuildValidateNugetPackageReferences:
    /Development/SomeCompany/SomeApp/packages/Microsoft.Bcl.Build.1.0.21/build/Microsoft.Bcl.Build.targets(243,5): warning : All projects referencing SomeApp.csproj must install nuget package Microsoft.Bcl.Build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317569.
Done building target "BclBuildValidateNugetPackageReferences" in project "SomeApp.csproj".

Done building project "SomeApp.csproj".
__________________________________________________
Project "/Development/SomeCompany/SomeApp/Droid/SomeApp.Droid.csproj" is building "/Development/SomeCompany/SomeApp/SomeApp/SomeApp.csproj" (GetNativeManifest target(s)):

Target _GenerateAndroidAssetsDir:
Skipping target "_GenerateAndroidAssetsDir" because it has no outputs.
Target _ResolveMonoAndroidSdks:
MonoAndroid Tools: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/
MonoAndroid Binaries: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/
Android Platform API level: 26
TargetFrameworkVersion: v7.1
Android NDK: /Users/ed/Library/Developer/Xamarin/android-ndk/android-ndk-r14b/
Android SDK: /Users/ed/Library/Developer/Xamarin/android-sdk-macosx/
Android SDK Build Tools: /Users/ed/Library/Developer/Xamarin/android-sdk-macosx/build-tools/25.0.3/
Java SDK: /usr/
Target _GetPrimaryCpuAbi:
_PrimaryCpuAbi=armeabi-v7a
Target _CheckInstantRunCondition:
Dex Fast Deployment Enabled: False
Target _SetupInstantRun:
Android Java Class for Fast Deployment:
Target _SetupApplicationJavaClass:
Application Java class: android.app.Application
Target _ResolveLibraryProjectImports:
Skipping target "_ResolveLibraryProjectImports" because all output files are up-to-date with respect to the input files.
Target _BuildLibraryImportsCache:
Skipping target "_BuildLibraryImportsCache" because all output files are up-to-date with respect to the input files.
Target _BuildAdditionalResourcesCache:
Skipping target "_BuildAdditionalResourcesCache" because all output files are up-to-date with respect to the input files.
Target _CreateAdditionalResourceCache:
Skipping target "_CreateAdditionalResourceCache" because all output files are up-to-date with respect to the input files.
Target _GenerateAndroidResourceDir:
Skipping target "_GenerateAndroidResourceDir" because all output files are up-to-date with respect to the input files.
Target _DefineBuildTargetAbis:
Build target ABI: arm64-v8a;armeabi;armeabi-v7a;x86;x86_64
Target VectorDrawableCheckBuildToolsVersionTask:
Checking Android SDK Build-tools version...
Selected Android SDK Build Tools Path: /Users/ed/Library/Developer/Xamarin/android-sdk-macosx/build-tools/25.0.3/
Selected Android SDK Build Tools Version: 25.0.3
Android SDK Build Tools Version: 25.0.3 meets minimum requirements for Vector Drawables. OK.
Finished Checking Android SDK Build-tools version.
Target _UpdateAndroidResgen:
Skipping target "_UpdateAndroidResgen" because all output files are up-to-date with respect to the input files.
Target _GenerateJavaDesignerForComponent:
Skipping target "_GenerateJavaDesignerForComponent" because all output files are up-to-date with respect to the input files.
Target GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target _CoreXamlG:
Skipping target "_CoreXamlG" because it has no inputs.
Target CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
Target XamlC:
Compiling Xaml

Assembly: obj/Debug/SomeApp.Droid.dll
ReferencePath:  (skipped - too long)

No compiled resources. Skipping writing assembly.

Target GetCopyToOutputDirectoryItems:
__________________________________________________
Project "/Development/SomeCompany/SomeApp/Droid/SomeApp.Droid.csproj" is building "/Development/SomeCompany/SomeApp/SomeApp/SomeApp.csproj" (GetCopyToOutputDirectoryItems target(s)):

Target CopyFilesToOutputDirectory:
SomeApp.Droid -> /Development/SomeCompany/SomeApp/Droid/bin/Debug/SomeApp.Droid.dll
Copying file from "obj/Debug/SomeApp.Droid.pdb" to "bin/Debug/SomeApp.Droid.pdb".
Target _CollectConfigFiles:
Skipping target "_CollectConfigFiles" because all output files are up-to-date with respect to the input files.
Target _CopyConfigFiles:
Skipping target "_CopyConfigFiles" because it has no outputs.
Target _CopyIntermediateAssemblies:
Skipping target "_CopyIntermediateAssemblies" because all output files are up-to-date with respect to the input files.
Target _ConvertPdbFiles:
Skipping target "_ConvertPdbFiles" because all output files are up-to-date with respect to the input files.
Target _CopyMdbFiles:
Skipping target "_CopyMdbFiles" because all output files are up-to-date with respect to the input files.
Target _StripEmbeddedLibraries:
Skipping target "_StripEmbeddedLibraries" because all output files are up-to-date with respect to the input files.
Target _LinkAssembliesNoShrink:
Touching "obj/Debug/link.flag".
Target _GenerateJavaStubs:
Processing: obj/Debug/res/drawable/roundedcorners.xml
Processing: obj/Debug/res/values/styles.xml
Processing: obj/Debug/res/values-v21/styles.xml
Processing: obj/Debug/res/xml/file_paths.xml
Target _AddStaticResources:
Skipping target "_AddStaticResources" because all output files are up-to-date with respect to the input files.
Target _GeneratePackageManagerJava:
Skipping target "_GeneratePackageManagerJava" because all output files are up-to-date with respect to the input files.
Target _CreateBaseApk:
Skipping target "_CreateBaseApk" because all output files are up-to-date with respect to the input files.
Target _CompileJava:
Skipping target "_CompileJava" because all output files are up-to-date with respect to the input files.
Target _CompileToDalvikWithDx:
Skipping target "_CompileToDalvikWithDx" because all output files are up-to-date with respect to the input files.
Target _CopyPackage:
Deleting file "bin/Debug/com.SomeCompany.SomeApp.apk".
Copying file from "/Development/SomeCompany/SomeApp/Droid/obj/Debug/android/bin/com.SomeCompany.SomeApp.apk" to "bin/Debug/com.SomeCompany.SomeApp.apk".
Target _Sign:
/usr/bin/jarsigner -keystore /Development/SomeCompany/SomeApp/Droid/SomeApp.keystore -storepass SmallHarvey -keypass SmallHarvey -digestalg SHA1 -sigalg md5withRSA -signedjar bin/Debug//com.SomeCompany.SomeApp-Signed-Unaligned.apk /Development/SomeCompany/SomeApp/Droid/obj/Debug/android/bin/com.SomeCompany.SomeApp.apk SomeApp
jar signed.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2292,2): warning : No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2043-06-16) or after any future revocation date.
Signed android package 'bin/Debug/com.SomeCompany.SomeApp-Signed.apk'
Deleting file "/Development/SomeCompany/SomeApp/Droid/bin/Debug/com.SomeCompany.SomeApp-Signed.apk".
Unaligned android package '/Development/SomeCompany/SomeApp/Droid/bin/Debug/com.SomeCompany.SomeApp-Signed-Unaligned.apk'
/Users/ed/Library/Developer/Xamarin/android-sdk-macosx/build-tools/25.0.3/zipalign 4 "/Development/SomeCompany/SomeApp/Droid/bin/Debug/com.SomeCompany.SomeApp-Signed-Unaligned.apk" "bin/Debug//com.SomeCompany.SomeApp-Signed.apk"
Deleting file "/Development/SomeCompany/SomeApp/Droid/bin/Debug/com.SomeCompany.SomeApp-Signed-Unaligned.apk".
Done building target "_Sign" in project "SomeApp.Droid.csproj".
Target _Upload:
Detecting installed packages...

Detecting installed packages

And there it sits. For hours. I'm off to bed, but I'll leave it Detecting. Just in case.

How do I downgrade to a specific version?

$
0
0

Hello,

So seeing iOS 11 is in Beta, I've decided to test one of the app's my company has to make sure it still works somewhat on iOS 11. And behold, it does not. After some investigating, it appears to be the build server which runs a quite old version of Xamarin, Xamarin 4.1.2.18. We haven't been able to upgrade it sadly due to a plugin we're using that makes another crash in higher versions of Xamarin we haven't been able to figure out.

Anyhow, things aside. I've downgraded my Windows pc to 4.1.2.18 using the .msi file for it. Now I cannot connect to the MAC so I can debug and try to locate the error.

Can someone help me figure out what/where the files are I gotta download on my mac to downgrade the XCode & Xamarin Studio on the Mac so I can connect to it again?

Kinds regards,
Mikkel Larsen

Is there any equivalent element to android's Recyclerview in xamarine forms?

$
0
0

I want to create a ListView with custom elelments, with using platforms specific coding can i do that?I want to create a view something like below image


纳瓦拉公立大学毕/业证|成绩单制作/微信qq596 403 686操作UPNA学历认/证〔纳瓦拉公立大学本科/硕士成绩单〕哪里办理UPNA教育部认/证

$
0
0

纳瓦拉公立大学毕/业证|成绩单制作/微信qq596 403 686操作UPNA学历认/证〔纳瓦拉公立大学本科/硕士成绩单〕哪里办理UPNA教育部认/证

Visual studio mobile center not showing actual exception

$
0
0

Hi All,

Did not find a category for visual studio mobile center so I am asking this question in general.

As xamarin.insight does not allowed me to create a new app as it needs a subscription, I moved to visual studio mobile center for crash reprots.
I am testing crashes with my custom exception as below,

throw new Exception("My new exception");

Nut when I see exception in crash reports, its showing me like this,

<.ctor>b__0_0 (System.Object s, System.EventArgs a)
2
IButtonController.SendClicked ()
3
ButtonRenderer+ButtonClickListener.OnClick (Android.Views.View v)
4
View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v)
5
(wrapper dynamic-method) System.Object:bd6b43b8-5eb1-4bbd-82a5-0d64c03a7078 (intptr,intptr,intptr)

So, I am not getting actual error generated in my xamarin.forms app. Am I doing anything wrong?

Thanks.

MR.Gestures handles ALL touch gestures

$
0
0

With MR.Gestures you can handle the Tapping, Tapped, DoupleTapped, LongPressing, LongPressed, Panning, Panned, Swiped, Pinching, Pinched, Rotating and Rotated gestures on all layouts, cells, views and on the ContentPage.

The code can be as easy as

    var box1 = new MR.Gestures.BoxView { Color = Color.Red };
    box1.LongPressed += (s, e) => { Console.WriteLine("Code: Red LongPressed"); };

Or in XAML

<br /><mr:ContentView xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:mr="clr-namespace:MR.Gestures;assembly=MR.Gestures"
             x:Class="GestureSample.Views.ContentViewXaml"

             Padding="50"

             TappingCommand="{Binding TappingCommand}"
             TappedCommand="{Binding TappedCommand}"
             DoubleTappedCommand="{Binding DoubleTappedCommand}"
             LongPressingCommand="{Binding LongPressingCommand}"
             LongPressedCommand="{Binding LongPressedCommand}"
             PanningCommand="{Binding PanningCommand}"
             PannedCommand="{Binding PannedCommand}"
             SwipedCommand="{Binding SwipedCommand}"
             PinchingCommand="{Binding PinchingCommand}"
             PinchedCommand="{Binding PinchedCommand}"
             RotatingCommand="{Binding RotatingCommand}"
             RotatedCommand="{Binding RotatedCommand}"
             >

MR.Gestures is available via NuGet. More info on http://www.mrgestures.com/.

There is also a sample app available to download from https://github.com/MichaelRumpler/GestureSample. The GestureSample demonstrates how to use all the gestures with all Xamarin.Forms elements.

Xamarin Auth Native Login for Google

$
0
0

I achieved Native Login(Google) for Android but on iOS i get this, Invalid URI: The format of the URI could not be determined, when i use the iOS scheme provided by Google. Also i mention the same in info.plist as provided here : https://github.com/xamarin/Xamarin.Auth/tree/master/docs

if i try to give custom scheme to redirectUrl then again i get an error that says Custom Schemes cannot have authority.

Can someone please help me?

how to recogbize Samsung Galaxy S5 Replica

Keyboard hides input in Xamarin Forms

$
0
0

I'm facing the problem that I have entrys at the bottom of the screen, which when the keyboard pops ups it completely hides the entrys while the user is typing the values.

I found this link on the fix in iOS:

http://forums.xamarin.com/discussion/15067/keyboard-hides-inputs

Anyone have an idea for the best way to resolve this via forms? Renderer?

Thanks in advance!

Android: Could not load assembly 'xxx' during startup registration

$
0
0

I'm trying Syncfusion (charts) and in the Android project after deploying I get

Assembly Loader probing location: 'Syncfusion.SfAutocomplete.XForms.Android'.
Could not load assembly 'Syncfusion.SfAutocomplete.XForms.Android' during startup registration.
This might be due to an invalid debug instalation.
A common cause is to 'adb install' the app directly instead of doing from the IDE.

I readded the reference but that didn't help. Furthermore I tried to disable fast deployment without success. How can I find out what the cause is? Building the app works fine.


Issues with rendering in Android ListView in Visual Studio Xamarin

$
0
0

Hello to all programmers. I try to create simple chat. The first chatter's messages should be in white square with rounded corners, the second chatter's messages should be in blue square with rounded corners and with some icon. So I decided to use listview and adapter for this task. In adapter I use simple set of data {bool type, sting message, DateTime date}. So Adapter Code is
class ChatMessagesViewHolder : Java.Lang.Object
{
internal TextView chatMessageView;
public void initialize(View view){}
}
public class ChatMessagesAdapter : BaseAdapter
{
Activity _context;
List _dataList;

    public ChatMessagesAdapter(Activity context, List<MessageData> dataList)
    {
        _context = context;
        _dataList = dataList;
    }
    public override View GetView(int position, View convertView, ViewGroup parent)
    {
        ChatMessagesViewHolder chatMessagesViewHolderClass;
        View view;
        view = convertView;
        int layout = _dataList[position]._type == 0 ? Resource.Layout.MessageLitsUserItem:Resource.Layout.MessageListWorkerItem;
        Typeface openSansRegular = Typeface.CreateFromAsset(_context.Assets, "fonts/OpenSans-Regular.ttf");
        if (view == null)
        {
            view = _context.LayoutInflater.Inflate(layout, parent, false);
            chatMessagesViewHolderClass = new ChatMessagesViewHolder();
            chatMessagesViewHolderClass.chatMessageView = view.FindViewById<TextView>(Resource.Id.messageText);
            chatMessagesViewHolderClass.initialize(view);
            view.Tag = chatMessagesViewHolderClass;
        }
        else
        {
            chatMessagesViewHolderClass = (ChatMessagesViewHolder)view.Tag;
        }
        chatMessagesViewHolderClass.chatMessageView.Typeface = openSansRegular;
        chatMessagesViewHolderClass.chatMessageView.Text = _dataList[position]._date.ToString()+"\n"+ _dataList[position]._message;
        return view;
    }
    public void Add(MessageData messageData)
    {
        _dataList.Add(messageData);
    }
}

In Activity I fill Adapter with test information that way - message from 1-st chatter, message from 2-nd chatter. It repeats 10 times.
public class ChatActivity : Activity{
ListView chatList;
ChatMessagesAdapter chatAdapter;

    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);
        SetContentView(Resource.Layout.ChatLayout);
        List<MessageData> dataList = new List<MessageData>();
        for (int i = 0; i < 20; i++)
        {
            string message = "Test message from chatter "+(i%2).ToString();
            dataList.Add(new MessageData(i % 2, message, DateTime.Now));
        }
        chatAdapter = new ChatMessagesAdapter(this, dataList);
        chatList.Adapter = chatAdapter;
    }
}

When I run app (in Visual studio emulator for android) first rendering of list is correct, but when I scroll list up/down, the layouts of ListView mixes - 1-st chatter's message sometimes get 2-nd chatter's template (with blue square and icon), 2-nd chatter's message sometimes get 1-st chatter's template (with white square and no icon).
For Example
Example
Can anybody help me with this issue? Any help will be appreciated.

Failed get data from web service?

$
0
0

I have a school project to make android application with Xamarin. In this application I'm using web service, so I need to get the data from web service and show them with recycler adapter in Xamarin.Android.

I tried use postman to get the data from web service and it works well. The problem is, I can't show it in my application.

Here's my code to call the data:

private async void LoadLocationData()
{
    mProgressDialog = ProgressDialog.Show(this, "Please wait...", "Getting location data...", true);
    this.mListViewLocations = this.FindViewById<RecyclerView>(Resource.Id.recyclerViewLocations);
    this.mLocations = new List<LocationViewModel>();
    this.mLocations = await mLocationDataService.GetAll();
    if (mLocations != null)
    {
        this.mLocationsAdapter = new LocationsRecycleAdapter(this.mLocations, this);
        this.mLocationsAdapter.ItemClick += OnLocationClicked;
        this.mListViewLocations.SetAdapter(this.mLocationsAdapter);
    }
    mProgressDialog.Hide();
}

and here's my data service:

public async Task<List<LocationViewModel>> GetAll()
    {
        using (var client = new HttpClient { Timeout = TimeSpan.FromSeconds(30) })
        {
            try
            {
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                var builder = new UriBuilder(new Uri(UrlHelper.Locations_Url + @"/getLocations"));
                var response = await client.GetAsync(builder.Uri);
                if (!response.IsSuccessStatusCode)
                {
                    return null;
                }
                var byteResult = await response.Content.ReadAsByteArrayAsync();
                var result = Encoding.UTF8.GetString(byteResult, 0, byteResult.Length);

                var modelResult = JsonConvert.DeserializeObject<List<LocationViewModel>>(result);
                return modelResult;
            }
            catch (Exception ex)
            {

                return null;
            }
        }
    }

I don't know what things that make the data won't showing off..
Need your help guyss :(

Thanks in advance :)

How to approach crashes without any .Net stacktrace or other information in logs

$
0
0

Once in awhile I get a real test device that randomly crashes our (Android) App, without any notice or usable logging.
The 'output verbosity' is set to diagnostics and using the latest Xamarin versions and still I do not get any usable information.

I'm looking for any suggestions/approaches how to handle this, because this crashes are a current a mystery to us.
(I added a full log of a random crash in the first view in our App, without little user interaction)

Most of the time you get a .Net stacktrace in the logging when the App crashes, but currently I'm having randomly crashes without any stacktrace but only some information about bits and bytes that really don't make any sense.
example:
_07-05 16:16:41.045 D/Launcher.LauncherProvider(15913): 11683562 - initializeMaxScreenId(): 1
07-05 16:16:41.063 I/DEBUG ( 3020): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-05 16:16:41.063 I/DEBUG ( 3020): Build fingerprint: 'Android/full_x7k/x7k:5.1.1/LMY49J/5449:user/release-keys'
07-05 16:16:41.063 I/DEBUG ( 3020): Revision: '82947'
07-05 16:16:41.063 I/DEBUG ( 3020): ABI: 'arm'
07-05 16:16:41.063 I/DEBUG ( 3020): pid: 15850, tid: 15850, name: grep >>> grep <<<
07-05 16:16:41.064 I/DEBUG ( 3020): signal 13 (SIGPIPE), code 0 (SI_USER), fault addr --------
07-05 16:16:41.067 W/NativeCrashListener(13660): Couldn't find ProcessRecord for pid 15850
07-05 16:16:41.080 I/art (15403): Background sticky concurrent mark sweep GC freed 4486(369KB) AllocSpace objects, 0(0B) LOS objects, 4% free, 8MB/9MB, paused 198.791ms total 226.196ms
07-05 16:16:41.124 I/DEBUG ( 3020): r0 ffffffe0 r1 b89ed630 r2 00000006 r3 44000000
07-05 16:16:41.124 E/DEBUG ( 3020): AM write failure (32 / Broken pipe)
07-05 16:16:41.124 I/DEBUG ( 3020): r4 b6f90438 r5 b89ed630 r6 00000006 r7 00000004
07-05 16:16:41.124 I/DEBUG ( 3020): r8 b6df8000 r9 b6f47a8d sl b6f937bc fp b6df8024
07-05 16:16:41.124 I/DEBUG ( 3020): ip 00000000 sp becf29c0 lr b6f6b117 pc b6f73aec cpsr 000d0010
07-05 16:16:41.125 I/DEBUG ( 3020):
07-05 16:16:41.125 I/DEBUG ( 3020): backtrace:
07-05 16:16:41.125 I/DEBUG ( 3020): #00 pc 0003daec /system/lib/libc.so (write+12)
07-05 16:16:41.125 I/DEBUG ( 3020): #01 pc 00035115 /system/lib/libc.so (__sflush+48)
07-05 16:16:41.125 I/DEBUG ( 3020): #02 pc 00024cd9 /system/lib/libc.so (fclose+40)
07-05 16:16:41.125 I/DEBUG ( 3020): #03 pc 00011aa1 /system/lib/libc.so (_ZL16malloc_fini_implv+20)
07-05 16:16:41.125 I/DEBUG ( 3020): #04 pc 000175a7 /system/lib/libc.so (pthread_once+90)
07-05 16:16:41.125 I/DEBUG ( 3020): #05 pc 00012347 /system/lib/libc.so (malloc_debug_fini+10)
07-05 16:16:41.125 I/DEBUG ( 3020): #06 pc 0003b291 /system/lib/libc.so (__cxa_finalize+132)
07-05 16:16:41.125 I/DEBUG ( 3020): #07 pc 000119bf /system/lib/libc.so (exit+6)
07-05 16:16:41.125 I/DEBUG ( 3020): #08 pc 0001674f /system/bin/toolbox
07-05 16:16:41.125 I/DEBUG ( 3020): #09 pc 00005aeb /system/bin/toolbox
07-05 16:16:41.125 I/DEBUG ( 3020): #10 pc 000123a1 /system/lib/libc.so (__libc_init+44)
07-05 16:16:41.125 I/DEBUG ( 3020): #11 pc 00005b70 /system/bin/toolbox
07-05 16:16:41.172 I/DEBUG ( 3020):
07-05 16:16:41.172 I/DEBUG ( 3020): Tombstone written to: /data/tombstones/tombstone_03_

[VS4Mac] The ASP.NET extension is not installed

$
0
0

Since the latest update of visual studio for mac (7.0.1), I cannot load my asp.net projects anymore. There is a warning saying "The ASP.NET extension is not installed"!
Then in the extensions, the extension is installed but it requires MonoDevelop.AspNet v7.0.1 to run. Any ideas on how to solve that? This is pretty urgent, I cannot debug my apps anymore!

Watch App size: Size Limit Exceeded

$
0
0

Hello,

I'm about to publish the last version of an app with a very light apple watch version to test flight and I'm facing a problem of size package:

ERROR ITMS-90389: "Size Limit Exceeded. The size of watch application has exceeded the 50 MB size limit" :
https://www.evernote.com/l/AMknvW4bneJJm6lxIsAO9r81kbstwaOeQykB/image.png

It is normal the watch app size is 103,7 Mo
https://www.evernote.com/l/AMl2A7Y14PFA5aaN_vMt2_kZ1BBL0_BL964B/image.png

But my iOS app has a size of 54,2 Mo
https://www.evernote.com/l/AMmgJYfSoThEtb7L0ucFwcHEV2vl9KxM4XUB/image.png

The iOS Build settings for my iOS app are: link framework SDKs Only with LLVM compiling:
https://www.dropbox.com/s/488wals4mna35nz/Screenshot 2016-10-05 17.36.41.png?dl=0

For the watch App and the watch App Extension, the same: link framework SDKs Only with LLVM compiling:
https://www.dropbox.com/s/r8463is4hfd70vi/Screenshot 2016-10-05 17.38.04.png?dl=0
https://www.dropbox.com/s/7uve027cfyzqfy3/Screenshot 2016-10-05 17.38.29.png?dl=0

So my question is:

Why the watch app which is very very light (in terms of weight and files) has the double in size package than the iOS App?

Something wrong with my config ? That's the config we are using for all our apps in production and we have the control of the size of our apps.

Is this something that still need to be optimised for the stable version of xamarin watch OS?

Xamarin, have you experienced that issue?

thank you for the feedback

Viewing all 204402 articles
Browse latest View live


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