Android Auto media app issue with duplicate apps - android-auto

We developed a Mobile app with Xamarin forms. Now we want to give support for Android-Auto (Cars).
Made all the necessary configurations to make it work for our media player-related app on Android Auto.But I am able to see the 2 apps on the Android auto console (DHU). From one of the app, we are able to see all the content whatever we are expecting. Due to this duplicate/ multiple apps issue. I am unable to see the media content playing when we play the audio from Mobile. I have added all the necessary changes in manifest file related to MediaBrowser service and intent filter. But still facing the above mentioned issues.
Am I missing something here? How to get it to work as expected?
I added in the manifest file about support for Android-auto.
<meta-data android:name="com.google.android.gms.car.application"
android:resource="#xml/automotive_app_desc"/>
...

Related

Xamarin Forms WebView unable to use camera for HTML file input type

My problem seems to be very straight forward, yet very confusing. I have a wrapper Xamarin Forms application for my web app. The Xamarin app as expected, is just a WebView rendering the said web application.
On my web app, I have a HTML file input
<input type="file" accept="image/*,application/pdf;capture=camera">
When the webpage is accessed using the web browser (Android/iOS) it works as expected and provides the user with an option to use their camera for the picture. On the iOS version of the Xamarin Forms app, everything seems to be fine with the user still being presented an option to use their camera.
But on the Android version, I cant seem to get it to work. I have added the camera permission <uses-permission android:name="android.permission.CAMERA" /> in the AndroidManifest.xml. Added run time checks to ensure the user either has already or can now agree to giving camera access to the app.
Not sure what I am missing but the camera option does not seem to open up for the Android version. I have seen some articles about WebRTC and using a custom renderer but not sure how and where to processed with those. Any suggestion to get this to work would really help

Deployment of app to device failed

I have Xamarin Live Player up and running.
When I use it with a newly created Xamarin Forms (Master Details) app, it works fine. I see the app on the device.
However, when I try to run my full-blown app, Visual Studio tells me "Deployment to device failed. Make sure that Xamarin Live Player is open and that the device is in the same network."
Since the new app runs fine, I guess something else is the problem.
I've already set the Android project properties to be same as the newly created app.
Just to make sure, I've made it so that my full-blown app requests all rights.
How could I debug more in detail what's going wrong?
Xamarin Live Player can't run all apps. As soon as you use reflection, embedded resources, a MVVM framework or a custom renderer in Xamarin.Forms it might simply just not run the App.
You can read about the limitations of Xamarin Live Player in the official documentation for it.
You will probably have a much better experience just running directly on the device without Live Player.

Xamarin-iOS: host application will not run with share extension

My app setup is a basic new app with default viewController with the default classes for share extension on iOS 11.2.
The host AppDelegate class FinishedLaunching never gets called.
Just shows the launch screen and closes the app.
The sample Xamarin app provided also has the same issue.
Link to the sample app:
Share Extension sample
Any idea whats going wrong?
Do you want to open the app which you created with the share extension, when user clicks the share button to use this share extension? If so, this app should be called Containing App.
But unfortunately, there's no way to do this on iOS8.3+ except Today Extension. From this post we know that:
The intended approach for share extensions is that they handle all of
the necessary work themselves.
Also from the Apple documentation about extension:
An extension’s UI should be simple, restrained, and focused on
facilitating a single task.
Apple doesn't recommend us to open its containing app from extensions, actually it avoids that. If you want to retrieve data in containing app, you can set up an app group so that data can be shared between these two apps.

Can a Xamarin app be updated by downloading an image, CSS, or .js files using WCF service?

Suppose we write a Xamarin MVC application which is deployed to a device and runs connected to the web.
If we need to update the application by downloading some images, CSS, or .js files using WCF service, for example, is that possible?
Does iOS, Android, and Windows allow you to do that?
Thanks
You can not update the app bundle itself on either iOS or Android, and presumably UWP but I am not very familiar with that platform so not sure. For iOS and Android the app bundles are signed so they can not be modified or else the signature will no longer be valid. You can, however, download anything you want and store the downloaded files in the file system. Every app does have a file system it can access to read and write from. See this Xamarin doc:
Forms:
https://developer.xamarin.com/guides/xamarin-forms/working-with/files/
You might also want to look into the PCLStorage plugin:
Xamarin Component: https://components.xamarin.com/view/pclstorage
NuGet: https://www.nuget.org/packages/PCLStorage/
Source: https://github.com/dsplaisted/PCLStorage
(I know I should paste relevant bits from links, but there is just too much to paste and would end up pasting the whole article. If above link is broken, just google "Xamarin working with files")
Note: I work for MS/Xamarin

Do uri addresses vary for different android devices?

I have an App Inventor app that creates a file and then triggers another app (not App Inventor) to read that file using Activity Starter and feeding it the uri:
file:///storage/sdcard0/filename
Would that work on any android device (it works on mine)?
Use the generic path to the file
file:///mnt/sdcard/filename
which will work for all Android devices.

Resources