Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added android studio project in android
- Loading branch information
Showing
248 changed files
with
179,959 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import org.apache.tools.ant.taskdefs.condition.Os | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 'Google Inc.:Google APIs:23' | ||
buildToolsVersion "26.0.2" | ||
useLibrary 'org.apache.http.legacy' | ||
|
||
defaultConfig { | ||
applicationId "foam.crapapppro" | ||
minSdkVersion 10 | ||
targetSdkVersion 14 | ||
|
||
ndk { | ||
moduleName "starwisp-core" | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | ||
} | ||
} | ||
|
||
// call regular ndk-build(.cmd) script from app directory | ||
/* task ndkBuild(type: Exec) { | ||
if (Os.isFamily(Os.FAMILY_WINDOWS)) { | ||
commandLine 'ndk-build.cmd', '-C', file('src/main').absolutePath | ||
} else { | ||
commandLine '/home/dave/opt/android-ndk-r12b/ndk-build', '-C', file('src/main/jni').absolutePath | ||
} | ||
} | ||
tasks.withType(JavaCompile) { | ||
compileTask -> compileTask.dependsOn ndkBuild | ||
} | ||
*/ | ||
externalNativeBuild { | ||
ndkBuild { | ||
path 'src/main/jni/Android.mk' | ||
} | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
// compile 'com.android.support:gridlayout-v7:21.0.3' | ||
// compile files('libs/android-support-v13.jar') | ||
compile 'com.google.android.gms:play-services-maps:9.6.1' | ||
compile 'com.google.android.gms:play-services-places:9.6.0' | ||
//compile 'com.google.maps.android:android-maps-utils:0.4' | ||
// compile files('libs/ouya-sdk.jar') | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="foam.starwisp" | ||
android:versionCode="11" | ||
android:versionName="2.7"> | ||
|
||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-feature android:name="android.hardware.camera" android:required="false"/> | ||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
|
||
<uses-sdk | ||
android:minSdkVersion="9" | ||
android:targetSdkVersion="11" /> | ||
|
||
<application android:label="@string/app_name" | ||
android:icon="@drawable/logo" | ||
android:theme="@style/StarwispTheme" | ||
> | ||
<activity android:name="foam.starwisp.starwisp" | ||
android:noHistory="true" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name="foam.starwisp.CalcActivity"></activity> | ||
<activity android:name="foam.starwisp.NewFieldActivity"></activity> | ||
<activity android:name="foam.starwisp.FieldActivity"></activity> | ||
<activity android:name="foam.starwisp.FieldHistoryActivity"></activity> | ||
<activity android:name="foam.starwisp.FieldCalcActivity"></activity> | ||
<activity android:name="foam.starwisp.CameraActivity"></activity> | ||
<activity android:name="foam.starwisp.EventViewActivity"></activity> | ||
<activity android:name="foam.starwisp.AboutActivity"></activity> | ||
<activity android:name="foam.starwisp.MainActivity"></activity> | ||
<activity android:name="foam.starwisp.EmailActivity"></activity> | ||
<activity android:name="foam.starwisp.ManureActivity"></activity> | ||
|
||
<meta-data | ||
android:name="com.google.android.geo.API_KEY" | ||
android:value="AIzaSyD0e8ExTnpvi-GpIJ0Ct8mW43kzXcGgwmQ"/> | ||
|
||
|
||
</application> | ||
|
||
<supports-screens | ||
android:smallScreens="true" | ||
android:normalScreens="true" | ||
android:largeScreens="true" | ||
android:xlargeScreens="true" | ||
android:resizeable="true" | ||
android:anyDensity="true" /> | ||
|
||
</manifest> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dave@legobrick.6694:1495700014 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
Copyright (c) 2011, Vernon Adams (vern@newtypography.co.uk), | ||
with Reserved Font Name Bevan. | ||
This Font Software is licensed under the SIL Open Font License, Version 1.1. | ||
This license is copied below, and is also available with a FAQ at: | ||
http://scripts.sil.org/OFL | ||
|
||
|
||
----------------------------------------------------------- | ||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 | ||
----------------------------------------------------------- | ||
|
||
PREAMBLE | ||
The goals of the Open Font License (OFL) are to stimulate worldwide | ||
development of collaborative font projects, to support the font creation | ||
efforts of academic and linguistic communities, and to provide a free and | ||
open framework in which fonts may be shared and improved in partnership | ||
with others. | ||
|
||
The OFL allows the licensed fonts to be used, studied, modified and | ||
redistributed freely as long as they are not sold by themselves. The | ||
fonts, including any derivative works, can be bundled, embedded, | ||
redistributed and/or sold with any software provided that any reserved | ||
names are not used by derivative works. The fonts and derivatives, | ||
however, cannot be released under any other type of license. The | ||
requirement for fonts to remain under this license does not apply | ||
to any document created using the fonts or their derivatives. | ||
|
||
DEFINITIONS | ||
"Font Software" refers to the set of files released by the Copyright | ||
Holder(s) under this license and clearly marked as such. This may | ||
include source files, build scripts and documentation. | ||
|
||
"Reserved Font Name" refers to any names specified as such after the | ||
copyright statement(s). | ||
|
||
"Original Version" refers to the collection of Font Software components as | ||
distributed by the Copyright Holder(s). | ||
|
||
"Modified Version" refers to any derivative made by adding to, deleting, | ||
or substituting -- in part or in whole -- any of the components of the | ||
Original Version, by changing formats or by porting the Font Software to a | ||
new environment. | ||
|
||
"Author" refers to any designer, engineer, programmer, technical | ||
writer or other person who contributed to the Font Software. | ||
|
||
PERMISSION & CONDITIONS | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of the Font Software, to use, study, copy, merge, embed, modify, | ||
redistribute, and sell modified and unmodified copies of the Font | ||
Software, subject to the following conditions: | ||
|
||
1) Neither the Font Software nor any of its individual components, | ||
in Original or Modified Versions, may be sold by itself. | ||
|
||
2) Original or Modified Versions of the Font Software may be bundled, | ||
redistributed and/or sold with any software, provided that each copy | ||
contains the above copyright notice and this license. These can be | ||
included either as stand-alone text files, human-readable headers or | ||
in the appropriate machine-readable metadata fields within text or | ||
binary files as long as those fields can be easily viewed by the user. | ||
|
||
3) No Modified Version of the Font Software may use the Reserved Font | ||
Name(s) unless explicit written permission is granted by the corresponding | ||
Copyright Holder. This restriction only applies to the primary font name as | ||
presented to the users. | ||
|
||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font | ||
Software shall not be used to promote, endorse or advertise any | ||
Modified Version, except to acknowledge the contribution(s) of the | ||
Copyright Holder(s) and the Author(s) or with their explicit written | ||
permission. | ||
|
||
5) The Font Software, modified or unmodified, in part or in whole, | ||
must be distributed entirely under this license, and must not be | ||
distributed under any other license. The requirement for fonts to | ||
remain under this license does not apply to any document created | ||
using the Font Software. | ||
|
||
TERMINATION | ||
This license becomes null and void if any of the above conditions are | ||
not met. | ||
|
||
DISCLAIMER | ||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT | ||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | ||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | ||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM | ||
OTHER DEALINGS IN THE FONT SOFTWARE. |
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions
30
android/app/src/main/java/foam/starwisp/AboutActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Starwisp Copyright (C) 2013 Dave Griffiths | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as | ||
// published by the Free Software Foundation, either version 3 of the | ||
// License, or (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
package foam.starwisp; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.content.Context; | ||
|
||
public class AboutActivity extends foam.starwisp.StarwispActivity | ||
{ | ||
@Override | ||
public void onCreate(Bundle savedInstanceState) | ||
{ | ||
m_Name = "about"; | ||
super.onCreate(savedInstanceState); | ||
} | ||
} |
83 changes: 83 additions & 0 deletions
83
android/app/src/main/java/foam/starwisp/ActivityManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Starwisp Copyright (C) 2013 Dave Griffiths | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as | ||
// published by the Free Software Foundation, either version 3 of the | ||
// License, or (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
package foam.starwisp; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.lang.InstantiationException; | ||
import java.lang.IllegalAccessException; | ||
|
||
import android.app.Activity; | ||
import android.support.v4.app.Fragment; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.util.Log; | ||
import android.content.Context; | ||
import android.view.ViewGroup; | ||
import android.view.View; | ||
|
||
public class ActivityManager { | ||
static private HashMap<String,Class> m_Activities; | ||
|
||
static { | ||
m_Activities = new HashMap<String,Class>(); | ||
} | ||
|
||
static public void RegisterActivity(String name, Class actclass) | ||
{ | ||
m_Activities.put(name,actclass); | ||
} | ||
|
||
static public void StartActivity(Activity src, String name, int requestcode, String arg) | ||
{ | ||
Class ActClass = m_Activities.get(name); | ||
if (ActClass == null) | ||
{ | ||
Log.i("starwisp","activity "+name+" not found in registry"); | ||
} | ||
else | ||
{ | ||
Intent intent = new Intent(src,ActClass); | ||
intent.putExtra("arg", arg); | ||
src.startActivityForResult(intent, requestcode); | ||
} | ||
} | ||
|
||
static public void StartActivityGoto(Activity src, String name, String arg) | ||
{ | ||
Class ActClass = m_Activities.get(name); | ||
if (ActClass == null) | ||
{ | ||
Log.i("starwisp","activity "+name+" not found in registry"); | ||
} | ||
else | ||
{ | ||
Intent intent = new Intent(src,ActClass); | ||
intent.putExtra("arg", arg); | ||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | ||
src.startActivity(intent); | ||
} | ||
} | ||
|
||
static public Fragment GetFragment(String name) | ||
{ | ||
StarwispFragment frag = new StarwispFragment(); | ||
frag.m_Name = name; | ||
return frag; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.