语言

Menu
Sites
Language
Visual Studio 2017 Multi-App Package
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.foxlovesyou.Censored" version="0.1.0" api-version="4" xmlns="http://tizen.org/ns/packages">
    <author email="Censored@gmail.com">FoxLovesYou</author>
    <profile name="wearable" />
    <service-application appid="com.foxlovesyou.Censored.Service" exec="Service.dll" multiple="false" nodisplay="true" taskmanage="false" type="dotnet">
        <label>Service</label>
        <icon>Service.png</icon>
        <splash-screens />
    </service-application>
    <ui-application appid="com.foxlovesyou.Censored.App" exec="App.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
      <label>Censored</label>
      <icon>Censored.png</icon>
      <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
      <metadata key="HeartRate" value="0" />
      <splash-screens />
    </ui-application>
    <widget-application appid="com.foxlovesyou.Censored.Widget" exec="Widget.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
      <label>Widget</label>
      <icon>FoxMC.png</icon>
      <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
      <support-size preview="Widget.png">2x2</support-size>
      <splash-screens />
    </widget-application>
    <shortcut-list />
    <privileges>
      <privilege>http://tizen.org/privilege/healthinfo</privilege>
      <privilege>http://tizen.org/privilege/externalstorage.appdata</privilege>
    </privileges>
    <provides-appdefined-privileges />
    <feature name="http://tizen.org/feature/sensor.heart_rate_monitor">true</feature>
    <feature name="http://tizen.org/feature/sensor.pedometer">true</feature>
</manifest>

Attempting to combine a UI-Application, Service, and Widget as a packaged application in Visual Studio 2017. Following instrcutions at https://github.com/Samsung/build-task-tizen/blob/master/doc/tizen.net.sdk-packaging-multiapp.md 

 

  • Created a new Xamarin.Forms Blank App (currently, new Service App)
  • Added Project References
  • Added Project Dependencies
  • Added File References to App.dll, Service.dll, Widget.dll (and set copy to directory)
  • Manually copied RES and SHARED
  • Manually modified the Manifest to merge the different application types and requested priviledges
  • Rebuild Solution & Debug
  • ...
  • Locks at "Initializing Debugger", no error messages, no response on emulator

Running the App, Widget, or Service individually works fine. All apps "package" id's match. All App-ID's are unique subsets of the package id. I've also tried converting the Service to act as the multi-package app, tried using priviledges and features directing to the app name (as exampled in the github page), tried making individual Project Dependencies, tried adjusting the Build Order. Nothing seems to get me any closer.

  • Emulator: Wearable Circle - wearable-4.0-circl-x86 360x360
  • IDE: Visual Studio 2017
  • TIZEN_SDK_VERSION: 3.7
  • Target Version: Tizen 4.0

响应

2 回复
Tizen .NET

Hi,
Among the things you list up,

Added Project Dependencies
Added File References to App.dll, Service.dll, Widget.dll (and set copy to directory)
Manually copied RES and SHARED
Manually modified the Manifest to merge the different application types and requested priviledges

the above mentioned seems unnecessary.
Adding refereces of ServiceApp & WidgetApp to UI app project is enough.
(After rebuilding your app, you can see the updated tizen-manifest.xml file in <UI App>/bin/Release/tizen40/tpkroot directory.)
Regarding this issue
    Locks at "Initializing Debugger", no error messages, no response on emulator
I can't figure out exactly what the issue is, but looking at the manifest file you shared, it seems that the widget app's manifest file is incorrect.
Please check the technical blog related to the widget below.
https://developer.samsung.com/tizen/blog/en-us/2019/12/02/build-a-widget-for-galaxy-watch
In particular, please pay attention to tizen-manifest.xml file.

    <widget-application appid="com.foxlovesyou.Censored.Widget" exec="Widget.dll" type="dotnet" update-period="0" >
      <label>Widget</label>
      <icon>FoxMC.png</icon>
      <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
      <support-size preview="Widget.png">2x2</support-size>
      <splash-screens />
    </widget-application>

We hope the problem will be solved.
Please let us know if the issue still persists.

BTW, using VS2019 is recommended.

James Wolf
  • Tried making the changes to the Multi-App manifest - Same Failure

  • Tried moving all the references to the Censored.App - Same Failure

 

Tried reverting the Manifest to JUST the App in the App, JUST the Service in the Service, and JUST the Widget in the Widget (no multi-app manifest) - Success

 

Solution in detail:

  • Create a Xamarin based project
  • Create a Xamarin based Service (or Widget, or combination)
  • Edit each Manifest to share a Package, and ensure each AppId is a subset (com.author.package.subset)
  • Right Click Dependencies under your main app, Add Reference
  • Add a Reference for each Multi-Packaged app, widget, and service
  • Rebuild
  • Profit

I was under the impression that if it didn't show up in the emulator's Control Panel > App Manager, it wasn't installed. As shown by the App AND Widget existing, this was a misunderstanding. The App Manager will only show the Package ID

 

Much appreciated, been slamming my head against my desk for a week trying to figure this out.