1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-22 04:12:08 +01:00

Update Readme

This commit is contained in:
Gregor Santner 2017-08-24 13:34:32 +02:00
parent ea7ceacc12
commit e9fa2082d9
6 changed files with 128 additions and 76 deletions

View file

@ -1,3 +1,6 @@
### v1.0.4
- Updated: README
### v1.0.3 ### v1.0.3
- Update opoc - Update opoc
- Better visibility for counter badge - Better visibility for counter badge

View file

@ -1,47 +1,84 @@
[![F-Droid](https://f-droid.org/wiki/images/0/06/F-Droid-button_get-it-on.png)](https://f-droid.org/repository/browse/?fdid=com.github.dfa.diaspora_android) [![GitHub release](https://img.shields.io/github/tag/diaspora-for-android/dandelion.svg)](https://github.com/diaspora-for-android/dandelion/releases)
[![Donate](https://img.shields.io/badge/donate-bitcoin-orange.svg)](https://gsantner.github.io/#donate)
<a name="badgers"></a>[![CircleCI](https://circleci.com/gh/Diaspora-for-Android/dandelion.svg?style=shield)](https://circleci.com/gh/Diaspora-for-Android/dandelion) [![CircleCI](https://circleci.com/gh/Diaspora-for-Android/dandelion.svg?style=shield)](https://circleci.com/gh/Diaspora-for-Android/dandelion)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/diaspora-for-android/localized.svg)](https://crowdin.com/project/diaspora-for-android) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/diaspora-for-android/localized.svg)](https://crowdin.com/project/diaspora-for-android)
[![Chat - Matrix](https://img.shields.io/badge/chat-on%20matrix-blue.svg)](https://matrix.to/#/#dandelion:matrix.org) [![Chat - FreeNode IRC](https://img.shields.io/badge/chat-on%20irc-blue.svg)](https://kiwiirc.com/client/irc.freenode.net/?nick=dandelion-anon|?##dandelion) [![Chat - Matrix](https://img.shields.io/badge/chat-on%20matrix-blue.svg)](https://matrix.to/#/#dandelion:matrix.org) [![Chat - FreeNode IRC](https://img.shields.io/badge/chat-on%20irc-blue.svg)](https://kiwiirc.com/client/irc.freenode.net/?nick=dandelion-anon|?##dandelion)
# dandelion\* # dandelion\*
<img src="/app/src/main/ic_launcher-web.png" align="left" width="100" hspace="10" vspace="10">
This is an unofficial webview based client for the community-run, distributed social network <b><a href="https://diasporafoundation.org/">diaspora*</a></b>.
This is an unofficial webview based client for the community-run, distributed social network **[diaspora*](https://diasporafoundation.org/)**. It's currently under development and should be used with that in mind. Please submit any bugs you might find. <div style="display:flex;" >
<a href="https://f-droid.org/repository/browse/?fdid=com.github.dfa.diaspora_android">
<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="80">
</a>
<a href="https://play.google.com/store/apps/details?id=com.github.dfa.diaspora_android">
<img alt="Get it on Google Play" height="80" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" />
</a>
</div></br>
- Download latest release on ([F-Droid](https://f-droid.org/repository/browse/?fdid=com.github.dfa.diaspora_android))
- Download latest nightly - [secondlion\*](https://gsantner.gitlab.io/fdroid/latest/com.github.dfa.secondlion.apk)
- Watch [Changelog](https://github.com/Diaspora-for-Android/dandelion/blob/master/CHANGELOG.md)
- See [Screenshots](https://github.com/Diaspora-for-Android/dandelion/blob/master/SCREENSHOTS.md)
- Get updates from our diaspora\* account: [dandelion00@diasp.org](https://diasp.org/people/48b78420923501341ef3782bcb452bd5)
## Contributions ## Description
We are always open for any kind of contribution. (PR's, bug reports, feature requests, translations, ..) This is an unofficial webview based client for the community-run, distributed social network <b><a href="https://diasporafoundation.org/">diaspora*</a></b>.
If you got any questions feel free to contact us on IRC, XMPP or Gitter. You can start chatting by clicking on the [blue chat badges](#badgers) listed on top. It's currently under development and should be used with that in mind. Please submit any bugs you might find.
We use Crowdin to translate dandelion\*. Join our project here: <https://crowdin.com/project/diaspora-for-android/invite>. If your desired language is not listed please contact the maintainers/owner. #### WebApp
Note that the main project members are working on this project for free during leisure time, are mostly busy with their job/university/school, and may not react or start coding immediately.
### License
dandelion\* is released under GNU GENERAL PUBLIC LICENSE (see [LICENCE](https://github.com/Diaspora-for-Android/dandelion/blob/master/LICENSE.md)).
The translations (strings.xml) are licensed CC0 1.0.
### WebApp
The app is developed as a WebApp because currently diaspora\* doesn't have an functional API that can be used to create a native interface to retrieve the user's data, publications, direct messages and so on. That's why there are currently only WebApps for diaspora\* out there. The app is developed as a WebApp because currently diaspora\* doesn't have an functional API that can be used to create a native interface to retrieve the user's data, publications, direct messages and so on. That's why there are currently only WebApps for diaspora\* out there.
[Stay tuned on diaspora\* issues](https://github.com/diaspora/diaspora/labels/api) about API. [Stay tuned on diaspora\* issues](https://github.com/diaspora/diaspora/labels/api) about API.
Why is a WebApp better than using the mobile site on a browser? Why is a WebApp better than using the mobile site on a browser?
Basically it provides better integration with the system (events coming into and going out of the app), notifications, customized interface and functions and a nice little icon that takes you directly to your favorite social network :) Basically it provides better integration with the system (events coming into and going out of the app), notifications, customized interface and functions and a nice little icon that takes you directly to your favorite social network :)
### Device Requirements #### Device Requirements
The minimum Android version supported is Jelly Bean, Android v4.2.0 / API 17 The minimum Android version supported is Jelly Bean, Android v4.2.0 / API 17
### App Permissions ### Privacy & Permissions<a name="privacy"></a>
dandelion\* requires access to the Internet and to external storage to be able to upload photos when creating a new post and for taking screenshots. dandelion\* requires access to the Internet and to external storage to be able to upload photos when creating a new post and for taking screenshots.
## Maintainers
## Contributions
The project is always open for contributions and accepts pull requests.
The project uses [AOSP Java Code Style](https://source.android.com/source/code-style#follow-field-naming-conventions), with one exception: private members are `_camelCase` instead of `mBigCamel`. You may use Android Studios _auto reformat feature_ before sending a PR.
We use Crowdin to translate dandelion\*. Join our project here: <https://crowdin.com/project/diaspora-for-android/invite>. If your desired language is not listed please contact the maintainers/owner.
Join our IRC or Matrix channel (bridged) and say hello! Don't be afraid to start talking. [![Chat - Matrix](https://img.shields.io/badge/chat-on%20matrix-blue.svg)](https://matrix.to/#/#dandelion:matrix.org) [![Chat - FreeNode IRC](https://img.shields.io/badge/chat-on%20irc-blue.svg)](https://kiwiirc.com/client/irc.freenode.net/?nick=dandelion-anon|?##dandelion)
Note that the main project members are working on this project for free during leisure time, are mostly busy with their job/university/school, and may not react or start coding immediately.
#### Resources
* Project: [Changelog](/CHANGELOG.md) | [Issues level/beginner](https://github.com/diaspora-for-android/dandelion/issues?q=is%3Aissue+is%3Aopen+label%3Alevel%2Fbeginner) | [License](/LICENSE.txt) | [CoC](/CODE_OF_CONDUCT.md)
* Project diaspora\* account: [dandelion00@diasp.org](https://diasp.org/people/48b78420923501341ef3782bcb452bd5)
* diaspora\*: [GitHub](https://github.com/diaspora/diaspora) | [Web](https://diasporafoundation.org) | [d\* HQ account](https://pod.diaspora.software/people/7bca7c80311b01332d046c626dd55703)
* App on F-Droid: [Metadata](https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/com.github.dfa.diaspora_android.txt) | [Page](https://f-droid.org/packages/com.github.dfa.diaspora_android/) | [Wiki](https://f-droid.org/wiki/page/com.github.dfa.diaspora_android) | [Build log](https://f-droid.org/wiki/page/com.github.dfa.diaspora_android/lastbuild)
## Licensing
dandelion\* is released under GNU GENERAL PUBLIC LICENSE (see [LICENCE](https://github.com/Diaspora-for-Android/dandelion/blob/master/LICENSE.md)).
The app is licensed GPL v3. Localization files and resources (strings\*.xml) are licensed CC0 1.0.
For more licensing informations, see [`3rd party licenses`](/app/src/main/res/raw/licenses_3rd_party.md).
<!--
## Screenshots
<div style="display:flex;" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/01.png" width="19%" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/02.png" width="19%" style="margin-left:10px;" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/03.png" width="19%" style="margin-left:10px;" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/04.png" width="19%" style="margin-left:10px;" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/05.png" width="19%" style="margin-left:10px;" >
</div>
<div style="display:flex;" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/06.png" width="19%" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/07.png" width="19%" style="margin-left:10px;" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/08.png" width="19%" style="margin-left:10px;" >
<img src="https://raw.githubusercontent.com/diaspora-for-android/dandelion-metadata-latest/master/en-US/phoneScreenshots/09.png" width="19%" style="margin-left:10px;" >
</div>
-->
### Notice
#### Maintainers
- gsantner ([GitHub](https://github.com/gsantner), [Web](https://gsantner.github.io), [diaspora*](https://pod.geraspora.de/people/d1cbdd70095301341e834860008dbc6c)) - gsantner ([GitHub](https://github.com/gsantner), [Web](https://gsantner.github.io), [diaspora*](https://pod.geraspora.de/people/d1cbdd70095301341e834860008dbc6c))
- Bitcoin: [1B9ZyYdQoY9BxMe9dRUEKaZbJWsbQqfXU5](https://gsantner.github.io/donate/#donate) - Bitcoin: [1B9ZyYdQoY9BxMe9dRUEKaZbJWsbQqfXU5](https://gsantner.github.io/donate/#donate)
- vanitasvitae ([GitHub](https://github.com/vanitasvitae), [diaspora*](https://pod.geraspora.de/people/bbd7af90fbec013213e34860008dbc6c)) - vanitasvitae ([GitHub](https://github.com/vanitasvitae), [diaspora*](https://pod.geraspora.de/people/bbd7af90fbec013213e34860008dbc6c))

View file

@ -1,9 +1,9 @@
/* /*
* ---------------------------------------------------------------------------- * * ------------------------------------------------------------------------------
* Gregor Santner <gsantner.github.io> wrote this file. You can do whatever * Gregor Santner <gsantner.github.io> wrote this. You can do whatever you want
* you want with this stuff. If we meet some day, and you think this stuff is * with it. If we meet some day, and you think it is worth it, you can buy me a
* worth it, you can buy me a coke in return. Provided as is without any kind * coke in return. Provided as is without any kind of warranty. Do not blame or
* of warranty. No attribution required. - Gregor Santner * sue me if something goes wrong. No attribution required. - Gregor Santner
* *
* License: Creative Commons Zero (CC0 1.0) * License: Creative Commons Zero (CC0 1.0)
* http://creativecommons.org/publicdomain/zero/1.0/ * http://creativecommons.org/publicdomain/zero/1.0/

View file

@ -1,11 +1,11 @@
/* /*
* ---------------------------------------------------------------------------- * * ------------------------------------------------------------------------------
* Gregor Santner <gsantner.github.io> wrote this file. You can do whatever * Gregor Santner <gsantner.github.io> wrote this. You can do whatever you want
* you want with this stuff. If we meet some day, and you think this stuff is * with it. If we meet some day, and you think it is worth it, you can buy me a
* worth it, you can buy me a coke in return. Provided as is without any kind * coke in return. Provided as is without any kind of warranty. Do not blame or
* of warranty. No attribution required. - Gregor Santner * sue me if something goes wrong. No attribution required. - Gregor Santner
* *
* License of this file: Creative Commons Zero (CC0 1.0) * License: Creative Commons Zero (CC0 1.0)
* http://creativecommons.org/publicdomain/zero/1.0/ * http://creativecommons.org/publicdomain/zero/1.0/
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
@ -21,6 +21,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
@ -45,10 +46,9 @@ import android.widget.TextView;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.Locale; import java.util.Locale;
@SuppressWarnings({"WeakerAccess", "unused", "SameParameterValue", "SpellCheckingInspection"}) @SuppressWarnings({"WeakerAccess", "unused", "SameParameterValue", "SpellCheckingInspection", "deprecation"})
public class Helpers { public class Helpers {
//######################## //########################
//## Members, Constructors //## Members, Constructors
@ -126,27 +126,20 @@ public class Helpers {
} }
/** /**
* https://stackoverflow.com/a/25267049 * Get field from PackageId.BuildConfig
* Gets a field from the project's BuildConfig. This is useful when, for example, flavors * May be helpful in libraries, where a access to
* are used at the project level to set custom fields. * BuildConfig would only get values of the library
* * rather than the app ones
* @param fieldName The name of the field-to-access
* @return The value of the field, or {@code null} if the field is not found.
*/ */
public Object getBuildConfigValue(String fieldName) { public Object getBuildConfigValue(String fieldName) {
try { try {
Class<?> clazz = Class.forName(_context.getPackageName() + ".BuildConfig"); Class<?> c = Class.forName(_context.getPackageName() + ".BuildConfig");
Field field = clazz.getField(fieldName); return c.getField(fieldName).get(null);
return field.get(null); } catch (Exception e) {
} catch (ClassNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return null; return null;
} }
}
public boolean getBuildConfigBoolean(String fieldName, boolean defaultValue) { public boolean getBuildConfigBoolean(String fieldName, boolean defaultValue) {
Object field = getBuildConfigValue(fieldName); Object field = getBuildConfigValue(fieldName);
@ -220,6 +213,7 @@ public class Helpers {
} }
@SuppressLint("RestrictedApi") @SuppressLint("RestrictedApi")
@SuppressWarnings("RestrictedApi")
public void setTintColorOfButton(AppCompatButton button, @ColorRes int resColor) { public void setTintColorOfButton(AppCompatButton button, @ColorRes int resColor) {
button.setSupportBackgroundTintList(ColorStateList.valueOf( button.setSupportBackgroundTintList(ColorStateList.valueOf(
color(resColor) color(resColor)
@ -288,14 +282,15 @@ public class Helpers {
? new Locale(code.substring(0, 2), code.substring(4, 6)) // de-rAt ? new Locale(code.substring(0, 2), code.substring(4, 6)) // de-rAt
: new Locale(code); // de : new Locale(code); // de
} }
return Locale.getDefault(); return Resources.getSystem().getConfiguration().locale;
} }
// "en"/"de"/"de-rAt"; Empty string = default locale // en/de/de-rAt ; Empty string -> default locale
public void setAppLanguage(String androidLocaleString) { public void setAppLanguage(String androidLocaleString) {
Locale locale = getLocaleByAndroidCode(androidLocaleString); Locale locale = getLocaleByAndroidCode(androidLocaleString);
Configuration config = _context.getResources().getConfiguration(); Configuration config = _context.getResources().getConfiguration();
config.locale = locale != null ? locale : Locale.getDefault(); config.locale = (locale != null && !androidLocaleString.isEmpty())
? locale : Resources.getSystem().getConfiguration().locale;
_context.getResources().updateConfiguration(config, null); _context.getResources().updateConfiguration(config, null);
} }
@ -306,6 +301,7 @@ public class Helpers {
+ (0.114 * Color.blue(colorOnBottomInt))))); + (0.114 * Color.blue(colorOnBottomInt)))));
} }
public float px2dp(final float px) { public float px2dp(final float px) {
return px / _context.getResources().getDisplayMetrics().density; return px / _context.getResources().getDisplayMetrics().density;
} }

View file

@ -1,11 +1,11 @@
/* /*
* ---------------------------------------------------------------------------- * * ------------------------------------------------------------------------------
* Gregor Santner <gsantner.github.io> wrote this file. You can do whatever * Gregor Santner <gsantner.github.io> wrote this. You can do whatever you want
* you want with this stuff. If we meet some day, and you think this stuff is * with it. If we meet some day, and you think it is worth it, you can buy me a
* worth it, you can buy me a coke in return. Provided as is without any kind * coke in return. Provided as is without any kind of warranty. Do not blame or
* of warranty. No attribution required. - Gregor Santner * sue me if something goes wrong. No attribution required. - Gregor Santner
* *
* License of this file: Creative Commons Zero (CC0 1.0) * License: Creative Commons Zero (CC0 1.0)
* http://creativecommons.org/publicdomain/zero/1.0/ * http://creativecommons.org/publicdomain/zero/1.0/
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
@ -44,9 +44,9 @@ public class HelpersA extends Helpers {
/** /**
* Animate to specified Activity * Animate to specified Activity
* *
* @param to The class of the _activity * @param to The class of the activity
* @param finishFromActivity true: Finish the current _activity * @param finishFromActivity true: Finish the current activity
* @param requestCode Request code for stating the _activity, not waiting for result if null * @param requestCode Request code for stating the activity, not waiting for result if null
*/ */
public void animateToActivity(Class to, Boolean finishFromActivity, Integer requestCode) { public void animateToActivity(Class to, Boolean finishFromActivity, Integer requestCode) {
animateToActivity(new Intent(_activity, to), finishFromActivity, requestCode); animateToActivity(new Intent(_activity, to), finishFromActivity, requestCode);
@ -56,9 +56,9 @@ public class HelpersA extends Helpers {
* Animate to Activity specified in intent * Animate to Activity specified in intent
* Requires animation resources * Requires animation resources
* *
* @param intent Intent to open start an _activity * @param intent Intent to open start an activity
* @param finishFromActivity true: Finish the current _activity * @param finishFromActivity true: Finish the current activity
* @param requestCode Request code for stating the _activity, not waiting for result if null * @param requestCode Request code for stating the activity, not waiting for result if null
*/ */
public void animateToActivity(Intent intent, Boolean finishFromActivity, Integer requestCode) { public void animateToActivity(Intent intent, Boolean finishFromActivity, Integer requestCode) {
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);

View file

@ -1,11 +1,11 @@
/* /*
* ---------------------------------------------------------------------------- * * ------------------------------------------------------------------------------
* Gregor Santner <gsantner.github.io> wrote this file. You can do whatever * Gregor Santner <gsantner.github.io> wrote this. You can do whatever you want
* you want with this stuff. If we meet some day, and you think this stuff is * with it. If we meet some day, and you think it is worth it, you can buy me a
* worth it, you can buy me a coke in return. Provided as is without any kind * coke in return. Provided as is without any kind of warranty. Do not blame or
* of warranty. No attribution required. - Gregor Santner * sue me if something goes wrong. No attribution required. - Gregor Santner
* *
* License of this file: Creative Commons Zero (CC0 1.0) * License: Creative Commons Zero (CC0 1.0)
* http://creativecommons.org/publicdomain/zero/1.0/ * http://creativecommons.org/publicdomain/zero/1.0/
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
@ -50,7 +50,7 @@ public class SimpleMarkdownParser {
public final static SmpFilter FILTER_ANDROID_TEXTVIEW = new SmpFilter() { public final static SmpFilter FILTER_ANDROID_TEXTVIEW = new SmpFilter() {
@Override @Override
public String filter(String text) { public String filter(String text) {
// TextView supports a limited set of _html tags, most notably // TextView supports a limited set of html tags, most notably
// a href, b, big, font size&color, i, li, small, u // a href, b, big, font size&color, i, li, small, u
// Don't start new line if 2 empty lines and heading // Don't start new line if 2 empty lines and heading
@ -111,6 +111,22 @@ public class SimpleMarkdownParser {
} }
}; };
public final static SmpFilter FILTER_CHANGELOG = new SmpFilter() {
@Override
public String filter(String text) {
text = text
.replace("New:", "<font color='#276230'>New:</font>")
.replace("Added:", "<font color='#276230'>Added:</font>")
.replace("Fixed:", "<font color='#005688'>Fixed:</font>")
.replace("Removed:", "<font color='#C13524'>Removed:</font>")
.replace("Updated:", "<font color='#555555'>Updated:</font>")
.replace("Improved:", "<font color='#555555'>Improved:</font>")
.replace("Modified:", "<font color='#555555'>Modified:</font>")
;
return text;
}
};
//######################## //########################
//## Singleton //## Singleton
//######################## //########################