Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Neamar/KISS
Browse files Browse the repository at this point in the history
  • Loading branch information
Neamar committed Nov 16, 2015
2 parents 81f6ddf + ae7175d commit 8add3ab
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 27 deletions.
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing to KISS
Contributions are very welcome, feel free to open new issues or PR.

Project maintainers are @Neamar, @Dorvaryn, @saveman71 and @Pluggi.

## Translation [![Translation status](https://hosted.weblate.org/widgets/kiss/-/shields-badge.svg)](https://hosted.weblate.org/projects/kiss/strings/)

Want to help with the translation? Use https://hosted.weblate.org/projects/kiss/strings/ to collaborate on strings translation!


## Before contributing...
Keep in mind the goal of KISS is to be fast and small.
So before you add new features, ask yourself what you're trying to achieve and if you can make it with fewer dependencies (for instance, that's why we're not using RecyclerView :()


## How does it work?

Different data types can be aggregated via KISS' simple interface: apps, contacts, settings...

Each data types uses four classes:

* A *loader*, which retrieves all available items at startup
* A *provider*, which knows all of its items (e.g. all contacts), and is responsible for filtering those records according to the query
* A *pojo*, which is a [POJO](https://en.wikipedia.org/wiki/Plain_Old_Java_Object) storing simple data for one item (e.g. contact name, display name, phone number, photo)
* A *result*, which ensures the *pojo* is properly displayed in the list

Controlling the workflow is *SummonActivity*, initializing the UI, dispatching the query to the providers and ordering the results according to their relevance and user search history.

### Adding new content sources
This is clearly not as easy as it ought to be.

You need to create a new loader, new provider, new pojo and new result. You also need to ensure `adapter.RecordAdapter.java` creates your own view type (see method `getViewTypeCount` and `getItemViewType`).

## Creating new Pull Request
Explain your changes, comment your code and make sure the CI is able to compile your code.

Sadly, there is no test suite yet :(
26 changes: 3 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ KISS is a *blazingly* fast launcher for android requiring nearly no memory to ru

Join the [G+ community](https://plus.google.com/communities/116489528310489783081) to get download instruction for the beta version.

> See [contributing](CONTRIBUTING.md) for details on how to help with this project.

What is it?
------------
KISS is a fast launcher for your Android.
Expand All @@ -22,29 +25,6 @@ Get ready to be amazed.
Previews
---------------------


|![Preview](https://lh3.googleusercontent.com/1B-Vc9Tqh6bfGCVyKXkYSZycwY9Z4g6NxX3ULAKdCPgi9pmGHoyIelC4nsVbQK8d5l0i) | ![Preview](https://lh3.googleusercontent.com/ADlhgu6JBVOJRn_XS-BbFbw6HtGopVABpBSdBMfANXpGpicFY3jxVLcuBhnJ9QkSshTp) | ![Preview](https://lh3.googleusercontent.com/17JTZKi0wh8ReNTMmhEzoR1Iu_mirK867_H2GbMwDhFf8QwpqhxzccpBLAFo5DbFdg) |
|:-------------------:|:------------------------:|:-----------------:|
| Recently used first | Search apps, contacts... | Even in settings! |

Translation [![Translation status](https://hosted.weblate.org/widgets/kiss/-/shields-badge.svg)](https://hosted.weblate.org/projects/kiss/strings/)
-------------------
Want to help with the translation? Use https://hosted.weblate.org/projects/kiss/strings/ to collaborate on strings translation!


How does it work?
-------------------
Different data types can be aggregated via KISS' simple interface: apps, contacts, settings...

Each data types uses four classes:

* A *loader*, which retrieves all available items at startup
* A *provider*, which knows all of its items (e.g. all contacts), and is responsible for filtering those records according to the query
* A *pojo*, which is a [POJO](https://en.wikipedia.org/wiki/Plain_Old_Java_Object) storing simple data for one item (e.g. contact name, display name, phone number, photo)
* A *result*, which ensures the *pojo* is properly displayed in the list

Controlling the workflow is *SummonActivity*, initializing the UI, dispatching the query to the providers and ordering the results according to their relevance and user search history.

### Adding new content sources
This is clearly not as easy as it ought to be.

5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
android:name="android.hardware.camera.flash"
android:required="false" />

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

<application
android:allowBackup="true"
android:hardwareAccelerated="true"
Expand Down Expand Up @@ -112,7 +115,7 @@
<action android:name="android.intent.action.ACTION_MEDIA_MOUNTED" />
<action android:name="android.intent.action.ACTION_MEDIA_REMOVED" />


<data android:scheme="file" />
<data android:scheme="package" />
</intent-filter>
</receiver>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@ public void onReceive(Context ctx, Intent intent) {
if ("android.intent.action.PACKAGE_ADDED".equals(intent.getAction()) && !intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
// Add new package to history
String packageName = intent.getData().getSchemeSpecificPart();
String className = ctx.getPackageManager().getLaunchIntentForPackage(packageName).getComponent().getClassName();

Intent launchIntent = ctx.getPackageManager().getLaunchIntentForPackage(packageName);
if (launchIntent == null) {//for some plugin app
return ;
}

String className = launchIntent.getComponent().getClassName();
if (className != null) {
KissApplication.getDataHandler(ctx).addToHistory(ctx, "app://" + packageName + "/" + className);
}
}

if ("android.intent.action.PACKAGE_REMOVED".equals(intent.getAction())) {
// Removed all installed shortcuts
String packageName = intent.getData().getSchemeSpecificPart();
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-it/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
<item>Tema scuro</item>
<item>Tema trasparente</item>
<item>Tema semi-trasparente</item>
<item>Tema scuro semi-trasparente</item>
</string-array>
<string-array name="themesValues">
<item>light</item>
<item>dark</item>
<item>transparent</item>
<item>semi-transparent</item>
<item>semi-transparent-dark</item>
</string-array>
<string-array name="sortAppListEntries">
<item>Dalla A alla Z</item>
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
<string name="phone_desc">Chiamata diretta per i numeri di telefono</string>
<string name="phone_name">Telefono</string>

<string name="shortcuts_desc">Ricerca nei collegamenti installati</string>
<string name="shortcuts_name">Collegamenti</string>

<string name="stub_application">Nome dell\'applicazione</string>
<string name="stub_contact">Nome del contatto</string>
<string name="stub_contact_phone">+330 12 34 56 78</string>
Expand All @@ -54,6 +57,7 @@
<string name="main_kiss_back">Mostra storia</string>
<string name="reset_desc">Cancella la storia di KISS</string>
<string name="reset_name">Cancella storia</string>
<string name="reset_warn">Sei sicuro di voler cancellare la storia?</string>
<string name="keyboard_desc">Mostra sempre la tastiera all\'avvio</string>
<string name="keyboard_name">Mostra tastiera</string>
<string name="root_mode_desc">Abilità funzionalità superutente se disponibili (per ibernare le applicazioni)</string>
Expand All @@ -79,6 +83,7 @@
<string name="toggle_data">Connessione dati</string>
<string name="toggle_torch">Torcia</string>
<string name="toggle_sync">Sincronizzazione</string>
<string name="toggle_autorotate">Rotazione automatica</string>
<string name="menu_wallpaper">Aggiorna sfondo</string>
<string name="application_not_found">Ooops… impossibile avviare l\'applicazione.</string>
<string name="history_erased">Storia cancellata.</string>
Expand Down Expand Up @@ -106,7 +111,7 @@
<string name="icons_hide_desc">Attivala per dispositivi lenti</string>
<string name="root_mode_error">Impossibile ottenere privilegi da superutente</string>

<string name="order_apps_name">Ordinamento applicazionie</string>
<string name="order_apps_name">Ordinamento applicazioni</string>
<string name="order_apps_desc">A alla Z oppure Z alla A</string>

</resources>

0 comments on commit 8add3ab

Please sign in to comment.