|
@@ -173,6 +173,56 @@ def change(app_id: str, platform: str, mode: str, path_dest: str, features: dict
|
|
|
f.write(indented_str(3, "// API.openOptionsStreaming();"))
|
|
|
f.write(indented_str(3, "// return true;"))
|
|
|
f.write(indented_str(2, "// }"))
|
|
|
+ if features["custom_url"]["status"]:
|
|
|
+ f.write(indented_str(2, "if (id == R.id.action_custom_url) {"))
|
|
|
+ f.write(indented_str(3, "API.openCustomURL();"))
|
|
|
+ f.write(indented_str(3, "return true;"))
|
|
|
+ f.write(indented_str(2, "}"))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, "// if (id == R.id.action_custom_url) {"))
|
|
|
+ f.write(indented_str(3, "// API.openCustomURL();"))
|
|
|
+ f.write(indented_str(3, "// return true;"))
|
|
|
+ f.write(indented_str(2, "// }"))
|
|
|
+ if features["xapps"]["status"]:
|
|
|
+ f.write(indented_str(2, "if (id == R.id.action_xapps) {"))
|
|
|
+ f.write(indented_str(3, "API.openExternalApps();"))
|
|
|
+ f.write(indented_str(3, "return true;"))
|
|
|
+ f.write(indented_str(2, "}"))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, "// if (id == R.id.action_xapps) {"))
|
|
|
+ f.write(indented_str(3, "// API.openExternalApps();"))
|
|
|
+ f.write(indented_str(3, "// return true;"))
|
|
|
+ f.write(indented_str(2, "// }"))
|
|
|
+ if features["conpost"]["status"]:
|
|
|
+ f.write(indented_str(2, "if (id == R.id.action_conpost) {"))
|
|
|
+ f.write(indented_str(3, "API.openUserGeneratedContent();"))
|
|
|
+ f.write(indented_str(3, "return true;"))
|
|
|
+ f.write(indented_str(2, "}"))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, "// if (id == R.id.action_conpost) {"))
|
|
|
+ f.write(indented_str(3, "// API.openUserGeneratedContent();"))
|
|
|
+ f.write(indented_str(3, "// return true;"))
|
|
|
+ f.write(indented_str(2, "// }"))
|
|
|
+ if features["ppob"]["status"]:
|
|
|
+ f.write(indented_str(2, "if (id == R.id.action_ppob) {"))
|
|
|
+ f.write(indented_str(3, "API.openPPOB();"))
|
|
|
+ f.write(indented_str(3, "return true;"))
|
|
|
+ f.write(indented_str(2, "}"))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, "// if (id == R.id.action_ppob) {"))
|
|
|
+ f.write(indented_str(3, "// API.openPPOB();"))
|
|
|
+ f.write(indented_str(3, "// return true;"))
|
|
|
+ f.write(indented_str(2, "// }"))
|
|
|
+ if features["wallet"]["status"]:
|
|
|
+ f.write(indented_str(2, "if (id == R.id.action_wallet) {"))
|
|
|
+ f.write(indented_str(3, "API.openWallet();"))
|
|
|
+ f.write(indented_str(3, "return true;"))
|
|
|
+ f.write(indented_str(2, "}"))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, "// if (id == R.id.action_wallet) {"))
|
|
|
+ f.write(indented_str(3, "// API.openWallet();"))
|
|
|
+ f.write(indented_str(3, "// return true;"))
|
|
|
+ f.write(indented_str(2, "// }"))
|
|
|
if features["social_commerce"]["status"]:
|
|
|
f.write(indented_str(2, "if (id == R.id.action_social_commerce) {"))
|
|
|
f.write(indented_str(3, "API.openSocialCommerce();"))
|
|
@@ -183,6 +233,16 @@ def change(app_id: str, platform: str, mode: str, path_dest: str, features: dict
|
|
|
f.write(indented_str(3, "// API.openSocialCommerce();"))
|
|
|
f.write(indented_str(3, "// return true;"))
|
|
|
f.write(indented_str(2, "// }"))
|
|
|
+ if features["news_update"]["status"]:
|
|
|
+ f.write(indented_str(2, "if (id == R.id.action_news_update) {"))
|
|
|
+ f.write(indented_str(3, "API.openNewsUpdate();"))
|
|
|
+ f.write(indented_str(3, "return true;"))
|
|
|
+ f.write(indented_str(2, "}"))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, "// if (id == R.id.action_news_update) {"))
|
|
|
+ f.write(indented_str(3, "// API.openNewsUpdate();"))
|
|
|
+ f.write(indented_str(3, "// return true;"))
|
|
|
+ f.write(indented_str(2, "// }"))
|
|
|
if features["contact_list"]["status"]:
|
|
|
f.write(indented_str(2, "if (id == R.id.action_contact_list) {"))
|
|
|
f.write(indented_str(3, "API.openConversation();"))
|
|
@@ -571,6 +631,76 @@ def change(app_id: str, platform: str, mode: str, path_dest: str, features: dict
|
|
|
f.write(indented_str(2, 'android:title="Streaming"'))
|
|
|
f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
|
|
|
n = n + 1
|
|
|
+ if features["custom_url"]["status"]:
|
|
|
+ f.write(indented_str(1, "<item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_custom_url"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title=Custom URL"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" />'))
|
|
|
+ n = n + 1
|
|
|
+ else:
|
|
|
+ f.write(indented_str(1, "<!-- <item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_custom_url"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title="Custom URL"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
|
|
|
+ n = n + 1
|
|
|
+ if features["xapps"]["status"]:
|
|
|
+ f.write(indented_str(1, "<item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_xapps"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title=External Apps"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" />'))
|
|
|
+ n = n + 1
|
|
|
+ else:
|
|
|
+ f.write(indented_str(1, "<!-- <item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_xapps"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title=External Apps"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
|
|
|
+ n = n + 1
|
|
|
+ if features["conpost"]["status"]:
|
|
|
+ f.write(indented_str(1, "<item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_conpost"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title=User Generated Content"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" />'))
|
|
|
+ n = n + 1
|
|
|
+ else:
|
|
|
+ f.write(indented_str(1, "<!-- <item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_conpost"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title=User Generated Content"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
|
|
|
+ n = n + 1
|
|
|
+ if features["ppob"]["status"]:
|
|
|
+ f.write(indented_str(1, "<item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_ppob"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title="PPOB Agent"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" />'))
|
|
|
+ n = n + 1
|
|
|
+ else:
|
|
|
+ f.write(indented_str(1, "<!-- <item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_ppob"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title="PPOB Agent"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
|
|
|
+ n = n + 1
|
|
|
+ if features["wallet"]["status"]:
|
|
|
+ f.write(indented_str(1, "<item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_wallet"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title="Wallet"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" />'))
|
|
|
+ n = n + 1
|
|
|
+ else:
|
|
|
+ f.write(indented_str(1, "<!-- <item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_wallet"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title="Wallet"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
|
|
|
+ n = n + 1
|
|
|
if features["social_commerce"]["status"]:
|
|
|
f.write(indented_str(1, "<item"))
|
|
|
f.write(indented_str(2, 'android:id="@+id/action_social_commerce"'))
|
|
@@ -585,6 +715,20 @@ def change(app_id: str, platform: str, mode: str, path_dest: str, features: dict
|
|
|
f.write(indented_str(2, 'android:title="Social Commerce"'))
|
|
|
f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
|
|
|
n = n + 1
|
|
|
+ if features["news_update"]["status"]:
|
|
|
+ f.write(indented_str(1, "<item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_news_update"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title="News & Update"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" />'))
|
|
|
+ n = n + 1
|
|
|
+ else:
|
|
|
+ f.write(indented_str(1, "<!-- <item"))
|
|
|
+ f.write(indented_str(2, 'android:id="@+id/action_news_update"'))
|
|
|
+ f.write(indented_str(2, f'android:orderInCategory="{n}"'))
|
|
|
+ f.write(indented_str(2, 'android:title="News & Update"'))
|
|
|
+ f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
|
|
|
+ n = n + 1
|
|
|
if features["contact_list"]["status"]:
|
|
|
f.write(indented_str(1, "<item"))
|
|
|
f.write(indented_str(2, 'android:id="@+id/action_contact_list"'))
|