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

Failed to marshal the Objective-C object

$
0
0

Hello Forums,

I am having a tough time with the following error:

Failed to marshal the Objective-C object 0x17109780 (type: SMBSC_iOS_EddystoneManagerDelegate). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'SMBSC.iOS.EddystoneManagerDelegate' does not have a constructor that takes one IntPtr argument).

I have added the constructor it is looking for, but the application still crashes with this error.

What exactly does this error mean and what can I look at to attempt a fix?

Thanks!


Xamarin Splash-screen with a Text Animation and Progress Indicator

$
0
0

Hi,

Has anyone have implemented the following in XF:

  • Some XF animation (Transform-Slide-Scale) for a Label/Image or Both in splash screen?
    (I am not looking for custom renderer or platform specific stuff).

  • Progress indicator which really shows how soon my application is going to load?
    (I am not looking for a looping animation which just rotates)

So in nutshell, When my application start, I want my application name (label/image) to slide in or scale in or some fancy animation, followed by the indicator just below the application name and should show me a real-time application loading progress.

Please see the below image for more clarification.

Please suggest your views.

Thanks,
N Baua

Simple Timer

$
0
0

Hi Does any one have and example of a simple timer that shows the elapsed time every 1ms?
I can only use stopwatch but stop watch will only update the label when I stop it and I can't use timer for some reason.

MenuStructure

$
0
0

Hi all,
i have the following problem.
Show 3 'MainMenuItems' like ToDo, Employees,Projects.
After selecting one show a Listview with valid items. Select one and Switch to a DetaiView for editing the Item.
I know how to do this in .NET anw WPF but have no experiance in mobile development.

Any idea how to build the different pages and the Navigation structure.

Thanks
Peter

MongoDB

$
0
0

How to Connect Mongodb using REST API web service in Xamarin?
Any reference would be better to understand for me...Thanks in advance.

Make phone call from listview item click

$
0
0

Hi, I fill a lsitview with phone numbers from database , and I have a textview in my item layout to display the numbers, now i want when the user select any number on the list (onClick) the app dial the selected number
How can I call the itemClickEvent to do that

My listview adapter

   String[] myArr = (String[])records.ToArray(typeof(string));
        //setting array adapter with item layout
        ArrayAdapter adapter = new ArrayAdapter(this, Resource.Layout.item, Resource.Id.itemTxt, (System.Collections.IList)records);

        list.SetAdapter(adapter);  // setting adapter to list view
        list.ItemClick += List_ItemClick;
    }

    void List_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
    {

    }

thanks

Unable to add window -token android.os.BinderProxy@16c174d3 is not valid; is your activity running ?

$
0
0

i get linkedin signup info , but i am getting these error ,"Unable to add window -token android.os.BinderProxy@16c174d3 is not valid; is your activity running ?" what should i do ?

Customize Picker in iOS - Entry with down arrow icon

$
0
0

Hi,

I want to customize Picker, It should be display as Entry with down arrow icon(find attchment).
I have done with Android but I didn't get any option for iOS.

Please suggest.

Thanks,
Pramod.


How do i create a popup with a EditText inside or TextArea(if exists)?

$
0
0

Is there a text area for Android/Ios? I need to create a popup and inside this popup tp put one edittext or one textarea if exists. How can i do? Anybody knows some link or tutorial that can give me?

The file "obj\Debug\android\bin\packaged_resources" does not exist.

$
0
0

I just bought an Indie license for Android and I receive the following error when I build a fresh new project in Xamarin Studio

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB6006: aapt.exe is afgesloten met code -1073741819. (MSB6006) (Dime.Scheduler)

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB3375: The file "obj\Debug\android\bin\packaged_resources" does not exist. (MSB3375) (Dime.Scheduler)

More details about the build are in the attachment. Being a complete newbie to the mobile app development, I have no idea where to look and what to do next.

Buttons side by side

$
0
0

How can i do to create two or more buttons and when App renderize these buttons appear side by side? How can i do?

<StackLayout>
                <Button x:Name="btnAprovar"
                    HorizontalOptions="End"
                    BackgroundColor="Gold"
                    HeightRequest="35"
                    WidthRequest="80"
                    Text="Aprovar"
                    TextColor="Green"
                    Clicked="btnAprovar_Clicked"
                    FontSize="Small" />
                <Button x:Name="btnNegar"
                    HorizontalOptions="End"
                    BackgroundColor="Gold"
                    HeightRequest="35"
                    WidthRequest="80"
                    Text="Negar"
                    TextColor="Green"
                    Clicked="btnNegar_Clicked"
                    FontSize="Small" />
            </StackLayout>

Xamarin Webservice

$
0
0

Hi, Now i am working on xamarin webservice part. I want to send my username and password to server and server send back some information like userid, applicationid, username etc.

I try the like following.

            string url = "my url";
            string sContentType = "application/json";

            JObject jsonObject = new JObject();
            jsonObject.Add("username", name);
            jsonObject.Add("password", password);

            HttpClient oHttpClient = new HttpClient();
            var oTaskPostAsync = oHttpClient.PostAsync(url, new StringContent(jsonObject.ToString(), Encoding.UTF8, sContentType));

            await oTaskPostAsync.ContinueWith((oHttpResponseMessage) =>
            {
                // response of post here
                Debug.WriteLine("webserviceresponse:>" + oHttpResponseMessage);
            });

Install Newtosoft.json and Microsoft.Net.Http NuGet packages. After deploying i try to print oHttpResponseMessage, But code didn't enter inside ContinueWith. Can anyone help.

Thanks in advance.

Can't run UI test on Android Emulator

$
0
0

Hi, I am getting an error loading apk file in my Xamarin UI Test project:

Mono Shared Runtime is not supported. This can be resolved by changing the project configuration or using a Release build.

Can anybody tell what's wrong? Attached is snapshot of error in code.

var requestTask = client.GetAsync(uri); var response = Task.Run( () => requestTask);

$
0
0

Before upgrading Android to 26, I was using

response = await client.GetAsync()

to get data from a REST server. Now I need to use

var requestTask = client.GetAsync(uri); var response = Task.Run(() => requestTask);

After doing so, I have to now say

response.Result.IsSuccessStatusCode

rather than

response.IsStatusCode

Can you point me to something that will explain why and what the difference is?

Debugs using Wifi

$
0
0

I'm using an external IPC device for barcode scanning in my application.

So I need a way to debug the application using the Wi-Fi/Bluetooth.

Visual Studio has an option to Debug over Wi-Fi but I can't any option to connect to device or debug using Wi-Fi.

Any one has any idea how to do that?


Xamarin.Auth with Google

$
0
0

I'm developing an application using Xamarin.Android.

I need to enable login with Facebook and Google and I choose to use the Xamarin.Auth component.
I got it work with facebook but I have some issue with Google.

This is my code:

            var auth = new OAuth2Authenticator (
                clientId: "myId.apps.googleusercontent.com",
                clientSecret: "mysecred",
                scope: "openid",
                authorizeUrl: new Uri ("https://accounts.google.com/o/oauth2/auth"),
                redirectUrl: new Uri ("myredirect:oob"),
                accessTokenUrl: new Uri ("https://accounts.google.com/o/oauth2/token"),
                getUsernameAsync: null
            );

            activity.StartActivity (auth.GetUI (activity));

            auth.Completed += (sender, e) => {
                Console.WriteLine (e.IsAuthenticated);
            };

Is this way the Google Activity is displayed, and I can insert my Username and password. But when I click the google login button I get a message like this:

google auth please copy this code switch to your application and paste it there [code]

What I have to do with that code? I just need to get the user name/lastname/email/id.

Thanks a lot!

TableSection w/out header

$
0
0

How can I hide / not create the section header created by a TableSection? The TableSectionBase documentation states:

You can assign a header and a footer either as strings (Header and Footer) properties, or as Views to be shown (HeaderView and FooterView). Internally this uses the same storage, so you can only show one or the other.

But I could not find HeaderView property to create zero height section.

Strange Xamarin.Android build errors after updating VS 2017 to 15.4

$
0
0

Hello

I have updated VS 2017 to 15.4.
After the update, most of my solution Android projects does not build, ending up with such nonsense error as that:

I have updated Android SDK Build Tools to 26.0.2 (with deleting all previous versions), SDK Platform Tools and Android SDK Tools to latest versions. I have installed Android 8.0 Oreo Platform as well.

Above errors from output window:

'1>ERROR : error APT0000: Unknown option '--no-version-vectors--no-version-vectors'
1>Usage : error APT0000:
1>Modifiers : error APT0000:
1>D:\Programy_C#\Xamarin\code\Test.Droid\as either a language or language-region pair. Some examples : error APT0000:
1>inserts android : error APT0000: debuggable="true" in to the application node of the
1>inserts android : error APT0000: minSdkVersion in to manifest. If the version is 7 or
1>inserts android : error APT0000: targetSdkVersion in to manifest.
1>inserts android : error APT0000: versionCode in to manifest.
1>inserts android : error APT0000: versionName in to manifest.
1>D:\Programy_C#\Xamarin\code\Test.Droid\generate R.java for libraries. Separate libraries with ' : error APT0000: '.
1>D:\Programy_C#\Xamarin\code\Test.Droid\Assets to be ignored. Default pattern is : error APT0000:
1>D:\Programy_C#\Xamarin\code\Test.Droid!.svn : error APT0000: !.git:!.ds_store:!.scc:.:

    _:!CVS:!thumbs.db:!picasa.ini:!~' Any help would be appreaciated.

IOS back to app button label position

$
0
0

My app is using google map for navigation, and then there is a "back-to-app" button on the top-left corner. However the position is out of screen. How to change the position of the "ShakEat"? Showed in the picture.

having problems posting to the Apple store

$
0
0

I am having problems posting to the apple store.
I got 4 errors :
ERROR ITMS-90022: "Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.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 >= 10.0."

ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait' in bundle ...

the 1st 3 I make icons that fix the pixels they want but I do not know where to place them...
in info.plist there is not a place for them...

and the last one,
I do not know what they are asking from

any ideas ?

Viewing all 204402 articles
Browse latest View live


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