Unable to open Google Play store with Xamarin.Forms Portable class Library - c#-4.0

Currently I use this to try and open the Google Play Store directly to my app however this does not work.
var intent = new Intent(Intent.ActionView, Uri.Parse("market://details?id=" + appPackageName));

In a Forms PCL project, you can open a URI by using Device.OpenUri()
Device.OpenUri(new Uri("http://www.google.com"));

Related

How to make a 3D model viewer android app?

I'm trying to make my own 3d viewer app.
I just want it works like,
Open an app (tap on my smartphone screen),
Show a 3d model,
Close the app when the back button is tapped.
Actually, I made an app (with Kotlin on android studio) that is working like my idea.
The app is working well with a file that is located on a server.
But I want to make an app that works without an internet connection.
How to import a file(glTF format) to the app.?
In the part,
.appendQueryParameter("file", "PATH/XXXX.gltf")
If the PATH is with "https//", it works with an internet connection.
but, How can I set the PATH local storage in order for the apps to work without internet connections?
Here is the kotlin code snippet that I'm using.
val sceneViewerIntent: Intent = Intent(Intent.ACTION_VIEW)
val intentUri: Uri = Uri.parse("https://arvr.google.com/scene-viewer/1.0").buildUpon()
.appendQueryParameter(
"file","ludovic_v2_gltf.gltf" //<<<<---- how to import this file?
//"https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Avocado/glTF/Avocado.gltf"
//<<<--- with this line, works very well.
)
.appendQueryParameter("mode", "3d_only")
.build()
sceneViewerIntent.data = intentUri
sceneViewerIntent.setPackage("com.google.ar.core")
startActivity(sceneViewerIntent)
finish()
Thanks a lot!!!
This is my environment.
windows10, android-studio 20212.1Patch1(build on May 18,2022)
My project was started with "empty activity".

Firebase dynamic links builder API for NodeJS

I am trying to use firebase cloud functions to build my dynamic link rather than use an android client API
#VisibleForTesting
static Uri buildDeepLink(#NonNull final Uri deepLink, int minVersion) {
String uriPrefix = "https://url.page.link";
DynamicLink.Builder builder = FirebaseDynamicLinks.getInstance()
.createDynamicLink()
.setDomainUriPrefix(uriPrefix)
.setAndroidParameters(new DynamicLink.AndroidParameters.Builder()
.setMinimumVersion(minVersion)
.build())
.setLink(deepLink);
final DynamicLink link = builder.buildDynamicLink();
// Return the dynamic link as a URI
return link.getUri();
}
The above code is for android client, is there a similar code for cloud functions environment?
Firebase Dynamic Links currently has SDKs for creating links for iOS, Android, Unity, and C++. It also has a REST API for other platforms. Since you're not using Android or iOS, you'll have to use the REST API.
If you're feeling lazy, you can also use this small package instead of the REST API:
https://www.npmjs.com/package/firebase-dynamic-links

There is a crash when I use MimeKit in Xamrain.IOS

Intalled the Mime Kit and MailKit to packages folder of xamrion.IOS, and try to use them to send an email. It works, but there is a crash when running new MimeMessage()
How to fix this issue.
I am a super beginner with IOS AND Xamarin, thanks very much for your help.
About 6 or 7 lines unable to locate assembly 'I18N' (culture:'')
Log:
2017-07-27 16:18:05.103 AAAA.iOS[523:215341] Xamarin.iOS: Unable to locate assembly 'I18N' (culture: '')
async public void sentEmail(string fileName, string addressEmail)
{
var message = new MimeMessage();
System.Diagnostics.Debug.WriteLine(" SendMail MimeMessage ");
First off, if you are using the simulator you will not be able to send emails using anything that depends on Apple's mail app because it is not installed on the simulator.
If that's not the case, i would recommend using UIMessage instead. Xamarin has great documentation on how to create a pop over view to compose an email and send wit from inside your custom application.
EDIT:
here is the the link to the Xamarin tutorial on sending emails.
You need to go into your iOS Project Options -> iOS Build options and then enable the i18n assemblies to be included.

Document support (rtf, doc, docx) for UWP/Windows 10 Mobile

How can I display documents (doc, docx, rtf) in an UWP app? The WebView isn't able to do this.
Other options would be calling an external application with Windows.System.Launcher.LaunchUriAsync (e.g. Word) or using a 3rd party library. The requirement is to have the data in the app, because you don't have control over it, if it's handled to another one. Another option would be to convert it to another format (e.g. PDF) which UWP can handle (not really).
Any ideas?
If you would like to display word or pdf files in the UWP app you can use WebView control with Google Docs Viewer - I was using it for the online documents.
This is the code:
XAML:
<WebView x:Name="MyWebView"/>
Code behind:
public WebViewPage()
{
this.InitializeComponent();
loadWebView();
}
void loadWebView()
{
var googleDocsViewer = "http://drive.google.com/viewerng/viewer?embedded=true&url=";
var pdf = "http://www.uma.es/precarios/images/pdfs/wd-spectools-word-sample-04.doc";
MyWebView.Navigate(new Uri(googleDocsViewer + pdf));
}
I did not test it with local files, but I think that should also work. Please try and let me know.
UWP can actually handle RTF files with RichEditBox - for more info about that see here in the official documentation (I don't know about RichTextBlock). For Docx support I can recommend a third-party library by Syncfusion, which you can get for free if you meet certain requirements.

Image in Local Folder from WebView

I am working on a project where I need to access an image stored in the applications local folder from within a webview control. When I try to use the ms-appdata:/// scheme it does not work.
I should also mention that I have no control over what content is loaded into the webview and so I must assume that there is no reference to base.js.
I guess my question is, is there any folder where I can store images on the device that I can access from within a webview.
I have tried:
ms-appdata:///local/
ms-appx-web:///local/
file://[path]
Update
This project is done using WinJS and Universal Apps. So it is written entirely in JavaScript.
I use this :
StorageFile file = await dir.GetFileAsync(name + ".jpg");
and I set this
"ms-appdata:///local/" + file.Name
in the "src" attribute of my image tag.

Resources