Skip to content

Commit

Permalink
Initial Commit Source code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Abidhusain Wecobi committed Jan 1, 2018
0 parents commit cb0866c
Show file tree
Hide file tree
Showing 29 changed files with 1,021 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="android/src"/>
<classpathentry kind="src" path="android/build/.apt_generated"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 8 [1.8.0_131]"/>
<classpathentry kind="lib" path="/Volumes/Macintosh-Data/Android/SDK/platforms/android-23/android.jar"/>
<classpathentry kind="lib" path="/Users/ifox/Library/Application Support/Titanium/mobilesdk/osx/7.0.1.GA/android/titanium.jar"/>
<classpathentry kind="lib" path="/Users/ifox/Library/Application Support/Titanium/mobilesdk/osx/7.0.1.GA/android/kroll-common.jar"/>
<classpathentry kind="lib" path="/Users/ifox/Library/Application Support/Titanium/mobilesdk/osx/7.0.1.GA/android/kroll-apt.jar"/>
<classpathentry kind="src" path=".apt_generated">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/Volumes/Macintosh-Data/Android/SDK/extras/android/compatibility/v4/android-support-v4.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

29 changes: 29 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tiexplorer</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.appcelerator.titanium.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.appcelerator.titanium.mobile.module.nature</nature>
<nature>com.aptana.projects.webnature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions .settings/com.aptana.editor.common.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
selectUserAgents=com.appcelerator.titanium.mobile.module.nature\:android
7 changes: 7 additions & 0 deletions .settings/org.eclipse.jdt.apt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Thu Sep 02 15:18:34 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=.apt_generated
org.eclipse.jdt.apt.reconcileEnabled=true

org.eclipse.jdt.apt.processorOptions/kroll.jsonFile=tiexplorer.json
3 changes: 3 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Thu Sep 02 15:18:34 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.processAnnotations=enabled
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Place your change log text here. This file will be incorporated with your app at package time.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Wecobi|Abidhusain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Wecobi|Abidhusain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# TiExplorer Module

The TiExplorer module enables you to read files from Internal/External storage and save in your application specific folder which you selected.

This project can be found on github at [https://github.com/wecobi/TiExplorer](here).

##Before you start

* This is an Android module designed to work with Titanium SDK 7.0.0 or greater.

##Accessing the TiExplorer Module

To access this module from JavaScript, you would do the following:
<pre><code>
var TiExplorer = require("ti.explorer");
</pre></code>

###Method

###*selectFile

<pre><code>
TiExplorer.selectFile({
mimeType: "application/vnd.ms-excel",
location: TiExplorer.EXTERNAL_STORAGE,
onSuccess: function(e) {
if(e.status == TiExplorer.EXTERNAL_STORAGE) {
// Success Received
var fileObj = file || null;
if(fileObj != null) {
alert("File Created Successfully!");
}
}
},
onError: function(e) {
Ti.API.info("onError>>>> " + JSON.stringify(e));
}
});
</pre></code>

You can create an request for SelectFile using below properties

*<b>mimeType</b> (Optional) (String) MimeType of file you want to read. (Default, */*)
*<b>location</b> (Optional) (Constant) TiExplorer Defined Constant used to give location of file. (Default, <span>CACHE_DIRECTORY</span>)
*<b>onSuccess</b> (Required) (Function) Successful response, then you can get response in here.
*<b>onSuccess</b> (Required) (Function) An Error response you get here.

###Constant

###*Result Response status
<pre><code>RESULT_OK</pre></code>
<pre><code>RESULT_CANCELED</pre></code>
<pre><code>RESULT_ERROR</pre></code>

###*Storage location
<pre><code>EXTERNAL_STORAGE</pre></code>
<pre><code>CACHE_DIRECTORY</pre></code>
<pre><code>DATA_DIRECTORY</pre></code>
<pre><code>EXTERNAL_CACHE_DIRECTORY</pre></code>

##Author
*Abidhusain Chidi
*[mailto:abidhusain.wecobi@gmail.com](abidhusain.wecobi@gmail.com)

##Licensing & Support

This project is licensed under the MIT approved License. For details please see the license associated with each project.
Binary file added android/.DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions android/Resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Files in this folder are copied directory into the compiled product directory
when the Android app is compiled:

<project-dir>/build/android/bin/assets/Resources/

Files in this directory are copied directly on top of whatever files are already
in the build directory, so please be careful that your files don't clobber
essential project files or files from other modules.
3 changes: 3 additions & 0 deletions android/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
titanium.platform=/Users/ifox/Library/Application Support/Titanium/mobilesdk/osx/7.0.1.GA/android
android.platform=/Volumes/Macintosh-Data/Android/SDK/platforms/android-23
google.apis=/Volumes/Macintosh-Data/Android/SDK/add-ons/addon-google_apis-google-23
56 changes: 56 additions & 0 deletions android/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<project name="tiexplorer" default="dist">
<description>
Ant build script for Titanium Android module tiexplorer
</description>

<property name="ti.module.root" location="${basedir}"/>
<property file="build.properties" />

<!-- Make sure 'architectures' is in manifest file -->
<property file="${ti.module.root}/manifest" prefix="manifest"/>
<fail message="Missing required manifest key 'architectures'.">
<condition>
<not>
<isset property="manifest.architectures"/>
</not>
</condition>
</fail>

<fail message="Manifest key 'architectures' has no value.">
<condition>
<not>
<length string="${manifest.architectures}" trim="true" when="greater" length="0"/>
</not>
</condition>
</fail>

<!-- Copy documentation subdirectories -->
<mkdir dir="${basedir}/documentation"/>
<copy todir="${basedir}/documentation">
<fileset dir="${basedir}/../documentation"/>
</copy>

<!-- Copy example subdirectories -->
<mkdir dir="${basedir}/example"/>
<copy todir="${basedir}/example">
<fileset dir="${basedir}/../example"/>
</copy>

<!-- Copy assets subdirectories -->
<mkdir dir="${basedir}/assets"/>
<copy todir="${basedir}/assets">
<fileset dir="${basedir}/../assets"/>
</copy>

<!-- Copy license -->
<copy todir="${basedir}" file="${basedir}/../LICENSE"/>

<target name="cleancopy" description="Delete old copies">
<delete dir="${basedir}/documentation"/>
<delete dir="${basedir}/example"/>
<delete dir="${basedir}/assets"/>
<delete file="${basedir}/LICENSE"/>
</target>

<import file="${titanium.platform}/../module/android/build.xml"/>
</project>
Binary file added android/dist/ti.explorer-android-1.0.0.zip
Binary file not shown.
Binary file added android/dist/tiexplorer.jar
Binary file not shown.
9 changes: 9 additions & 0 deletions android/java-sources.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/src/ti/explorer/ExampleProxy.java"
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/src/ti/explorer/TiexplorerModule.java"
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/build/generated/java/ti/explorer/TiexplorerBootstrap.java"
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/build/generated/r/android/support/compat/R.java"
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/build/generated/r/android/support/design/R.java"
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/build/generated/r/android/support/v7/appcompat/R.java"
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/build/generated/r/android/support/v7/cardview/R.java"
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/build/generated/r/ti/explorer/R.java"
"/Users/ifox/Documents/Workspace/Axway/tiexplorer/android/build/generated/r/ti/modules/titanium/ui/R.java"
2 changes: 2 additions & 0 deletions android/lib/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
You can place any .jar dependencies in this directory and they will be included
when your module is being compiled.
Binary file added android/libs/arm64-v8a/libti.explorer.so
Binary file not shown.
Binary file added android/libs/armeabi-v7a/libti.explorer.so
Binary file not shown.
Binary file added android/libs/x86/libti.explorer.so
Binary file not shown.
18 changes: 18 additions & 0 deletions android/manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 1.0.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86
description: Use for Select file from Internal or External Storage and returns the TiFile Object.
author: Abidhusain Chidi
license: MIT License
copyright: © 2017, Wecobi

# these should not be edited
name: tiexplorer
moduleid: ti.explorer
guid: 37a4ebae-775c-4301-9b1d-f5a5a4a2be29
platform: android
minsdk: 7.0.1.GA
10 changes: 10 additions & 0 deletions android/platform/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Files in this folder are copied directory into the Android build directory
when the Android app is compiled:

<project-dir>/build/android

You can place files such as res strings or drawable files.

Files in this directory are copied directly on top of whatever files are already
in the build directory, so please be careful that your files don't clobber
essential project files or files from other modules.
Loading

0 comments on commit cb0866c

Please sign in to comment.