I am developing a Xamarin Forms application that just has a few calls to the Maps and GeoLocation API. I am using the following packages in my application.
GeoCoordinate.NetCore {1.0.0.1}
Microsoft.AspNetCore.SignalR.Client {1.1.0}
Microsoft.Azure.EventGrid {3.2.0}
Newtonsoft.Json {12.0.2}
SearchPlaces {1.0.0}
UXDivers.GorillaPlayer.SDK {1.5.2}
UXDivers.GorillaPlayer.SDK.AutoC... {1.5.0-Beta4}
Xam.Plugin.Geolocator {4.5.0.6}
Xamarin.Android.Support.Vector.D... {28.0.0.1}
Xamarin.Forms {4.2.0.709249}
Xamarin.Android.Support.Design {28.0.0.1}
Xamarin.Android.Support.v7.AppCo... {28.0.0.1}
Xamarin.Android.Support.v4 {28.0.0.1}
Xamarin.Android.Support.v7.CardView {28.0.0.1}
Xamarin.Android.Support.v7.Media... {28.0.0.1}
Xamarin.Android.Support.Core.Utils {28.0.0.1}
Xamarin.Android.Support.CustomTabs {28.0.0.1}
Xamarin.Essentials {1.2.0}
Xamarin.Forms.Maps {4.2.0.709249}
when I upload this App to the Google Play for publishing, I see the following warning:
We’ve detected that your app is using an old version of the Google Play Developer API. From December 1 2019, versions 1 and 2 of this API will no longer be available. Update to version 3 before this date. Learn more
As far as I can see, there is nothing in my code that uses a version of Google Play Developer API. Closest I can see me using a Google API is from a 3rd party package called SearchPlaces where its using the following code to suggest the places from the search text.
string CreatePredictionsUri(string newTextValue)
{
var url = "https://maps.googleapis.com/maps/api/place/autocomplete/json";
var input = Uri.EscapeUriString(newTextValue);
var pType = PlaceTypeValue(placeType);
var constructedUrl = $"{url}?input={input}&types={pType}&key={apiKey}";
if (locationBias != null)
constructedUrl = constructedUrl + locationBias;
if (components != null)
constructedUrl += components;
return constructedUrl;
}
can someone please help me understand why I am getting this warning in the google play console for my app.
UPDATE 1
Just wanted to add that I am also having this in my manifest
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="<my API Key>" />
Related
Im currently facing an issue with using a 3rd party authenticator for my xamarin forms app. The code to execute has to be done natively in the platform project. The issue im facing is how to get the information(successful login, token, email etc) from the ios/android native project to the shared project for me to access it and continue the application. Below is an example of how the code looks below in the ios native project.
var client = new Auth0Client(new Auth0ClientOptions
{
Domain = "example.us.auth0.com",
ClientId = "123456789"
});
var loginResult = await client.LoginAsync();
I want to create a Xamarin.Forms app where I have to login to a specific Azure DevOps environment/project.
To try out the Azure DevOps Service library I first created a Console App (.NET Framework 4.7.2) to login to the Azure DevOps environment/project. The following code was used for login process (+ extra code to validate the connection actualy works).
public void Login(string _userName, string _pwd)
{
ProjectHttpClient projectClient;
this.Credentials = new VssAadCredential(_userName, _pwd);
this.Connection = new VssConnection(new Uri(this.DevOpsPath), this.Credentials);
this.InitReferences(this.ProjectName);
projectClient = this.Connection.GetClient<ProjectHttpClient>();
this.ProjectReference = projectClient.GetProjects(null, top: 1).Result.Where(item => item.Name == this.ProjectName).FirstOrDefault();
}
When I use the same piece of code in the Xamarin.Forms App (.NET Standard 2.1) it no longer works and I get the following error when executing the last line:
One or more errors occurred. (Could not resolve type with token
0100008d from typeref (expected class
'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions'
in assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory,
Version=3.19.4.11002, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'))
When using the VssBasicCredential with a personal acces token, the code runs as expected. However I would prefer using the VssAadCredential and not the VssBasicCredential.
I'm not aware that the VssAadCredential is not supported in .NET Standard and can find no documentation relating to the issue.
Has anyone had a similar experience that might solve this problem or can anyone provide me with some documentation declaring that this cannot work as of yet?
So I've tried to follow this
http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/
And then this https://facebook.github.io/react-native/docs/linking-libraries-ios.html
Firebase SDK seems to be loaded, XCode says:
2017-06-18 19:35:49.969 myapp[2224]
[Firebase/Analytics][I-ACS005000] The AdSupport Framework is not
currently linked. Some features will not function properly. Learn more
at (stackoverflow forbids shorteners)
2017-06-18 19:35:49.971 myapp[2224]
[Firebase/Analytics][I-ACS023007] Firebase Analytics v.4001000 started
Then I'm getting a "Native module cannot be null" red screen after React Native loads.
XCode says:
2017-06-18 19:48:39.975 [info][tid:main][RCTCxxBridge.mm:184]
Initializing (parent: , executor: (null))
2017-06-18 19:48:39.980 [warn][tid:main][RCTBridge.m:114] Class
RCTCxxModule was not exported. Did you forget to use
RCT_EXPORT_MODULE()?
2017-06-18 19:48:39.994 [info][tid:main][RCTRootView.m:302] Running
application myapp ({
initialProps = {
};
rootTag = 1; })
2017-06-18 19:48:40.305 [error][tid:com.facebook.React.JavaScript]
Native module cannot be null.
Did anyone have better luck than me?
We are implementing a server for app distribution and we need restrict the access to the apps by:
mac address
ip
At the moment I have not found any module that can obtain this data from the device in nativescript, so i don't know if there's a plugin or how else can I achieve this.
In nativescript you can access native apis of device
so if there isn't any module/plugin for it you can use this option for accessing native apis.
https://docs.nativescript.org/core-concepts/accessing-native-apis-with-javascript
for example there is solution for mac adress here
in JAVA:
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo wInfo = wifiManager.getConnectionInfo();
String mac = wInfo.getMacAddress();
we can write it in javascript like this:
first we should fine where is this getSystemService:
after searching in documentation of android we found:
getSystemService is in android.content.Context
for accessing context in nativescript http://docs.nativescript.org/cookbook/application
we can do:
import app = require("application");
app.android.context;
so let's write it in javascript:
we don't have types in javascript so we use var instead;
var context = android.content.Context;
var wifiManager = app.android.context.getSystemService(context.WIFI_SERVICE);
var wInfo = wifiManager.getConnectionInfo();
var mac = wInfo.getMacAddress();
NOTE1 : as mentioned in above java solution link you should add this permision <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission> to app/App_Resources/AndroidManifest
NOTE2 : the above solution was for android,for ios you should find the solution with objective_c and convert to javascript with help of nativescript documentation.
NOTE3:In android 6 you might need request permision
You can also use this method to create a plugin for nativescript.
I'm targetting iOS and Android platforms for a messaging application.
I want to use voice and messaging features of the sdk.
Are there any bindings available for sinch sdk for xamarin?
Sinch has a C# wrapper for sending SMS via their REST interface. It is available via a Nuget (Sinch.SMS) and/or you can grab the code on Github; https://github.com/sinch/Sinch.SMS
i.e. (from their hello world example):
To send an SMS use:
var client = new Sinch.SMS.Client("yourkey", "yoursecret");
var messageid = await client.SendSMS("+46722223355", "hello from sinch");
To check a status of an SMS use:
var client = new Sinch.SMS.Client("yourkey", "yoursecret");
var result = await client.CheckStatus(messageid);
As far as a complete SDK bindings for their Android/iOS SDKs, I do not know of one personally.
I 'just' would import them into XStudio and convert their sample call apps and give it a try. Should not take very long to see if the auto-wrappers work. Otherwise you would have manually correct/write the C# bindings to their 'native' lib
Here are some Xamarin binding libraries available on nuget. They are by a Vietnamese Software Development company called NAXAM. I believe these are all open source, and published on their github here: https://github.com/NAXAM
https://www.nuget.org/packages/Naxam.SinchVoice.Droid/
https://www.nuget.org/packages/Naxam.SinchVoice.iOS/3.11.0-pre1
https://www.nuget.org/packages/Naxam.SinchVerification.Droid/
https://www.nuget.org/packages/Naxam.SinchVerification.iOS/2.0.4-pre1