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

Xamarin Live Player - Failed to debug your app.

$
0
0

So I've tried to debug the application in my phone. And everything seem well. But then I got this error:
Start CloudDMS.DemoMobileApp.Android, Samsung SM-A300FU Player, .
Attempting connection to debug address: 192.168.64.101:37847.
Connected to: 192.168.64.101:37847.
Deploying D:\CloudDMS Work\CloudDMS.DemoMobileApp\CloudDMS.DemoMobileApp\CloudDMS.DemoMobileApp.Android\CloudDMS.DemoMobileApp.Android.csproj...
Got device info: Samsung SM-A300FU Player (Android) @ 192.168.64.101:37847
Synchronizing files...
Building and running...
Built with 3 messages.
D:\CloudDMS Work\CloudDMS.DemoMobileApp\CloudDMS.DemoMobileApp\CloudDMS.DemoMobileApp\Interfaces\Notifications.cs(1,1): error: 'Resource.Drawable' does not contain a definition for 'icon'
D:\CloudDMS Work\CloudDMS.DemoMobileApp\CloudDMS.DemoMobileApp\CloudDMS.DemoMobileApp\Providers\contentProvider.cs(1,1): error: 'Resource.Drawable' does not contain a definition for 'icon'
D:\CloudDMS Work\CloudDMS.DemoMobileApp\CloudDMS.DemoMobileApp\CloudDMS.DemoMobileApp\Providers\ProjectProvider.cs(1,1): error: 'Resource.Drawable' does not contain a definition for 'icon'
Failed to debug your app.

Any solutions or ideas why do I get this error?


MvvmCross Page Navigation Issue

$
0
0

I'm developing the app using MvvmCross. I need to clear all the back stack page & show the first page.
for ex: MainModel page--> navigationService.Navigate-->
SecondViewModel button click--->navigationService.Navigate
ThirdViewModel button click--->navigationService.close(this)

not clear the SecondViewModel. can you please anyone tell me how to clear & navigate to MainModel.

Could not load assembly 'Zxing.portable'

$
0
0

Whenever I try to deploy my android project get the same error every time.
Error : "Could not load assembly 'zxing.portable, Version=0.16.2.0, Culture=neutral, PublicKeyToken=830ae994e36ac27d'. Perhaps it doesn't exist in the
Mono for Android profile?"

How can we get Mobile No. of Android Device in xamarin forms

$
0
0

Can we get Mobile No. of Android Device in Xamarin forms
This code didn't worked
Android.Telephony.TelephonyManager tMgr = (Android.Telephony.TelephonyManager)Forms.Context.GetSystemService(Android.Content.Context.TelephonyService);
return tMgr.Line1Number;
this code return "";

Images on top of background images are not selectable in Android Talk back accessibility mode

$
0
0

I have a page with an image set as a background. On this page I have images with tap gesture recognizers resting on top of the background image.

On Android in accessibility mode when ever I try to select these images instead of the images gaining talk back focus the background image gains focus.

I've tried having the talk back service ignore the background image by writing a custom renderer for the background image an setting

Control.ImportantForAccessibility = ImportantForAccessibility.No;

but that doesn't seem to change the behavior of talk back at all. Is there a way to access the talk back service directly from a custom renderer so that I can either manually turn it off for the UI element or at least capture the event where talk back gives the background image focus?

Xamarin.LiveReload version mismatch? 4.0 pre-release nuget with 3.27 VS extension

$
0
0

If I upgrade the NuGet for Xamarin.LiveReload to the 4.0-Dev prerelease the solution can't build because the VS2017 Extension requires 0.3.27
So how does one try out the pre-release Nuget for fixes?

I don't see a matching 4.0 pre-release version of the extension on the marketplace page.
Is there a super-secret-squirrel page for the pre-release extension?

How to open app if i pressed power button 3 times?

$
0
0

Hi,
I have a requirement where when a user press power button 3 times. Mobile should open our app start an activity.
Is it possible for android and IOS?

Regards and thanks.

No constructor found for Xamarin.Forms.Platform.Android.ScrollViewRenderer::.ctor

$
0
0

On Android 4.4.2 sometimes I get:
Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ScrollViewRenderer from native handle 3870001d ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ScrollViewRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown. Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.

These seems to happen only after an update to the app.
What is interesting is that seems to be happening when we are trying to destroy a view:

at md5530bd51e982e6e7b340b73e88efe666e.ScrollViewRenderer.n_onDetachedFromWindow(Native Method) at md5530bd51e982e6e7b340b73e88efe666e.ScrollViewRenderer.onDetachedFromWindow(ScrollViewRenderer.java:80) at android.view.View.dispatchDetachedFromWindow(View.java:12787) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2706) at android.view.ViewGroup.removeAllViewsInLayout(ViewGroup.java:4254) at android.view.ViewGroup.removeAllViews(ViewGroup.java:4186) at md5fb436084bbd4c8599b985da0bb24bd53.XFormsApplicationDroid.n_onDestroy(Native Method) at md5fb436084bbd4c8599b985da0bb24bd53.XFormsApplicationDroid.onDestroy(XFormsApplicationDroid.java:33) at android.app.Activity.performDestroy(Activity.java:5436) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1119) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3676) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3707) at android.app.ActivityThread.access$1400(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1374) ...


How we can do Social Login using Facebook, Instagram, LinkedIn, google+ ?

$
0
0

I want to do Social Login through Facebook, Instagram, LinkedIn, google+ from my app.but i am not able to do it.kindly suggest me..

System.ArgumentException crash in custom UWP FrameRenderer

$
0
0

Hi,

I'm using a custom FrameRenderer in my UWP project to style frames (corner radius and color). When I scroll a bit back and forth, the app crashes with a System.ArgumentException: Value does not fall within the expected range. It's the call to base.OnElementChanged(e); that causes it.

I can of course put that in a try/catch, but then some items in my list will disappear. They return on orientation change of the device, but not after a normal refresh of the FlowListView I'm using.

Any ideas? I'm on Xamarin Forms 2.5.1.444934.

Here's the custom FrameRenderer:

class ExtendedFrameRenderer : FrameRenderer
{
    protected override void OnElementChanged(ElementChangedEventArgs<Frame> e)
    {
        base.OnElementChanged(e);

        if (Control != null)
        {
            var frame = e.NewElement;
            double cornerRadius = frame.CornerRadius;

            Windows.UI.Color frameBG = Windows.UI.Color.FromArgb(
                (byte)(frame.BackgroundColor.A * 255),
                (byte)(frame.BackgroundColor.R * 255),
                (byte)(frame.BackgroundColor.G * 255),
                (byte)(frame.BackgroundColor.B * 255));

            Control.CornerRadius = new Windows.UI.Xaml.CornerRadius(cornerRadius);
            Control.Background = new SolidColorBrush(frameBG);
            frame.BackgroundColor = Xamarin.Forms.Color.Transparent;
        }
    }
}

Full error stack:

System.ArgumentException
  HResult=0x80070057
  Message=Value does not fall within the expected range.
  Source=Windows
  StackTrace:
   at Windows.UI.Xaml.Controls.Border.put_Child(UIElement value)
   at Xamarin.Forms.Platform.UWP.FrameRenderer.PackChild()
   at Xamarin.Forms.Platform.UWP.FrameRenderer.OnElementChanged(ElementChangedEventArgs`1 e)
   at MyApp.UWP.Helpers.ExtendedFrameRenderer.OnElementChanged(ElementChangedEventArgs`1 e) in C:\Users\me\Source\Workspaces\MySol\MyApp\MyApp.UWP\Helpers\ExtendedFrameRenderer.cs:line 26
   at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetElement(VisualElement element)
   at Xamarin.Forms.Platform.UWP.Platform.CreateRenderer(VisualElement element)
   at Xamarin.Forms.Platform.UWP.VisualElementPackager.OnChildAdded(Object sender, ElementEventArgs e)
   at Xamarin.Forms.Platform.UWP.VisualElementPackager.Load()
   at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetElement(VisualElement element)
   at Xamarin.Forms.Platform.UWP.Platform.CreateRenderer(VisualElement element)
   at Xamarin.Forms.Platform.UWP.VisualElementPackager.OnChildAdded(Object sender, ElementEventArgs e)
   at Xamarin.Forms.Platform.UWP.VisualElementPackager.Load()
   at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetElement(VisualElement element)
   at Xamarin.Forms.Platform.UWP.Platform.CreateRenderer(VisualElement element)
   at Xamarin.Forms.Platform.UWP.ViewToRendererConverter.WrapperControl..ctor(View view)
   at Xamarin.Forms.Platform.UWP.ViewToRendererConverter.Convert(Object value, Type targetType, Object parameter, String language)

Run .xaml.cs file during runtime

$
0
0

Hello!
My app uses connection with server, which allows users to download certain files from it. Downloading, managing etc. works well, but how to open them when the app is opened? Just like we have some .xaml and .xaml.cs files that come with app and opening them is not a problem, I want to do the same with files I downloaded,
e.g. App came with HelloWorld.xaml and HelloWorld.xaml.cs files, I can open them easily.
Now I download file HelloWorld2.xaml.cs and want to use it the same time as HelloWorld.xaml (as it has nothing, because whole UI is ,,made'' in .xaml.cs file)
If something is unclear, just ask ;)

Picker Selection Event

$
0
0

Hi,

I have a problem with xamarin form picker.
I need to have an event when the "done" (ios) or "ok" (android) button was clicked. Cause i want to open a popup when user select an item.
I only see a SelectedIndexChanged how is fire each time user stop scrolling (on iOS, can't see on android).

Anyone know how I can put an event when picker is closed ?

Is it possible to share and install the app on other device using APK file generated in debug mode?

$
0
0

I am new to Xamarin development and developing an app in Xamarin.forms using Visual Studio 2017 on Mac. I am testing my app using USB-Debugging/Genymotion on devices and also getting generated APK file at location: XYZ.Android/bin/debug/com.XYZ.XYZ-Signed.apk

The app crashes when I am trying to install it on other devices using the generated APK file at the above-mentioned location right after the Splash screen disappears?

In error reporting I am getting the error: "Unable to find application mono.android.platform.api level 27 or xamarin.android.platform" on Mi5a device

I have tried the solutions at URLs:
https://stackoverflow.com/questions/42243195/unable-to-find-application-mono-android-platform-apilevel-24-or-xamarin-android
https://stackoverflow.com/questions/37063507/unable-to-find-application-mono-android-platform-apilevel-23-or-xamarin-android?rq=1
https://stackoverflow.com/questions/48781713/xamarin-android-app-crashing?rq=1

So is it possible to share and install the app on other device using APK file generated in debug mode OR I need to create APK file in the release mode?

code: https://www.dropbox.com/s/525zce3ysoi56j6/FlashControl.zip?dl=0

Please Assist me for the right settings.

Thanks in advance.

BottomBar dll

$
0
0

I have integrated Bottom bar dll to shared code. I couldn't change bottom bar icons color or import to color icons. that icons are showing selected is a white color & not selected is a gray color.
anyone tell me how to change the icons color.

xamarin forms maps


Xamarin.Forms in real project - development tutorial

$
0
0

Hi xamarin developer! I hope you all doing well.

Let me introduce first episode of my project "Xamarin.Forms on real project": Animation on splash screen - image
I want to create real Xmarin.Forms project based on page mockups that you can find in http://awesomekit.me. In every episod I will try to describe all parts of development, I hope, it will be helpful for beginner and for developer with experience.

So, please check video and leave your comment about it...

Error in implementing xamarin.forms.map

$
0
0

Hi xamarin Community

how to resolve this issue

error: package com.google.android.gms.common.api.GoogleApiClient does not exist
    com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks 
im using the cross-platform and a Net shared

I got this when I try to follow the map tutorial in the official page of xamarin

Unable to Update Xamarin.Forms IOS

$
0
0

Hi, Guys, I have inherited this project from the previous developer and I am trying use third-party library which required xamarin forms to be at 2.5 minimum. I am having an issue where I am unable to update to latest version of Xamarin.Form. App Works fine with Xamarin. Forms 2.1.0.6529 when I update it to any other version app freeze or Stuck in the splash screen. I am stuck and don't know where to start the debug from. Is anyone came across an issue like this or steps to debug the issue. Any help will be appreciated.

Xamarin Forms PCL - DatePicker doesn't open correctly on UWP

$
0
0

Hi,

I don't get something, I would like, from a button, open my DatePicker. So I coded that:

private void OnDateClicked(object sender, EventArgs ea)
{
    Debug.WriteLine("PLOPPP");
    //DatePickerControl.IsVisible = true;
    //DatePickerControl.Focus();
    Device.BeginInvokeOnMainThread(() => {
        DatePickerControl.Focus();
    });
}

Once the button got clicked/touched by the user, nothing happens.. Why? I'm just searching to open the Date Selector but I can't figure out why it doesn't work ><

Thank in advance !

Open Page in PCL when Local notification is clicked

$
0
0

Hi,

I am using below code in my Droid project within my PCL solution:

global::Android.Net.Uri uri = global::Android.Net.Uri.Parse("android.resource://" + this.PackageName + "/Raw/" + Resource.Raw.AthanAffasi);

Notification.Builder builder = new Notification.Builder(this)
    .SetSound(uri)
    .SetSmallIcon(Resource.Drawable.icon)
    .SetLargeIcon(Resource.Drawable.icon)
    .SetAutoCancel(true)
    .SetContentTitle("حان الآن موعد أذان الفجر") 
    .SetVibrate(new long[] { 1000, 1000 })
    .SetContentText("نسألكم الدعاء");

NotificationManager notificationManager = (NotificationManager)GetSystemService(Context.NotificationService);
notificationManager.Notify(60000, builder.Build());

I want to know how can i open a page named MyPage in my PCL project when the notification is clicked?

Thanks,
Jassim

Viewing all 91519 articles
Browse latest View live


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