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

iOS app rejected: "Safety: User Generated Content"

$
0
0

Hello,
after adding the ability for users to message each other in our app, the binary was rejected for these reasons:
Hello,

Regarding 1.2.0 - EULA, flagging, & blocking mechanism, we are referring to the capability that allows users to message each other.

To resolve this issue, it would be appropriate to revise your app to implement all of the following precautions:

  • Require that users agree to terms (EULA) and these terms must make it clear that there is no tolerance for objectionable content or abusive users
  • A method for filtering objectionable content
  • A mechanism for users to flag objectionable content
  • A mechanism for users to block abusive users
  • The developer must act on objectionable content reports within 24 hours by removing the content and ejecting the user who provided the offending content

We look forward to reviewing your resubmitted app.

Best regards,

App Store Review

Now, it sounds like they want us to implement a way to block users and to add a EULA agreement.
But i am not sure what they want (I replied asking clarification, and they replied with the same message, duh!):

  1. EULA: where should i make the EULA available? After logging-in we have a menu and I can add it there. Should i also add a link to the EULA page in the registration page? Or in the login page? Some say "show it during installation", but how can you do that?
  2. A method for filtering objectionable content: we're far from AI.....but our admins can remove content from the backend, is that enough?
  3. The developer must act on objectionable content reports within 24 hours....: same as #2

Thanks to anyone who has been there done that and can help me understand!


Asset Location

$
0
0

I have a text file that I need to open. I have added it to the Assets folder. I need to open a stream to read it. What is the folder that I need to look in to find it?
If it is marked as an asset, do I also need to copy it to the Output Directory? If so, what would be the folder name

Detect BLE characteristic value change

$
0
0

I have to migrate iOS app (that uses BLE) to cross platform app.

I am using Plugin.BLE to connect to a device. I want to detect characteristic's value changes, so I use await characteristic.StartUpdatesAsync() method and characteristic.ValueUpdated event. When I call StartUpdatesAsync() method I can see that ValueUpdated event is handled continuously, even if the value doesn't change.

Is this correctly working?

How to make a connection to MS Sql Server from Xamarin.Android?

$
0
0

Hi everyone!
I have a question: how can I make a connection to a DB that is on SQL Server on my computer?
I've already enabled SQL Browser and used System.Data.SqlClient, however a program threw such mistake:

Can you please tell me, how can I fix it? Maybe I should use another NuGet, but I don't know which one....

API Rest

$
0
0

What is the best way to create an api rest in xamarin forms

Does custom renderer control inherit Base properties?

$
0
0

Hello,

I am using https://github.com/XamFormsExtended/Xfx.Controls "Custom entry control". I am trying to set MaxLength and IsReadOnly properties of entry on "Custom entry control" but those properties are not active on control and I ain't getting desired result.
How can function those base properties to work with custom renderer?

Background service - Get GPS Location every x minutes?

$
0
0

Hi all,

I'm developing an app using Xamarin (duh), and I need a background service that gets the user's GPS location at recurring intervals (say, every 15 minutes).

This project (https://github.com/xamarin/mobile-samples/tree/master/BackgroundLocationDemo) is the closest I can find to example code, and it claims that the location continues to update, even with the app in the background. Out of the box, this doesn't seem to be the case.

Could anyone offer insight (or even better, example code/projects) to point me in the right direction?

Thanks in advance.

Center app logo using TitleView

$
0
0

Hello folks! Hope you are doing great!

Im trying to center my app logo using TitleView but it's impossible to achieve that when I have the arrow icon in the nav bar.

Some code:

Anyone know how to solve this?


How to make a http get from Secured API with google account connection

$
0
0

Hello,

I did an api, for the exemple i will call it: https:// testapp.azurewebsites.net

I did the Authentication / Authorization in Azure for google Facebook and Microsoft account.

Then i want to consume it in xamarin for my Android/iOS app, so i did the login button etc but when I'm authentify i can't get the json of my api URL: "https:// testapp.azurewebsites.net/api/Test/allCoordinates".

It work's perfectly in my browser and in postman... This is my code in C#:
var requestCoord = new OAuth2Request("GET", new Uri(URL),null , e.Account); var responseCoord = await requestCoord.GetResponseAsync(); //it works for google userinfo but not for my Api... string coordJson = await responseCoord.GetResponseTextAsync(); var mapTest = JsonConvert.DeserializeObject<List<CustomPin>>(coordJson);

I got a message : System.Net.HttpStatusCode.Unauthorized for the var responseCoord .

If you have any idea to make this Http Get from protected webapi i will help me so much !!!

Thanks a lot

If you need more precision let me know;)
I use this tuto to be authentify : https:// github.com/CuriousDrive/PublicProjects/tree/master/OAuthNativeFlow and https:// docs.microsoft.com/fr-fr/xamarin/essentials/web-authenticator?tabs=android

Gesture recognizers and portability

$
0
0

I have a CollectionView and am using a gesture recognizer to trap a double-tap event. I also have the CollectionView enabled for Single select. This all seems to work with the UWP version, but on Android I don't get the double tap. I can see the single selection working, but the double taps don't seem to be recognized. Any help is greatly appreciated. Thanks.

Appcenter build SDK version?

$
0
0

I have two apps, one i started last year and on i started this year. The new one builds on the app centre againsst net standard 2.1 and the old one 2.0. I tried setting the target of the old one to 2.1 and it complained that the sdk it was building with didn't support that. I tried setting a global.json and same problem. It is almost as if the old build/project is configured to use an old SDK somewhere and the new project a newer SDK. What doi change and how do I change it?

Provisioning profile is shown in Xcode but not in Visual Studio for Mac

$
0
0

I am trying to sign my Mac app.

I have gone through the relevant steps to create a provisioning profile.

In Xcode, if I specify the appropriate bundle id, I am offered the corresponding provisioning profile from the dropdown and can select that and sign the app.

In Visual Studio for Mac, if I specify exactly the same bundle id in Info.plist, then go to the project options, no provisioning profile is offered.

How do I diagnose and fix the problem?

How to find the cause of: Xamarin.Forms targets have been imported multiple times

$
0
0

I'm working my way thru the book "Creating Mobile Apps with Xamarin Forms" and a lot of the sample code requires some work to get it running, which is all very educational and helps me learn and remember. However I can't find the cause of this one;
Chapter 20, MandelbrotProgress, gives me an error in the Xamarin.Formsbook.Toolkit project:

Xamarin.Forms targets have been imported multiple times. Please check your project file and remove the duplicate import(s).

Can somebody point me at the root cause of this please. I cannot find any obvious duplicates in the project file, but there are some error conditions defined in there which I am suspicious of.

Also, is there a specific forum or support area for the above mentioned book?

Xamarin Forms Survey Binding Issues

$
0
0

Hello All,

I’m trying to create a survey within my main project and I’m having binding issues. The survey for the main project will have about 60 questions and there will be about 5 different ways to answer the questions. For example, there will be control types such as, DatePicker, Slider, Entry, Picker, and MultiSelect(Checkboxes). Through some research, I’ve been able to create 5 different DataTemplates for each control type and I’m using a CarouselView’s ItemTemplate to change each DataTemplate(Page). For convenience, I’ve created a small sample project that reads json from a text file which creates 6 questions. Each question is a page. When using the next & previous buttons, I’m keeping track of the current page with a property in the viewmodel. Also, I’m using a switch statement for the control types to assign values to the appropriate property in the codebehind. See small example below:
var page = _vm.SurveyPages.Where(p => p.PageNumber == _vm.CurrentPage).First();
switch (page.Question.ControlType) { case "entry": _vm.SelectedEntryAnswer.SelectedEntryAnswer = page.Question.SelectedEntryAnswer; break;

My problem is that my bindings lose their values when I go back using the previous button. For example, when I use the picker control to select “Male” or “Female”, go to next page and use the slider, go to next page and input text in the entry control, and click the next button. After that click the previous button until you get to the picker page again. You will notice that the selection you chose is no longer selected. When debugging, the last setter call to the property it’s bound to, the value is null, which is why the selection is no longer there. I cannot figure out why this is happening.

My goal is to for the pages to keep all the answers set on them even when moving to next or previous page. That way once the user finishes, I can submit the answers to the database. If anyone can help me figure out why my values are not persisting through the page navigation, it would be much appreciated. My other problem is I do not know how to access my controls in my datatemplates. I’ve tried solutions available such as FindVisualChildren, but I could not seem to get it to work. I’ve been on this for over 2 weeks now and I am at my wits end. I don’t want to write hacky code in order to move forward, because I believe there is a better way to achieve what I’m trying to do. I’m new to these forums, so if there’s anymore info needed please ask.

Thank you in advance!!!

P.S. This sample project uses Xamarin Forms, MVVM, and is tested using a Android Phone.

forgot keystore password

$
0
0

I have forgot my Xamarin form android keystore password. please solve my problem how to recover password or reset it.

Thanks


Getting file Bytes from an selecting a file

$
0
0

Good Day

i am doing the following from a platform level. i ask the user to browse a file like this

                    Intent intent = new Intent();
                    intent.SetAction(Intent.ActionGetContent);
                    intent.SetType("file/*");
                    StartActivityForResult(intent,0);

and after the user has selected the file , i handle it like this

     public override void OnActivityResult(int requestCode, int resultCode, Intent data)
        {
            if(requestCode == 0)
            {
                var returned = data.Data.Path; 

                var filename = Path.GetFileName(returned);
                //file to Stream 

                // var path  = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData), filename);

                //var path2 = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData), returned);

                var path = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, filename);


                var bytes = File.ReadAllBytes(path);

                //stream to ByteArray 
             //   var finalarrary = StreamToByteArray(readytosave);


            }
        }

and there is a Path in variable "path"

"/storage/emulated/0/Course Dates 2018.doc"

and next line i read all bytes to get the ByteArray of the file and i get the following error

{System.IO.FileNotFoundException: Could not find file "/storage/emulated/0/Course Dates 2018.doc"File name: '/storage/emulated/0/Course Dates 2018.doc'  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001aa] in workspace/archive-mono/2019-10/android/release/mcs/class/corlib/System.IO/FileStream.cs:239   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess 

looking at my phone , i see that the document is at INTERNAL STORAGE>documents

Has something changed with CFBundleDocumentTypes?

$
0
0

Hi, in fall of last year (2019) I added a custom file type for my app with CFBundleDocumentTypes. It seemed to work as it would list my app when hitting the share button from another app like Mail. I had to leave it for a while but I came back to finish it now and it no longer works, my app does not appear under the share button from other apps anymore. Nothing else was changed in my app so I am not sure what happened other than the latest iOS needs something different?

Xamarin.Forms CardsView nuget package

$
0
0

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

Is it possible to change binding behavior for Entry.Text

$
0
0

When I bind a view model property to Entry.Text the property is updated every time something changes in the Entry, literally after each button press. Maybe it is desired behavior for most but in my case a better behavior would be to update the view model property only after Entry loses the input focus. Is it possible to change the behavior to what I need? I assume I can figure out how to implement what I need in other way but first I would like to make sure that I didn't miss anything.

How to make the app open on the same place you left it last time?

$
0
0

Hi everyone, first question ever.
I am very new on Xamarin, making my first project, so I would very much appreciate detailed answers.

My app consists basically on a book. I am using CarouselPage, in which every chapter of the book is one of the carousel pages.

My question is how do I make sure that every time someone runs the app, it "saves the progress" and opens where you left it last time.

Thanks everyone!

Viewing all 204402 articles
Browse latest View live


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