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

Can not work on Android 5.0 #96

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
944aa2f
Changes to compile project localy
kubrin Apr 8, 2015
5ca6f89
Required permission to get WiFi state change notification added.
kubrin Apr 11, 2015
e910a0e
Ability to view flight in Google Earth is supported.
kubrin Apr 19, 2015
2b63c5d
Ability to save tracks from external IGC files in Gaggle list is added.
kubrin Apr 29, 2015
c7df5d2
Ability to correct track's altitude from Google map service or manual…
kubrin Apr 29, 2015
9ab86d5
String.xml fixed
kubrin Apr 29, 2015
13b0c5c
Save external file to Gaggle list asynchronously.
kubrin Apr 30, 2015
1aa5572
IGC import fixed. The date corrected, max and avg speed imported.
kubrin Dec 27, 2015
946283a
Additional symmary elements added to the list
kubrin Dec 28, 2015
d544c1a
Draw dhadow made optional
kubrin Dec 28, 2015
afe8720
IGC reader fixed
kubrin Dec 28, 2015
afc8f8a
Use InfoField cache is disabled. Because InfoField can be used in dif…
kubrin Dec 31, 2015
f33b120
Use InfoView cache again but reconnest it with setOnChanged
kubrin Dec 31, 2015
f50373e
Zoom map to level 10
kubrin Dec 31, 2015
dd044ad
BUG: Divide by zero error fixed
kubrin Jan 26, 2016
39d8924
GPS altitude is used on IGC import if possible
kubrin Feb 8, 2016
0a1212f
Usage od Skylines live tracking fixed
kubrin Feb 8, 2016
15d5228
Move to supported map. Track width set to 6.
kubrin Dec 20, 2016
adb4bce
Unregister shared
kubrin Dec 21, 2016
cf4d3c0
Add shared as a part of project
kubrin Dec 21, 2016
19243ad
My experimts with track colors
kubrin Dec 23, 2016
822e2bd
Moved to Android Studio
kubrin Jan 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .classpath

This file was deleted.

39 changes: 35 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
/geeksville-release-key.keystore
*.orig
*~
# Built application files
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
AndroidManifest.out.*
gen/

# Gradle files
.gradle/
build/
/*/build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Idea
*.iml
*.ipr
*.iws
.idea/
out/

# Mac
.DS_Store
Thumbs.db
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

33 changes: 0 additions & 33 deletions .project

This file was deleted.

19 changes: 0 additions & 19 deletions README

This file was deleted.

25 changes: 25 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "28.0.3"

defaultConfig {
applicationId "com.geeksville.gaggle"
minSdkVersion 9
targetSdkVersion 9
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
implementation files('libs/FlurryAgent.jar')
implementation files('libs/osmdroid-android-1.08.jar')
implementation files('libs/slf4j-android-1.5.8.jar')
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 11 additions & 7 deletions AndroidManifest.xml → app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!-- Regular release uses com.geeksville.gaggle, testing builds use com.geeksville.gaggletest -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.geeksville.gaggle" android:installLocation="auto" android:versionCode="165" android:versionName="1.65">
Expand All @@ -7,11 +8,10 @@
android:normalScreens="true" android:largeScreens="true"
android:anyDensity="true" />

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9" />


<application android:icon="@drawable/icon" android:label="@string/app_name"
android:description="@string/app_description" android:name="com.geeksville.gaggle.GaggleApplication"
android:theme="@android:style/Theme.NoTitleBar" android:debuggable="false"> <!-- "@android:style/Theme.Light.NoTitleBar" -->
android:theme="@android:style/Theme.NoTitleBar"> <!-- "@android:style/Theme.Light.NoTitleBar" -->

<meta-data android:name="CLOUDMADE_KEY" android:value="683f9355fa964a70bcde43fe4a420de2" />

Expand Down Expand Up @@ -44,17 +44,17 @@
<activity android:name=".AboutActivity"></activity>
<activity android:name=".SummaryListActivity"></activity>
<activity android:name=".ListWaypointsActivity">

<!--
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<!--
Frequently gmail attachments have this as the only known mime type
-->
<data android:scheme="content" android:mimeType="application/octet-stream" />

</intent-filter>
-->

<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand Down Expand Up @@ -157,7 +157,11 @@

<!-- Required permission to use in-app billing. -->
<uses-permission android:name="com.android.vending.BILLING" />



<!-- Required permission to get WiFu state change notification. -->
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

<!--
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$FormatGEO
POTLAU N 39 20 26.31 W 122 41 06.88 1040 POTATO LAUNCH
POTLZ N 39 20 58.64 W 122 39 43.38 518 POTATO LZ
TOP N 39 20 05.59 W 122 41 52.83 1073 POTATO TOP
TROUGH N 39 20 58.87 W 122 38 47.79 775 TROUGH SPUR
$FormatGEO
POTLAU N 39 20 26.31 W 122 41 06.88 1040 POTATO LAUNCH
POTLZ N 39 20 58.64 W 122 39 43.38 518 POTATO LZ
TOP N 39 20 05.59 W 122 41 52.83 1073 POTATO TOP
TROUGH N 39 20 58.87 W 122 38 47.79 775 TROUGH SPUR

File renamed without changes.
146 changes: 146 additions & 0 deletions app/src/main/java/com/geeksville/android/AndroidUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
/*******************************************************************************
* Gaggle is Copyright 2010 by Geeksville Industries LLC, a California limited liability corporation.
*
* Gaggle is distributed under a dual license. We've chosen this approach because within Gaggle we've used a number
* of components that Geeksville Industries LLC might reuse for commercial products. Gaggle can be distributed under
* either of the two licenses listed below.
*
* 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 General Public License for more details.
*
* Commercial Distribution License
* If you would like to distribute Gaggle (or portions thereof) under a license other than
* the "GNU General Public License, version 2", contact Geeksville Industries. Geeksville Industries reserves
* the right to release Gaggle source code under a commercial license of its choice.
*
* GNU Public License, version 2
* All other distribution of Gaggle must conform to the terms of the GNU Public License, version 2. The full
* text of this license is included in the Gaggle source, see assets/manual/gpl-2.0.txt.
******************************************************************************/
package com.geeksville.android;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.StreamCorruptedException;
import java.net.URL;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import android.content.Context;
import android.net.Uri;
import android.os.Build;

public class AndroidUtil {
/**
*
* @return True if we are running on the emulator
*/
public static boolean isEmulator() {
return Build.MODEL.equals("google_sdk");
}

static private boolean hasContactsContract;

static private boolean hasNewSmsAPI;

static {
try {
Class.forName("android.provider.ContactsContract");
hasContactsContract = true;
} catch (Exception ex) {
// ignore
}

try {
Class.forName("android.telephony.SmsMessage");
hasNewSmsAPI = true;
} catch (Exception ex) {
// ignore
}

}

/**
* is the ContactsContract API implemented?
*
* @return
*/
public static boolean isContactsContractAvailable() {
return hasContactsContract;
}

/**
* is the the new (post GSM only) API implemented?
*
* @return
*/
public static boolean isNewSmsAPI() {
return hasNewSmsAPI;
}

/**
* Generate an input stream reading from an android URI
*
* @param uri
* @return
* @throws IOException
*/
public static InputStream getFromURI(Context context, Uri uri) throws IOException {

if (uri.getScheme().equals("content"))
return context.getContentResolver().openInputStream(uri);
else if (uri.getScheme().equals("file")) {
URL url = new URL(uri.toString());

return url.openStream();
} else {
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(uri.toString());
HttpResponse response = httpclient.execute(httpget);
HttpEntity entity = response.getEntity();
if (entity != null)
return entity.getContent();
else
throw new IOException("No HTTP response");
// Use the regular java stuff
// URL url = new URL(uri.toString());

// return url.openStream();
}
}

/**
* Get a stream that can be used for serialization
*
* @param context
* We'll write our data to this context private dir
* @param name
* @return
* @throws IOException
*/
public static ObjectOutputStream writeObjectStream(Context context, String name)
throws IOException {
OutputStream s = context.openFileOutput(name, Context.MODE_PRIVATE);

// I'd prefer to not overwrite the old file, but Context doesn't offer a
// fileRename option
return new ObjectOutputStream(s);
}

public static ObjectInputStream readObjectStream(Context context, String name)
throws StreamCorruptedException,
IOException {
InputStream s = context.openFileInput(name);

// FIXME - add buffering?
return new ObjectInputStream(s);
}
}
Loading