-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ba2bbbb
Showing
32 changed files
with
994 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,23 @@ | ||
*.iml | ||
*.log | ||
*.hprof | ||
*.apk | ||
*.jks | ||
*.keystore | ||
.gradle | ||
.idea | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
*/build | ||
/captures | ||
output.json | ||
google-services.json | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 ed | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,41 @@ | ||
# Party UP! | ||
|
||
upload files and links to a copyparty server by sharing them to this app | ||
|
||
primarily made for this year's meadup, letting a room full of nerds throw memes onto the big screen | ||
|
||
only the PUT API is implemented for now so there is no integrity checks or resumable uploads yet | ||
|
||
|
||
## basic usage | ||
|
||
* install the app | ||
* open it and set your server url (and password if applicable) | ||
|
||
now all share buttons in other apps/browsers will have "Party UP!" as an option, letting you upload pics / vids / twitter links / anything really | ||
|
||
|
||
## the full experience | ||
|
||
setup a raspberry pi (raspbian or something else with a desktop) with the [very-bad-idea](https://github.com/9001/copyparty/blob/hovudstraum/bin/mtag/very-bad-idea.py) plugin: | ||
|
||
```bash | ||
sudo apt install xdotool wmctrl libnotify-bin | ||
curl -LO https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py | ||
curl -LO https://raw.githubusercontent.com/9001/copyparty/hovudstraum/bin/mtag/very-bad-idea.py | ||
python3 copyparty-sfx.py --urlform save,get -v.::rw:c,e2d,e2t,mte=+a1:c,mtp=a1=ad,very-bad-idea.py | ||
``` | ||
|
||
now, every time someone uploads something, it'll appear on the screen | ||
* there is no queue system, it just goes | ||
|
||
check the startup script in the very-bad-idea docstring for some bonus features, | ||
* display a QR-code on the screen which takes people to the upload page | ||
* make chrome autoplay audio on all pages | ||
|
||
also [twitter-unmute.user.js](https://github.com/9001/copyparty/blob/hovudstraum/bin/mtag/res/twitter-unmute.user.js) to play twitter links with audio | ||
|
||
|
||
# known issues | ||
|
||
* sharing large files (over 100 MiB or so) is probably a bad idea |
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,64 @@ | ||
plugins { | ||
id 'com.android.application' | ||
} | ||
|
||
android { | ||
signingConfigs { | ||
release { | ||
storeFile file('/home/ed/.android/debug.keystore') | ||
storePassword 'android' | ||
keyAlias 'androiddebugkey' | ||
keyPassword 'android' | ||
} | ||
} | ||
compileSdk 28 | ||
|
||
defaultConfig { | ||
applicationId "me.ocv.partyup" | ||
minSdk 28 | ||
targetSdk 28 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
signingConfig signingConfigs.release | ||
minSdkVersion 28 | ||
targetSdkVersion 28 | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
buildFeatures { | ||
viewBinding true | ||
} | ||
compileSdkVersion 28 | ||
|
||
// "Lint found fatal errors while assembling a release target:" | ||
// "Google Play requires that apps target API level 29 or higher" | ||
// lol how about no | ||
lintOptions { | ||
checkReleaseBuilds false | ||
//abortOnError false | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation 'androidx.appcompat:appcompat:1.3.1' | ||
implementation 'com.google.android.material:material:1.4.0' | ||
implementation 'androidx.preference:preference:1.1.1' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.1.2' | ||
implementation 'androidx.navigation:navigation-fragment:2.3.5' | ||
implementation 'androidx.navigation:navigation-ui:2.3.5' | ||
testImplementation 'junit:junit:4.+' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.3' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' | ||
} |
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,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# 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 *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
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,20 @@ | ||
{ | ||
"version": 3, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "me.ocv.partyup", | ||
"variantName": "release", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"attributes": [], | ||
"versionCode": 1, | ||
"versionName": "1.0", | ||
"outputFile": "app-release.apk" | ||
} | ||
], | ||
"elementType": "File" | ||
} |
26 changes: 26 additions & 0 deletions
26
app/src/androidTest/java/me/ocv/partyup/ExampleInstrumentedTest.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,26 @@ | ||
package me.ocv.partyup; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); | ||
assertEquals("me.ocv.partyup", appContext.getPackageName()); | ||
} | ||
} |
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,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="me.ocv.partyup"> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<application | ||
android:label="@string/app_name" | ||
android:usesCleartextTraffic="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:roundIcon="@drawable/ic_launcher" | ||
android:allowBackup="true" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.PartyUP"> | ||
<activity | ||
android:name=".XferActivity" | ||
android:exported="true" | ||
android:label="@string/title_activity_xfer" | ||
android:theme="@style/Theme.PartyUP.NoActionBar"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.SEND" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<data android:mimeType="text/plain" /> | ||
</intent-filter> | ||
<intent-filter> | ||
<action android:name="android.intent.action.SEND" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<data android:mimeType="image/*" /> | ||
</intent-filter> | ||
<intent-filter> | ||
<action android:name="android.intent.action.SEND" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<data android:mimeType="video/*" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".SettingsActivity" | ||
android:exported="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> | ||
</application> | ||
|
||
</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,33 @@ | ||
package me.ocv.partyup; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.appcompat.app.ActionBar; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.preference.PreferenceFragmentCompat; | ||
|
||
public class SettingsActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.settings_activity); | ||
if (savedInstanceState == null) { | ||
getSupportFragmentManager() | ||
.beginTransaction() | ||
.replace(R.id.settings, new SettingsFragment()) | ||
.commit(); | ||
} | ||
ActionBar actionBar = getSupportActionBar(); | ||
if (actionBar != null) { | ||
actionBar.setDisplayHomeAsUpEnabled(true); | ||
} | ||
} | ||
|
||
public static class SettingsFragment extends PreferenceFragmentCompat { | ||
@Override | ||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | ||
setPreferencesFromResource(R.xml.root_preferences, rootKey); | ||
} | ||
} | ||
} |
Oops, something went wrong.