User Profile
woodced
Copper Contributor
Joined Aug 08, 2020
User Widgets
Recent Discussions
Serve Byte Data within Blazor-MAUI?
How can I serve custom byte data internally within a Blazor-MAUI desktop app? For instance, I want to serve images that are generated dynamically within the app (ie not by an external web-service) based on some weather-criteria. How would I go about doing this? For e.g. imagine a weather image based on some data: <img src="/img-generator-service?data=576587" /> How would I instantiate a service in the MAUI app that would mimic a webserver serving bytes to localhost? e.g. to host something like: public async Task<byte[]> ImgGeneratorService(string data); //Or in the asp.net core pattern: [HttpGet("img-generator-service") public async Task<IActionResult> Get(string data);519Views0likes0CommentsHow to wire up an Android Share intent in MAUI?
I am trying to setup a Share Intent in MAUI, by adding the share intent to the AndroidManifest.xml file: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" /> <application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"> <activity android:name="SomeLongName.MainActivity" > <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="text/plain" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> </manifest> And then by adding a Name property to the Activity class: [Activity( Name = "SomeLongName.MainActivity" Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)] public class MainActivity : MauiAppCompatActivity { protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); if (Intent.Type == "text/plain") { } } } When I debug the application in MAUI, the app builds correctly and the Output says that the app has deployed. However, in Visual Studio, the debugger fails to run, and there is no evidence of the app on the emulator. Any ideas? Is this a bug, or am I doing something wrong? I also tried to create a separate Activity to handle only the Share intent. The app then debugs, but the base.OnCreate method fails with the following exception: Java.Lang.IllegalStateException: 'The specified child already has a parent. You must call removeView() on the child's parent first.' Here is the separate Activity: [Activity( Name = "SomeLongName.ShareActivity")] public class ShareActivity : MauiAppCompatActivity { protected override void OnCreate(Bundle savedInstanceState) { if (Intent.Type == "text/plain" && Intent.Action == "android.intent.action.SEND") { //handleSendUrl(); } base.OnCreate(savedInstanceState); }3.2KViews0likes1CommentMicrosoft Teams - Cannot Create Connection in Logic App
Hi, I'm trying to create a logic app that posts to my Team when a blob is uploaded to my Azure Blob Storage account. I'm using the Post a message (v3) teams connector in Azure, but it can't log me in with my valid credentials. It says `Please check your accoutn info and/or permissions and try again.` I can't for the life of me find where the appropriate permissions might be in my teams account, though I rather suspect it won't to it with my Personal Microsoft account. Is this the reason? If so, how do I get this to work?Solved4KViews0likes4Comments
Recent Blog Articles
No content to show