Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Termux integration #941

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

github: [7HR4IZ3] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: Thraize # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
159 changes: 76 additions & 83 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,83 +1,76 @@
<?xml version='1.0' encoding='utf-8' ?>
<widget id="com.foxdebug.acode" android-versionCode="936" version="1.9.0"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Acode</name>
<description>
Light weight code editor and web IDE for android.
</description>
<author email="ajit@foxdebug.com" href="https://foxdebug.com">
Foxdebug
</author>
<content src="index.html" />
<access launch-external="yes" origin="*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="http://*/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />

<platform name="android">
<allow-intent href="market:*" />
<preference name="fullscreen" value="false"/>
<preference name="SplashScreen" value="none"/>
<preference name="ShowTitle" value="true"/>
<preference name="DisallowOverscroll" value="true" />
<preference name="BackgroundColor" value="0xFF313131" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="33" />
<preference name="AndroidLaunchMode" value="singleTask" />
<preference name="prerendered-icon" value="false" />
<preference name="androidxEnabled" value="true" />

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:networkSecurityConfig="@xml/network_security_config" />
<application android:hardwareAccelerated="true" />
<application android:requestLegacyExternalStorage="true" />
<application android:largeHeap="true" />
</edit-config>

<config-file parent="./application/activity" target="AndroidManifest.xml">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:mimeType="text/*"/>
<data android:mimeType="xml/*" />
<data android:mimeType="application/text" />
<data android:mimeType="application/xml" />
<data android:mimeType="application/json" />
<data android:mimeType="application/javascript" />
<data android:mimeType="application/x-sh" />
<data android:mimeType="application/octet-stream"/>
<data pathPattern=".*\.txt"/>
<data pathPattern=".*\.xml"/>
<data pathPattern=".*\.json"/>
</intent-filter>
<!-- Allow app to open using url from browser -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="acode" />
</intent-filter>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="com.termux.permission.RUN_COMMAND" /> -->
</config-file>

<hook type="before_prepare" src="hooks/modify-java-files.js" />
<hook type="before_prepare" src="hooks/post-process.js" />
<hook type="before_prepare" src="hooks/copy-resources.js" />
<hook type="before_prepare" src="hooks/move-files.js" />
</platform>
</widget>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.foxdebug.acodefree" android-versionCode="936" version="1.9.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Acode</name>
<description>
Light weight code editor and web IDE for android.
</description>
<author email="ajit@foxdebug.com" href="https://foxdebug.com">
Foxdebug
</author>
<!--<content src="http://localhost:8080/"/>-->
<content src="index.html"/>
<access launch-external="yes" origin="*"/>
<allow-navigation href="https://*/*"/>
<allow-navigation href="http://*/*"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
<platform name="android">
<allow-intent href="market:*"/>
<preference name="fullscreen" value="false"/>
<preference name="SplashScreen" value="none"/>
<preference name="ShowTitle" value="true"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="BackgroundColor" value="0xFF313131"/>
<preference name="AndroidPersistentFileLocation" value="Compatibility"/>
<preference name="android-minSdkVersion" value="22"/>
<preference name="android-targetSdkVersion" value="33"/>
<preference name="AndroidLaunchMode" value="singleTask"/>
<preference name="prerendered-icon" value="false"/>
<preference name="androidxEnabled" value="true"/>
<preference name="gradleVersion" value="7.3.2"/>
<preference name="buildToolsVersion" value="30.0.3"/>
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:networkSecurityConfig="@xml/network_security_config"/>
<application android:hardwareAccelerated="true"/>
<application android:requestLegacyExternalStorage="true"/>
<application android:largeHeap="true"/>
</edit-config>
<config-file parent="./application/activity" target="AndroidManifest.xml">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LAUNCHER"/>
<data android:mimeType="text/*"/>
<data android:mimeType="xml/*"/>
<data android:mimeType="application/text"/>
<data android:mimeType="application/xml"/>
<data android:mimeType="application/json"/>
<data android:mimeType="application/javascript"/>
<data android:mimeType="application/x-sh"/>
<data android:mimeType="application/octet-stream"/>
<data pathPattern=".*\.txt"/>
<data pathPattern=".*\.xml"/>
<data pathPattern=".*\.json"/>
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="acode"/>
</intent-filter>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
</config-file>
<hook type="before_prepare" src="hooks/modify-java-files.js"/>
<hook type="before_prepare" src="hooks/post-process.js"/>
<hook type="before_prepare" src="hooks/copy-resources.js"/>
<hook type="before_prepare" src="hooks/move-files.js"/>
</platform>
</widget>