m4gr3d / Godot-Android-Samples

Collection of Godot Android plugins
MIT License
43 stars 6 forks source link

Confusion while creating static shortcuts in my Godot game #18

Closed BraveEvidence closed 9 months ago

BraveEvidence commented 9 months ago

To create a static shortcuts I have added shortcuts.xml in my xml folder and the xml folder is in res folder

Below is the code for shortcuts.xml

<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
    <shortcut
        android:shortcutId="static"
        android:enabled="true"
        android:icon="@drawable/splash"
        android:shortcutShortLabel="@string/short_label"
        android:shortcutLongLabel="@string/long_label"
        android:shortcutDisabledMessage="@string/disabled_message">
        <intent
            android:action="android.intent.action.VIEW"
            android:targetPackage="com.codingwithnobody.myandroidprojct"
            android:targetClass="com.codingwithnobody.myandroidprojct.GodotApp">
            <extra android:name="shortcut_id" android:value="static" />
        </intent>

    </shortcut>
</shortcuts>

I have few questions

  1. Should I create a separate plugin for static shortcuts and just write my code in the android folder of my Godot game which is generated by installing the android build template from Godot?
  2. For android:targetClass what should be the activity name, currently have written GodotApp but GodotApp is present in com.godot.game so not sure what is the entry point activity?
  3. Is it even possible to create static shortcut for godot at this moment?
  4. If I write my code in the android folder of my Godot game instead of a separate plugin, the moment I update Godot I need to update the android build template as well which in turn override my static shortcut code?
m4gr3d commented 9 months ago

@BraveEvidence Closing this issue as this is more of an Android question rather than a Godot question. Also I don't see how this issue relates to this repo.