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

I developed an Application based on Android 8.1 and I need to downgrade it to Android 5.0

$
0
0

Once I did though the application gives me a lot of errors, even after downloading android SDK for 5.0, is it Nuget problem? if though how I downgrade the NuGet packages, what is the root cause?

**Some of the Errors:
Error max res 21, skipping mipmap-anydpi-v26 "max res 21, skipping mipmap-anydpi-v26".
Error No resource found that matches the given name: attr 'windowNoTitle'.
Error NU1202 Package Xamarin.Android.Support.v7.AppCompat 27.0.2.1 is not compatible with monoandroid50 (MonoAndroid,Version=v5.0). Package Xamarin.Android.Support.v7.AppCompat 27.0.2.1 supports: monoandroid81 (MonoAndroid,Version=v8.1)


Multiple warnings and an error but the app runs correctly

$
0
0

I am modifying an basic Calc app I found on the web.

I added a CLEAR button with this axml:

Here's the axmal:

<LinearLayout
    android:id="@+id/wrapper4"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/wrapper3"
    android:weightSum="1.0">
 <Button
        android:text="Clear"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_below="@+id/btn0"
        android:layout_weight=".25"

    android:theme="@style/CustomButton"
        style="@style/Widget.AppCompat.Button.Colored"
        android:id="@+id/btnClear" />
</LinearLayout>

And here's the C# code in MainActivity.cs:

Button clr = (Button)FindViewById(Resource.Id.btnClear);

The app compiles but....

Here's some of the many warnings and the error:

Severity Code Description Project File Line Suppression State
Warning Directory obj\Release\MonoAndroid81\android/assets contains Xamarin.Android.Arch.Lifecycle.Common.dll but no debug symbols file was found. 0
Warning Directory obj\Release\MonoAndroid81\android/assets contains Xamarin.Android.Arch.Core.Common.dll but no debug symbols file was found. 0
Warning Directory obj\Release\MonoAndroid81\android/assets contains Java.Interop.dll but no debug symbols file was found. 0
Error ADB0010: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A_work\122\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 338
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.b__0(Task1 t) in E:\A\_work\122\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 746 at System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()
at System.Threading.Tasks.Task.Execute() 0
Error CS0117 'Resource.Id' does not contain a definition for 'btnClear' Calc5 P:\C#\Android\Calc5\Calc5\MainActivity.cs 40 Active

I've deleted the Release dir; rebooted both the phone and the computer.

After I run Build and then Deploy (ignoring the errors) I get a signed.apk file in the release dir. I can copy it to the phone and install it there and it runs correctly.

I would like any input as to why I'm getting these errors and warnings.

RON

PDF external links not working in Webview

$
0
0

I am developing an application. I successfully open website using Webview in Xamarin.Forms. Website contains some links to the PDF file. but when I click on the link, it dies nothing.

Can anyone please help me out on that.
Thanks and Regards,

xamarin android Get the IP Address of the Hotspot

$
0
0

Getting the IP Address of an Android Device using it's hotspot from another android device

Sync data accross multiple devices (just like with iCloud on iOS)

$
0
0

What is the best way for an Android implementation to sync data accross multiple devices? I currently have iCloud implemented to iOS but now I still need an alternative for Android. My app is, at least now, only available in the Google Play Store but might be later added to Amazon for example.

Is there even an alternative that is similar to iCloud on iOS? Google Drive? Dropbox?

No template to add Class to Xamarin Forms ios project

$
0
0

I have added a new xamarin forms project on visual studio 2017 community version. I want to add a class in ios project but there is no template to add class. I had same issue with my previous project. I am unable to add class file to ios project.

is it possible for android not to enter the OnDestroy() method and keep the app ruining

$
0
0

Hello guys i'm using xamarin forms
i have a class LocalNotif wish content notification calls
on IOS devices i manage to fetch the device even when the app is destroyed but in Android i don't know how
can any one help please.
Thank you

TabbedPage using Iconize nuget.


Issue with Creating Card Connect SDK Xamarin binding Library for iOS

$
0
0

I created a Xamarin Binding Library project to map the card connect sdk for ios and was successful in it. But when I try to create a sample project to test the function its giving me the following error.

Could not create an native instance of the type 'CardConnect.CCCPaymentRequest': the native class hasn't been loaded. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.

You can find the Objective C & Swift sample and documentation in the link below https://developer.cardconnect.com/mobile-sdks#iOS

Also I am trying to bind an Objective C framework library

Edittext input date format dd/mm/yyyy

$
0
0
I want to input mask Edittext input date format dd/mm/yyyy. In xamarin how to do this. Thanks many.

How to merge multiple resource dictionarties

$
0
0
<ResourceDictionary.MergedWith>
                <resources:Colors />
                <resources:Fonts />
</ResourceDictionary.MergedWith>

MSG_WINDOW_FOCUS_CHANGED assigned to 0 & 1, that reboot onresume and onpause method.

$
0
0

MSG_WINDOW_FOCUS_CHANGED assigned to 0 & 1, that loops my activity life cycle by calling onresume() and onpause() method.

here is the log I had, please help me.

02-04 16:39:49.132 D/ViewRootImpl@8d78afdSettingScreen: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1536, 2048) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
02-04 16:39:49.347 D/ViewRootImpl@8d78afdSettingScreen: MSG_WINDOW_FOCUS_CHANGED 1
02-04 16:39:49.347 D/ViewRootImpl@8d78afdSettingScreen: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true -2062204928}
02-04 16:39:49.355 V/InputMethodManager(14524): Starting input: tba=android.view.inputmethod.EditorInfo@69162b2 nm : com.prophoenix.firemobile ic=com.android.internal.widget.EditableInputConnection@fa57203
02-04 16:39:49.355 I/InputMethodManager(14524): [IMM] startInputInner - mService.startInputOrWindowGainedFocus
02-04 16:39:49.356 D/InputTransport(14524): Input channel constructed: fd=78
02-04 16:39:49.357 D/InputTransport(14524): Input channel destroyed: fd=69
02-04 16:39:49.360 W/IInputConnectionWrapper(14524): finishComposingText on inactive InputConnection
02-04 16:39:49.375 D/ViewRootImpl@1e5878fLogin: mHardwareRenderer.destroy()#1
02-04 16:39:49.378 D/ViewRootImpl@1e5878fLogin: Relayout returned: oldFrame=[0,0][1536,2048] newFrame=[0,0][1536,2048] result=0x5 surface={isValid=false 0} surfaceGenerationChanged=true
02-04 16:39:49.380 I/mono-stdout(14524): Setting Screen ~ OnResume Method CallingSetting Screen ~ OnResume Method Calling

Setting Screen ~ OnResume Method Calling completed02-04 16:39:49.385 I/mono-stdout(14524): Setting Screen ~ OnResume Method Calling completed

02-04 16:39:49.407 D/ViewRootImpl@8d78afdSettingScreen: MSG_WINDOW_FOCUS_CHANGED 0
02-04 16:39:49.411 I/mono-stdout(14524): Setting Screen ~ OnPause Method Calling
Setting Screen ~ OnPause Method Calling
Setting Screen ~ OnPause Method Calling completed02-04 16:39:49.412 I/mono-stdout(14524): Setting Screen ~ OnPause Method Calling completed

02-04 16:39:49.430 D/ViewRootImpl@8d78afdSettingScreen: Relayout returned: oldFrame=[0,0][1536,2048] newFrame=[0,0][1536,2048] result=0x1 surface={isValid=true -2062204928} surfaceGenerationChanged=false
02-04 16:39:49.457 D/ViewRootImpl@8d78afdSettingScreen: MSG_WINDOW_FOCUS_CHANGED 1
02-04 16:39:49.457 D/ViewRootImpl@8d78afdSettingScreen: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true -2062204928}
Setting Screen ~ OnResume Method Calling
02-04 16:39:49.496 I/mono-stdout(14524): Setting Screen ~ OnResume Method Calling
Setting Screen ~ OnResume Method Calling completed
02-04 16:39:49.500 I/mono-stdout(14524): Setting Screen ~ OnResume Method Calling completed
02-04 16:39:49.515 D/ViewRootImpl@8d78afdSettingScreen: MSG_WINDOW_FOCUS_CHANGED 0
02-04 16:39:49.520 I/mono-stdout(14524): Setting Screen ~ OnPause Method CallingSetting Screen ~ OnPause Method Calling

02-04 16:39:49.521 I/mono-stdout(14524): Setting Screen ~ OnPause Method Calling completedSetting Screen ~ OnPause Method Calling completed

02-04 16:39:49.537 D/ViewRootImpl@8d78afdSettingScreen: Relayout returned: oldFrame=[0,0][1536,2048] newFrame=[0,0][1536,2048] result=0x1 surface={isValid=true -2062204928} surfaceGenerationChanged=false
02-04 16:39:49.569 D/Graph (14524): removeVertex() : insertDummyVertex, because there is no ancestor.
02-04 16:39:49.569 D/TextView(14524): SYANI: Clipboard API is calling: clearFilter()
02-04 16:39:49.569 D/TextView(14524): SYANI: Clipboard API is calling: unregisterClipboardEventListener()
02-04 16:39:49.570 D/TextView(14524): SYANI: Clipboard API is calling: clearFilter()
02-04 16:39:49.570 D/TextView(14524): SYANI: Clipboard API is calling: unregisterClipboardEventListener()
02-04 16:39:49.580 D/ViewRootImpl@1e5878fLogin: mHardwareRenderer.destroy()#4
02-04 16:39:49.580 D/ViewRootImpl@1e5878fLogin: dispatchDetachedFromWindow
02-04 16:39:49.583 D/InputTransport(14524): Input channel destroyed: fd=64
02-04 16:39:49.583 D/ViewRootImpl@8d78afdSettingScreen: MSG_WINDOW_FOCUS_CHANGED 1
02-04 16:39:49.583 D/ViewRootImpl@8d78afdSettingScreen: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true -2062204928}
02-04 16:39:49.590 I/mono-stdout(14524): Setting Screen ~ OnResume Method Calling
Setting Screen ~ OnResume Method Calling
Setting Screen ~ OnResume Method Calling completed02-04 16:39:49.594 I/mono-stdout(14524): Setting Screen ~ OnResume Method Calling completed

02-04 16:39:49.618 D/ViewRootImpl@8d78afdSettingScreen: Relayout returned: oldFrame=[0,0][1536,2048] newFrame=[0,0][1536,2048] result=0x1 surface={isValid=true -2062204928} surfaceGenerationChanged=false
02-04 16:39:49.619 D/ViewRootImpl@8d78afdSettingScreen: MSG_WINDOW_FOCUS_CHANGED 0
Setting Screen ~ OnPause Method Calling02-04 16:39:49.622 I/mono-stdout(14524): Setting Screen ~ OnPause Method Calling

Setting Screen ~ OnPause Method Calling completed02-04 16:39:49.623 I/mono-stdout(14524): Setting Screen ~ OnPause Method Calling completed

02-04 16:39:49.652 D/ViewRootImpl@8d78afdSettingScreen: MSG_WINDOW_FOCUS_CHANGED 1
02-04 16:39:49.652 D/ViewRootImpl@8d78afdSettingScreen: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true -2062204928}
Setting Screen ~ OnResume Method Calling02-04 16:39:49.670 I/mono-stdout(14524): Setting Screen ~ OnResume Method Calling

02-04 16:39:49.674 I/mono-stdout(14524): Setting Screen ~ OnResume Method Calling completed
Setting Screen ~ OnResume Method Calling completed
02-04 16:39:49.687 D/ViewRootImpl@8d78afdSettingScreen: MSG_WINDOW_FOCUS_CHANGED 0
.
.
.
Like this way, it going on.

how can i SetPriority. in Xamarin Android in the OnStop method

$
0
0

hello guys i need my app to work even when the user close it from the task manager to receive notification i am not using firebase or anything
is it possible to set the priority in the onstop method so the application will not be destroyed
Thank you

Xamarin Forms Box Sizing

$
0
0

I have started doing development on Xamarin Forms recently, and one of the things that I keep thinking about is the Box Model in Xamarin Forms.

So basically, does padding and border count as part of the width, or are they added on top?

For example, if I do <Frame WidthRequest="100" HeightRequest="100" Padding="20,0"/>, does this mean the total space the frame will occupy horizontally is 140', similarly, will the total space it occupy vertically is 140? Or will it be only 100 both horizontally and vertically, while the padding is taken from the WidthRequest/HeightRequest size?

This is know as Box Sizing in HTML/CSS, but not sure what it is called in Xamarin Forms?

I am suffering lately especially working with Frames, which they seem to be inconsistent to me.

Thanks for help.

Tab indicator in Xamarin Forms Tabbed Page placed at bottom

$
0
0

I have a Xamarin Forms bottom placed tabbed page rendered using C#. I want a tab indicator to be displayed above each tab icons as it would in a top placed tabbed page. Is it possible? I am not able to find solution anywhere. I came across this SO post - https://stackoverflow.com/a/41570159/10329199, where we can define app:tabIndicatorColor="#123456" in Tabbar.axml. But I didnt work because I'm rendering the tabbar using C# not in AXML. I also want this tab indicator in iOS. Thanks


Xamarin Forms Box Model

$
0
0

I have started doing development on Xamarin Forms recently, and one of the things that I keep thinking about is the Box Model in Xamarin Forms.

So basically, does padding and border count as part of the width, or are they added on top?

For example, if I do <Frame WidthRequest="100" HeightRequest="100" Padding="20,0"/>, does this mean the total space the frame will occupy horizontally is 140', similarly, will the total space it occupy vertically is 140? Or will it be only 100 both horizontally and vertically, while the padding is taken from the WidthRequest/HeightRequest size?

This is know as Box Sizing in HTML/CSS, but not sure what it is called in Xamarin Forms?

I am suffering lately especially working with Frames, which they seem to be inconsistent to me.

Thanks for help.

Webview EvaluateJavascripAsync

$
0
0

I have Javascript function which returns a collection of objects, how to get the collection on EvaluateJavascriptAsync call. It returns a string, and in my case it always returns null in C#. Any reference on this. TIA.

Buttons correctly displayed in Release mode but not on real phone

$
0
0

Hello everyone,

I'm developping an app for Android and iOS with Xamarin, in this app the users can choose a diameter (called "diametre"), to this diameter is associated one or many screw threads (called "pas"). These two, combined, return a drill ("Percage").

The user must first click on "Diametre". ("Choisir" means "Choose").
(1) (I've made screenshots with numbers they refer to in the .zip file, since i can't post links).

Many buttons appears and the user can choose his value.
(2)

Once he has chosen his value for the diameter, the "pas" button is now accessible.
(3)

Now, the user can choose the "pas" he wants by clicking on the corresponding button which is supposed to lead him to a list of button like for the diameter.
This is where the trouble starts:

On the release version of the app, the list is appearing normally like for the diameter one, but when i deploy the app on a real phone to test it, the list is not correctly visible:
(4)

What i don't understand is the fact that when i swipe my finger a little to the bottom of the list, some values are appearing
(5) & (6)

This list is supposed to be like the diameter one, values with white background.

I'm new to Xamarin, at this point i don't know if the issue is from my code or if it's a bug (since everything is working in Visual Studio Android Emulator).

If you have any suggestion i would be very grateful.
Thanks for reading

Unable to navigate to next 8th page after 7 pages navigated in xamarin forms using prism

$
0
0

I am unable to navigate to 8th from 7th page in prism

Please help....

Xamarin Forms. Integrate Firestore with Add/Update examples?

$
0
0

So, im trying to implement this libraries inside my project:
Firestore Android:
https://www.nuget.org/packages/Xamarin.Firebase.Firestore/60.1142.0-beta2

Firestore IOS:
https://www.nuget.org/packages/Xamarin.Firebase.iOS.CloudFirestore/

And I've only found 1 example of how to use them both:
https://github.com/yamachu/Sample-Firebase-Cloud-Firestore-Xamarin.Forms

Since I'm having problems when adding/updating in the mapping of .NET objects to Java/NSObject respectively. Does anyone know a library that provides an example of that?
Thanks!

Viewing all 204402 articles
Browse latest View live


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