Skip to content
Snippets Groups Projects
Commit 7df8cdc4 authored by Arutsudar's avatar Arutsudar
Browse files

First commit

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 1108 additions and 0 deletions
# Changelog
4/05/17
* Bug Fixes
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="FancyPlaces-master" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
This diff is collapsed.
Save Visited Places on map, and also
add an image of your place representing it and store some notes.
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
<orderEntry type="library" exported="" name="slf4j-api-1.6.1" level="project" />
<orderEntry type="library" exported="" name="floatingactionbutton-1.3.0" level="project" />
<orderEntry type="library" exported="" name="support-compat-25.3.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-25.3.0" level="project" />
<orderEntry type="library" exported="" name="osmdroid-android-4.3" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-25.3.0" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-core-ui-25.3.0" level="project" />
<orderEntry type="library" exported="" name="support-core-utils-25.3.0" level="project" />
<orderEntry type="library" exported="" name="slf4j-simple-1.6.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-25.3.0" level="project" />
<orderEntry type="library" exported="" name="support-fragment-25.3.0" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-25.3.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-25.3.0" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-25.3.0" level="project" />
</component>
</module>
\ No newline at end of file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.gabm.fancyplaces"
minSdkVersion 16
targetSdkVersion 25
versionCode 8
versionName "1.2.3"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "debug_title", ""
}
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-DEBUG"
resValue "string", "debug_title", "DEBUG-" + getDate()
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'org.osmdroid:osmdroid-android:4.3'
compile 'org.slf4j:slf4j-simple:1.6.1'
}
def getDate() {
def date = new Date()
def formattedDate = date.format('yyyyMMdd-HH:mm')
return formattedDate
}
File added
-- Merging decision tree log ---
manifest
ADDED from AndroidManifest.xml:2:1
xmlns:android
ADDED from AndroidManifest.xml:2:11
package
ADDED from AndroidManifest.xml:3:5
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
android:versionName
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
android:versionCode
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
uses-permission#android.permission.ACCESS_FINE_LOCATION
ADDED from AndroidManifest.xml:5:5
android:name
ADDED from AndroidManifest.xml:5:22
uses-permission#android.permission.ACCESS_COARSE_LOCATION
ADDED from AndroidManifest.xml:6:5
android:name
ADDED from AndroidManifest.xml:6:22
uses-feature#android.hardware.camera
ADDED from AndroidManifest.xml:8:5
android:required
ADDED from AndroidManifest.xml:10:9
android:name
ADDED from AndroidManifest.xml:9:9
uses-permission#android.permission.INTERNET
ADDED from AndroidManifest.xml:12:5
android:name
ADDED from AndroidManifest.xml:12:22
uses-permission#com.google.android.providers.gsf.permission.READ_GSERVICES
ADDED from AndroidManifest.xml:13:5
android:name
ADDED from AndroidManifest.xml:13:22
uses-feature#0x00020000
ADDED from AndroidManifest.xml:17:5
android:required
ADDED from AndroidManifest.xml:19:9
android:glEsVersion
ADDED from AndroidManifest.xml:18:9
permission#com.example.permission.MAPS_RECEIVE
ADDED from AndroidManifest.xml:21:5
android:protectionLevel
ADDED from AndroidManifest.xml:23:9
android:name
ADDED from AndroidManifest.xml:22:9
uses-permission#com.example.permission.MAPS_RECEIVE
ADDED from AndroidManifest.xml:25:5
android:name
ADDED from AndroidManifest.xml:25:22
uses-permission#android.permission.ACCESS_NETWORK_STATE
ADDED from AndroidManifest.xml:26:5
android:name
ADDED from AndroidManifest.xml:26:22
uses-permission#android.permission.WRITE_EXTERNAL_STORAGE
ADDED from AndroidManifest.xml:27:5
android:name
ADDED from AndroidManifest.xml:27:22
application
ADDED from AndroidManifest.xml:29:5
MERGED from com.android.support:appcompat-v7:21.0.3:16:5
MERGED from com.android.support:support-v4:21.0.3:16:5
MERGED from com.google.android.gms:play-services:6.5.87:20:5
MERGED from com.android.support:support-v4:21.0.3:16:5
android:label
ADDED from AndroidManifest.xml:32:9
android:allowBackup
ADDED from AndroidManifest.xml:30:9
android:icon
ADDED from AndroidManifest.xml:31:9
android:theme
ADDED from AndroidManifest.xml:33:9
meta-data#com.google.android.maps.v2.API_KEY
ADDED from AndroidManifest.xml:34:9
android:name
ADDED from AndroidManifest.xml:35:13
android:value
ADDED from AndroidManifest.xml:36:13
activity#com.example.gabm.fancyplaces.ListFancyPlaces
ADDED from AndroidManifest.xml:38:9
android:label
ADDED from AndroidManifest.xml:40:13
android:name
ADDED from AndroidManifest.xml:39:13
intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER
ADDED from AndroidManifest.xml:41:13
action#android.intent.action.MAIN
ADDED from AndroidManifest.xml:42:17
android:name
ADDED from AndroidManifest.xml:42:25
category#android.intent.category.LAUNCHER
ADDED from AndroidManifest.xml:44:17
android:name
ADDED from AndroidManifest.xml:44:27
activity#com.example.gabm.fancyplaces.ShowEditPlace
ADDED from AndroidManifest.xml:47:9
android:label
ADDED from AndroidManifest.xml:49:13
android:parentActivityName
ADDED from AndroidManifest.xml:50:13
android:name
ADDED from AndroidManifest.xml:48:13
meta-data#android.support.PARENT_ACTIVITY
ADDED from AndroidManifest.xml:51:13
android:name
ADDED from AndroidManifest.xml:52:17
android:value
ADDED from AndroidManifest.xml:53:17
uses-sdk
INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested
MERGED from com.android.support:appcompat-v7:21.0.3:15:5
MERGED from com.android.support:support-v4:21.0.3:15:5
MERGED from com.google.android.gms:play-services:6.5.87:18:5
MERGED from com.android.support:support-v4:21.0.3:15:5
android:targetSdkVersion
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
android:minSdkVersion
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
meta-data#com.google.android.gms.version
ADDED from com.google.android.gms:play-services:6.5.87:21:9
android:name
ADDED from com.google.android.gms:play-services:6.5.87:22:13
android:value
ADDED from com.google.android.gms:play-services:6.5.87:23:13
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/gabm/Android/Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-dontwarn org.osmdroid.bonuspack.**
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gabm.fancyplaces">
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".FancyPlacesApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".ui.MainWindow"
android:label="@string/title_activity_list_fancy_places">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.zip" />
<data android:host="*" />
</intent-filter>
</activity>
<activity
android:name=".ui.ShowEditPlace"
android:parentActivityName=".ui.MainWindow"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.MainWindow" />
</activity>
</application>
</manifest>
SavePlaces-master/app/src/main/icon_design/amazon_store/amazon_icon_big.png

20.5 KiB

SavePlaces-master/app/src/main/icon_design/amazon_store/amazon_icon_small.png

4.21 KiB

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48"
height="48"
viewBox="0 0 48 48"
id="svg3422"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="ic_pin_drop_48px.svg"
inkscape:export-filename="/Users/gabm/Hacking/FancyPlaces/app/src/main/res/icon_design/amazon_store/amazon_icon_big.png"
inkscape:export-xdpi="960"
inkscape:export-ydpi="960">
<metadata
id="metadata3432">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3430" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1395"
inkscape:window-height="855"
id="namedview3428"
showgrid="false"
inkscape:zoom="19.458333"
inkscape:cx="24"
inkscape:cy="3.6079326"
inkscape:window-x="45"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg3422" />
<circle
style="fill:#1b5e20;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path3434"
cx="24"
cy="24"
r="24" />
<path
d="M0 0h48v48h-48z"
fill="none"
id="path3426" />
<path
d="M 34.285714,16 C 34.285714,10.317143 29.682857,5.7142857 24,5.7142857 18.317143,5.7142857 13.714286,10.317143 13.714286,16 13.714286,23.714286 24,34.857143 24,34.857143 24,34.857143 34.285714,23.714286 34.285714,16 Z m -13.714285,0 c 0,-1.894286 1.534285,-3.428571 3.428571,-3.428571 1.894286,0 3.428571,1.534285 3.428571,3.428571 0,1.894286 -1.534285,3.428571 -3.428571,3.428571 -1.894286,0 -3.428571,-1.534285 -3.428571,-3.428571 z M 12,36.571429 12,40 l 24,0 0,-3.428571 -24,0 z"
id="path3424"
inkscape:connector-curvature="0"
style="fill:#ffc107;fill-opacity:1" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48"
height="48"
viewBox="0 0 48 48"
id="svg4317"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="ic_place_48px.svg"
inkscape:export-filename="/Users/gabm/Hacking/FancyPlaces/app/src/main/icon_design/pin/ic_pin_512px.png"
inkscape:export-xdpi="960"
inkscape:export-ydpi="960">
<metadata
id="metadata4327">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs4325" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1198"
inkscape:window-height="766"
id="namedview4323"
showgrid="false"
inkscape:zoom="4.9166667"
inkscape:cx="-9.0508475"
inkscape:cy="24"
inkscape:window-x="85"
inkscape:window-y="38"
inkscape:window-maximized="0"
inkscape:current-layer="svg4317" />
<path
d="M24 4c-7.73 0-14 6.27-14 14 0 10.5 14 26 14 26s14-15.5 14-26c0-7.73-6.27-14-14-14zm0 19c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"
id="path4319"
style="fill:#ffc107;fill-opacity:1;stroke:#1b5e20;stroke-opacity:1;stroke-width:2.5;stroke-miterlimit:4;stroke-dasharray:none" />
<path
d="M0 0h48v48h-48z"
fill="none"
id="path4321" />
</svg>
SavePlaces-master/app/src/main/icon_design/my_location/my_location_512px.png

12.7 KiB

SavePlaces-master/app/src/main/icon_design/pin/ic_pin_512px.png

23 KiB

package com.gabm.fancyplaces;
import android.app.Application;
import android.content.Context;
import android.location.LocationManager;
import android.os.Environment;
import com.gabm.fancyplaces.functional.LocationHandler;
import java.io.File;
public class FancyPlacesApplication extends Application {
public static final int TARGET_PIX_SIZE = 1000;
public static final String TMP_IMAGE_FILENAME = "tmpFancyPlacesImg.png";
static public final int MAP_DEFAULT_ZOOM_NEAR = 16;
static public final int MAP_DEFAULT_ZOOM_FAR = 13;
static public final int MAP_DEFAULT_DURATION = 3000;
public static String TMP_IMAGE_FULL_PATH = "";
public static String TMP_FOLDER ="";
public static String EXTERNAL_EXPORT_DIR = "";
private static LocationHandler locationHandler = null;
@Override
public void onCreate() {
super.onCreate();
// tmp file dir
TMP_FOLDER = getExternalCacheDir().getAbsolutePath();
TMP_IMAGE_FULL_PATH = TMP_FOLDER + File.separator + com.gabm.fancyplaces.FancyPlacesApplication.TMP_IMAGE_FILENAME;
// external export dir
EXTERNAL_EXPORT_DIR = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + getResources().getString(R.string.app_name) + File.separator;
(new File(EXTERNAL_EXPORT_DIR)).mkdirs();
// attach lifecycle callbacks to location handler
locationHandler = new LocationHandler((LocationManager) getSystemService(Context.LOCATION_SERVICE));
registerActivityLifecycleCallbacks(locationHandler);
}
public LocationHandler getLocationHandler() {
return locationHandler;
}
public int getStatusBarHeight() {
int result = 0;
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = getResources().getDimensionPixelSize(resourceId);
}
return result;
}
}
/*
* Copyright (C) 2015 Matthias Gabriel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.gabm.fancyplaces;
import android.app.Application;
import android.content.Context;
import android.location.LocationManager;
import android.os.Environment;
import com.gabm.fancyplaces.functional.LocationHandler;
import java.io.File;
/**
* Created by gabm on 19/05/15.
*/
public class FancyPlacesApplication extends Application {
public static final int TARGET_PIX_SIZE = 1000;
public static final String TMP_IMAGE_FILENAME = "tmpFancyPlacesImg.png";
static public final int MAP_DEFAULT_ZOOM_NEAR = 16;
static public final int MAP_DEFAULT_ZOOM_FAR = 13;
static public final int MAP_DEFAULT_DURATION = 3000;
public static String TMP_IMAGE_FULL_PATH = "";
public static String TMP_FOLDER ="";
public static String EXTERNAL_EXPORT_DIR = "";
private static LocationHandler locationHandler = null;
@Override
public void onCreate() {
super.onCreate();
// tmp file dir
TMP_FOLDER = getExternalCacheDir().getAbsolutePath();
TMP_IMAGE_FULL_PATH = TMP_FOLDER + File.separator + com.gabm.fancyplaces.FancyPlacesApplication.TMP_IMAGE_FILENAME;
// external export dir
EXTERNAL_EXPORT_DIR = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + getResources().getString(R.string.app_name) + File.separator;
(new File(EXTERNAL_EXPORT_DIR)).mkdirs();
// attach lifecycle callbacks to location handler
locationHandler = new LocationHandler((LocationManager) getSystemService(Context.LOCATION_SERVICE));
registerActivityLifecycleCallbacks(locationHandler);
}
public LocationHandler getLocationHandler() {
return locationHandler;
}
public int getStatusBarHeight() {
int result = 0;
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = getResources().getDimensionPixelSize(resourceId);
}
return result;
}
}
package com.gabm.fancyplaces.data;
import android.content.ContentResolver;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
public class FancyPlace implements Parcelable, Serializable {
public static final Parcelable.Creator<FancyPlace> CREATOR
= new Parcelable.Creator<FancyPlace>() {
public FancyPlace createFromParcel(Parcel in) {
return new FancyPlace(in);
}
public FancyPlace[] newArray(int size) {
return new FancyPlace[size];
}
};
// private data fields
private String sTitle = "";
private String sNotes = "";
private String sLocation_lat = "";
private String sLocation_long = "";
private ImageFile oImage = new ImageFile();
private long id = 0;
private Boolean bIsInDatabase = false;
public FancyPlace() {
}
public FancyPlace(Parcel in) {
sTitle = in.readString();
sNotes = in.readString();
sLocation_lat = in.readString();
sLocation_long = in.readString();
oImage = in.readParcelable(ImageFile.class.getClassLoader());
id = in.readLong();
bIsInDatabase = (boolean) in.readValue(Boolean.class.getClassLoader());
}
public FancyPlace(FancyPlace other) {
this(other.getTitle(), other.getNotes(), other.getLocationLat(), other.getLocationLong(), other.getImage(), other.getId(), other.isInDatabase());
}
public FancyPlace(String title, String notes, String location_lat, String location_long, ImageFile image, long dataBaseID, Boolean isInDatabase) {
sTitle = title;
sNotes = notes;
sLocation_lat = location_lat;
sLocation_long = location_long;
oImage = image;
bIsInDatabase = isInDatabase;
id = dataBaseID;
}
public static FancyPlace loadFromFile(ContentResolver resolver, Uri uri) {
FancyPlace result = null;
try {
InputStream is = resolver.openInputStream(uri);
ObjectInputStream ois = new ObjectInputStream(is);
result = (FancyPlace) ois.readObject();
result.bIsInDatabase = false;
result.id = 0;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(sTitle);
dest.writeString(sNotes);
dest.writeString(sLocation_lat);
dest.writeString(sLocation_long);
dest.writeParcelable(oImage, flags);
dest.writeLong(id);
dest.writeValue(bIsInDatabase);
}
public String getTitle() {
return sTitle;
}
public void setTitle(String sTitle) {
this.sTitle = sTitle;
}
public String getNotes() {
return sNotes;
}
public void setNotes(String sNotes) {
this.sNotes = sNotes;
}
public String getLocationLat() {
return sLocation_lat;
}
public void setLocationLat(String sLocation_lat) {
this.sLocation_lat = sLocation_lat;
}
public String getLocationLong() {
return sLocation_long;
}
public void setLocationLong(String sLocation_long) {
this.sLocation_long = sLocation_long;
}
public ImageFile getImage() {
return oImage;
}
public void setImage(ImageFile imageFile) {
oImage = imageFile;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
// Will be used by the ArrayAdapter in the ListView
@Override
public String toString() {
return sTitle;
}
public FancyPlace clone() {
return new FancyPlace(this);
}
public Boolean isInDatabase() {
return bIsInDatabase;
}
public void setIsInDatabase(Boolean isInDatabase) {
bIsInDatabase = isInDatabase;
}
public Boolean isLocationSet() {
return (!getLocationLong().equals("") && !getLocationLat().equals(""));
}
public Boolean isTitleSet() {
return !sTitle.equals("");
}
public Boolean isValid() {
return isTitleSet() && isLocationSet();
}
public String saveToFile(String directory) {
String fileName = directory + File.separator + getTitle().replaceAll(" ", "_").toLowerCase() + ".fancyplace";
try {
File cacheFile = new File(fileName);
cacheFile.createNewFile();
FileOutputStream fis = new FileOutputStream(cacheFile);
ObjectOutputStream oos = new ObjectOutputStream(fis);
oos.writeObject(this);
oos.close();
fis.close();
} catch (Exception e) {
fileName = "";
e.printStackTrace();
}
return fileName;
}
}
package com.gabm.fancyplaces.data;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import com.gabm.fancyplaces.FancyPlacesApplication;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.nio.channels.FileChannel;
public class ImageFile implements Parcelable, Serializable {
public static final Parcelable.Creator<ImageFile> CREATOR
= new Parcelable.Creator<ImageFile>() {
public ImageFile createFromParcel(Parcel in) {
return new ImageFile(in);
}
public ImageFile[] newArray(int size) {
return new ImageFile[size];
}
};
public static FancyPlacesApplication curAppContext = null;
private String FileName;
public ImageFile() {
FileName = "";
}
public ImageFile(Parcel in) {
FileName = in.readString();
}
public ImageFile(ImageFile rhs) {
this(rhs.FileName);
}
public ImageFile(String fileName) {
FileName = fileName;
}
public static ImageFile cloneObject(ImageFile rhs) {
return new ImageFile(rhs.FileName);
}
public static ImageFile saveBitmap(Bitmap bmp, String fileName) {
ImageFile result = new ImageFile();
result.FileName = fileName;
File file = new File(result.FileName);
FileOutputStream fos = null;
try {
fos = new FileOutputStream(file);
// Use the compress method on the BitMap object to write image to the OutputStream
bmp.compress(Bitmap.CompressFormat.PNG, 100, fos);
fos.close();
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(FileName);
}
public ImageFile copy(String fileName) {
ImageFile result = new ImageFile(fileName);
File src = new File(FileName);
File dest = new File(fileName);
// copy file to our destination
try {
copy(src, dest);
} catch (IOException e) {
Log.d("IOException: ", "Couldn't copy image");
}
return result;
}
/*
public ImageSize getSize()
{
if (!exists())
return null;
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(FileName, options);
return new ImageSize(options.outWidth, options.outHeight);
}*/
public void move(String fileName) {
ImageFile newFile = copy(fileName);
this.delete();
this.FileName = newFile.FileName;
}
public void delete() {
File curFile = new File(FileName);
if (curFile.exists())
curFile.delete();
}
public void scaleDown(float maxImageSize) {
Bitmap oldImage = loadFullSizeImage();
float ratio = Math.min(
maxImageSize / oldImage.getWidth(),
maxImageSize / oldImage.getHeight());
int width = Math.round(ratio * oldImage.getWidth());
int height = Math.round(ratio * oldImage.getHeight());
Bitmap newBitmap = Bitmap.createScaledBitmap(oldImage, width, height, true);
saveBitmap(newBitmap, getFileName());
}
public Bitmap loadFullSizeImage() {
return loadBitmap(1);
}
public Bitmap loadThumbnail() {
Bitmap thumbnail = loadBitmap(4);
int minSize = 0;
int offsetWidth = 0;
int offsetHeight = 0;
if (thumbnail.getHeight() < thumbnail.getWidth()) {
minSize = thumbnail.getHeight();
offsetWidth = (thumbnail.getWidth() - minSize) / 2;
} else {
minSize = thumbnail.getWidth();
offsetHeight = (thumbnail.getHeight() - minSize) / 2;
}
Bitmap output = Bitmap.createBitmap(minSize, minSize, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect destRect = new Rect(0, 0, minSize, minSize);
final Rect srcRect = new Rect(offsetWidth, offsetHeight, minSize, minSize);
final RectF rectF = new RectF(destRect);
final float roundPx = minSize;
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(thumbnail, srcRect, destRect, paint);
return output;
}
private Bitmap loadBitmap(int sampleSize) {
if (!exists())
return null;
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = sampleSize;
Bitmap resultBitmap = BitmapFactory.decodeFile(FileName, options);
return resultBitmap;
}
public Boolean exists() {
return (new File(FileName)).exists();
}
public String getFileName() {
return FileName;
}
private void copy(File src, File dst) throws IOException {
FileInputStream inStream = new FileInputStream(src);
FileOutputStream outStream = new FileOutputStream(dst);
FileChannel inChannel = inStream.getChannel();
FileChannel outChannel = outStream.getChannel();
inChannel.transferTo(0, inChannel.size(), outChannel);
inStream.close();
outStream.close();
}
private void writeObject(ObjectOutputStream oos)
throws IOException {
SerializableImage serializableImage = new SerializableImage();
serializableImage.setImage(loadFullSizeImage());
// write the image
oos.writeObject(serializableImage);
}
private void readObject(ObjectInputStream ois)
throws ClassNotFoundException, IOException {
// deserialize img
SerializableImage img = (SerializableImage) ois.readObject();
// save image to tmp dir
ImageFile tmpImgFile = ImageFile.saveBitmap(img.getImage(), com.gabm.fancyplaces.FancyPlacesApplication.TMP_IMAGE_FULL_PATH);
FileName = tmpImgFile.FileName;
}
protected class SerializableImage implements Serializable {
private byte[] ImageData = null;
public Bitmap getImage() {
return BitmapFactory.decodeByteArray(ImageData, 0, ImageData.length);
}
public void setImage(Bitmap bmp) {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
ImageData = stream.toByteArray();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment