<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Content Hub from webapp]]></title><description><![CDATA[<p dir="auto">I'm developing a webapp and I'd like to let users export files from my app. I planned to do this using an <code>&lt;a href="data:image/png;base64,..." download="myfile.png"&gt;</code>.</p>
<p dir="auto">I added the <code>"content-hub": "appname-contenthub.json"</code> line in the manifest, set destination, share and source to "all" in that file, and I added the "content_exchange" policy group in the apparmor file.</p>
<p dir="auto">It seems to be the intended way of working because it unlocks the Content Hub, but whenever I download the file and try to share it elsewhere, whenever I tap an external application, it doesn't react.</p>
<p dir="auto">When I check the log, I see these 3 lines whenever I tap an app in the content hub view:</p>
<pre><code>Jun 01 11:07:37 ubuntu-phablet aa-exec[14559]: Dbus error:  QDBusError("org.freedesktop.DBus.Error.AccessDenied", "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.458\" (uid=32011 pid=14559 comm=\"webapp-container --app-id=appname.yourname www/ind\" label=\"appname.yourname_appname_1.0.0 (enforce)\") interface=\"com.lomiri.content.dbus.Transfer\" member=\"Direction\" error name=\"(unset)\" requested_reply=\"0\" destination=\"com.lomiri.content.dbus.Service\" (uid=32011 pid=14637 comm=\"/usr/bin/content-hub-service \" label=\"unconfined\")")
Jun 01 11:07:37 ubuntu-phablet aa-exec[14559]: Dbus error:  QDBusError("org.freedesktop.DBus.Error.AccessDenied", "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.458\" (uid=32011 pid=14559 comm=\"webapp-container --app-id=appname.yourname www/ind\" label=\"appname.yourname_appname_1.0.0 (enforce)\") interface=\"com.lomiri.content.dbus.Transfer\" member=\"SelectionType\" error name=\"(unset)\" requested_reply=\"0\" destination=\"com.lomiri.content.dbus.Service\" (uid=32011 pid=14637 comm=\"/usr/bin/content-hub-service \" label=\"unconfined\")")
Jun 01 11:07:37 ubuntu-phablet aa-exec[14559]: Dbus error:  QDBusError("org.freedesktop.DBus.Error.AccessDenied", "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.458\" (uid=32011 pid=14559 comm=\"webapp-container --app-id=appname.yourname www/ind\" label=\"appname.yourname_appname_1.0.0 (enforce)\") interface=\"com.lomiri.content.dbus.Transfer\" member=\"State\" error name=\"(unset)\" requested_reply=\"0\" destination=\"com.lomiri.content.dbus.Service\" (uid=32011 pid=14637 comm=\"/usr/bin/content-hub-service \" label=\"unconfined\")")
</code></pre>
<p dir="auto">Is this a problem with my app, or an issue with Ubuntu Touch security?</p>
]]></description><link>https://forums.ubports.com/topic/10159/content-hub-from-webapp</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 02:02:49 GMT</lastBuildDate><atom:link href="https://forums.ubports.com/topic/10159.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Jun 2024 15:18:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Content Hub from webapp on Sun, 02 Jun 2024 11:47:58 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/plarde" aria-label="Profile: Plarde">@<bdi>Plarde</bdi></a></p>
<p dir="auto">First of all, you lack permission in the apparmor file.<br />
<code>content_exchange_source</code></p>
<p dir="auto">Then you're not doing anything, so I suppose this is just a simple inheritance from Morph Browser that do not share the file as intended.<br />
I never tried webapp so I don't know how to actually do it, but I guess you'll have to somehow to overload the class in order to specify that you are sharing a picture...</p>
<p dir="auto">You will have to give something to the Content Hub like the code snippet about <code>onExportRequested</code> here: <a href="https://ubports.gitlab.io/docs/api-docs/?p=lomiri-content-qml-api%2Fqml-lomiri-content-contenthub.html#detailed-description" rel="nofollow ugc">https://ubports.gitlab.io/docs/api-docs/?p=lomiri-content-qml-api%2Fqml-lomiri-content-contenthub.html#detailed-description</a></p>
<p dir="auto">You can also try the telegram group if you cannot find more help here on the forum: <a href="https://t.me/UbuntuAppDevEN" rel="nofollow ugc">https://t.me/UbuntuAppDevEN</a></p>
<p dir="auto">Good luck.</p>
]]></description><link>https://forums.ubports.com/post/80448</link><guid isPermaLink="true">https://forums.ubports.com/post/80448</guid><dc:creator><![CDATA[AppLee]]></dc:creator><pubDate>Sun, 02 Jun 2024 11:47:58 GMT</pubDate></item><item><title><![CDATA[Reply to Content Hub from webapp on Sun, 02 Jun 2024 18:04:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/plarde" aria-label="Profile: Plarde">@<bdi>Plarde</bdi></a><br />
I'm glad it worked.</p>
<p dir="auto">Sure, I understand it's easier to start with a basis you master.<br />
I personally forced myself to use pure QML as much as I can to teach me how it works.<br />
And we have people that can help as well as good example to borrow some code.</p>
<p dir="auto">Thanks for your contribution, it's always appreciated.<br />
People usually agree that we need more native apps for Ubuntu Touch.</p>
]]></description><link>https://forums.ubports.com/post/80451</link><guid isPermaLink="true">https://forums.ubports.com/post/80451</guid><dc:creator><![CDATA[AppLee]]></dc:creator><pubDate>Sun, 02 Jun 2024 18:04:01 GMT</pubDate></item><item><title><![CDATA[Reply to Content Hub from webapp on Sun, 02 Jun 2024 17:34:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/applee" aria-label="Profile: AppLee">@<bdi>AppLee</bdi></a> It works! Many, many thanks!</p>
<p dir="auto">For exporting, I will let the user tap the document in the download pop-up, and the webview will handle exporting. I tested it, and it seems to export as intended.</p>
<p dir="auto">I really should switch my app to use QML with a WebView object, but unfortunately I'm not remotely familiar enough with QML to implement it without help.</p>
<p dir="auto">If you (or any passerby) is curious about the app in question, it's here: <a href="https://github.com/Semphriss/Annotate" rel="nofollow ugc">https://github.com/Semphriss/Annotate</a>. I'll upload it to the Open Store in a few days, after fixing the last few rough edges.</p>
<p dir="auto">Thanks again for the help! I'll see if I can switch this thread to a Q&amp;A one so that I can accept your answer.</p>
]]></description><link>https://forums.ubports.com/post/80450</link><guid isPermaLink="true">https://forums.ubports.com/post/80450</guid><dc:creator><![CDATA[Plarde]]></dc:creator><pubDate>Sun, 02 Jun 2024 17:34:47 GMT</pubDate></item><item><title><![CDATA[Reply to Content Hub from webapp on Sun, 02 Jun 2024 11:47:58 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/plarde" aria-label="Profile: Plarde">@<bdi>Plarde</bdi></a></p>
<p dir="auto">First of all, you lack permission in the apparmor file.<br />
<code>content_exchange_source</code></p>
<p dir="auto">Then you're not doing anything, so I suppose this is just a simple inheritance from Morph Browser that do not share the file as intended.<br />
I never tried webapp so I don't know how to actually do it, but I guess you'll have to somehow to overload the class in order to specify that you are sharing a picture...</p>
<p dir="auto">You will have to give something to the Content Hub like the code snippet about <code>onExportRequested</code> here: <a href="https://ubports.gitlab.io/docs/api-docs/?p=lomiri-content-qml-api%2Fqml-lomiri-content-contenthub.html#detailed-description" rel="nofollow ugc">https://ubports.gitlab.io/docs/api-docs/?p=lomiri-content-qml-api%2Fqml-lomiri-content-contenthub.html#detailed-description</a></p>
<p dir="auto">You can also try the telegram group if you cannot find more help here on the forum: <a href="https://t.me/UbuntuAppDevEN" rel="nofollow ugc">https://t.me/UbuntuAppDevEN</a></p>
<p dir="auto">Good luck.</p>
]]></description><link>https://forums.ubports.com/post/80448</link><guid isPermaLink="true">https://forums.ubports.com/post/80448</guid><dc:creator><![CDATA[AppLee]]></dc:creator><pubDate>Sun, 02 Jun 2024 11:47:58 GMT</pubDate></item><item><title><![CDATA[Reply to Content Hub from webapp on Sun, 02 Jun 2024 04:21:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/applee" aria-label="Profile: AppLee">@<bdi>AppLee</bdi></a> Hey, thanks for checking!</p>
<p dir="auto">Here's a basic reproducible project: <a href="https://gitlab.com/Semphriss/ut-webapp-contenthub" rel="nofollow ugc">https://gitlab.com/Semphriss/ut-webapp-contenthub</a></p>
<p dir="auto">The first commit is a basic project as generated by Clickable, all the defaults except the project type set to HTML. I did not change any file.</p>
<p dir="auto">The second commit is the basic steps I followed to attempt to make it work, which will give the same behavior as I described.</p>
]]></description><link>https://forums.ubports.com/post/80445</link><guid isPermaLink="true">https://forums.ubports.com/post/80445</guid><dc:creator><![CDATA[Plarde]]></dc:creator><pubDate>Sun, 02 Jun 2024 04:21:18 GMT</pubDate></item><item><title><![CDATA[Reply to Content Hub from webapp on Sat, 01 Jun 2024 21:34:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/plarde" aria-label="Profile: Plarde">@<bdi>Plarde</bdi></a></p>
<p dir="auto">Do you have a repository we can access to see your code and try to help?<br />
What comes to mind is probably an issue with the file path or an issue in the apparmor file...</p>
<p dir="auto">I have no direct experience with the Content Hub but I know that filepath can be confusing...</p>
]]></description><link>https://forums.ubports.com/post/80441</link><guid isPermaLink="true">https://forums.ubports.com/post/80441</guid><dc:creator><![CDATA[AppLee]]></dc:creator><pubDate>Sat, 01 Jun 2024 21:34:16 GMT</pubDate></item></channel></rss>