Giter VIP home page Giter VIP logo

gthvmt / 7tv-for-whatsapp Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 1.0 2.79 MB

An android app to bring your favorite third-party twitch emotes directly to WhatsApp!

License: GNU General Public License v3.0

Kotlin 0.08% Swift 1.01% Objective-C 0.02% Dart 53.85% CMake 11.23% C++ 12.82% C 0.85% HTML 1.10% Rust 16.75% Dockerfile 1.93% Just 0.34%
7tv twitch whatsapp whatsapp-sticker whatsapp-stickers android android-app

7tv-for-whatsapp's Introduction

7TV for WhatsApp

Bring your favorite third-party twitch emotes directly to WhatsApp!

๐Ÿ“– About

Screenshot This app aims to make any 7TV emote usable in WhatsApp by turning it into a WhatsApp sticker. This is done by scaling the emote to 512 x 512 pixels while keeping its filesize below 500KB using compression and grouping it with a minimum of two other emotes into Sticker packs.
The upscaling and compression should happen relatively fast, since it uses rust under the hood ๐Ÿฆ€
Also this is my first flutter/dart (and rust) project (and app in general) so please have some mercy with my spaghetti code ๐Ÿ™

๐Ÿ‘จโ€๐Ÿ’ป Development

Using a Dev-Container

The simplest and recommended approach is to use the provided dev-container:

  1. Install docker on your host system
  2. Clone this repository including the submodule:
    git clone https://github.com/gthvmt/7TV-for-WhatsApp.git --recurse-submodules
  3. Install the visual studio code "Dev Containers"-extension
  4. (Re)open the cloned repository inside the devcontainer

Debugging

  1. Download the Android studio sdkmanager CLI on your host and add the bin directory to your PATH to get access to the android debug bridge (adb.exe)*
  2. Enable USB-Debugging on your Android device
  3. Make sure your Android device is connected to the same network as your PC
  4. Get the IP-adress of your Android device
  5. Connect your Android device to your PC using USB
  6. Run
    adb tcpip 5555
    adb connect <IP of your Android Device>:5555
    
  7. Run adb connect <IP of your Android Device>:5555 inside of the Dev-Container
  8. Run flutter run inside of the src directory (in the Dev-Container). If you get any errors try running just build first.

*I had some problems on windows where adb would not recognise my device a bunch of times, using https://github.com/koush/UniversalAdbDriver instead seemed to resolve this issue

If you do not have access to an android device, the dev-container comes with emulators pre-installed; so in theory it should be possible to debug the app using an emulator. I have never tested this though.

Working directly on the host system

If you are not able to install docker on your host or your host does not have the sufficient hardware you can follow this approach instead:
(this assumes that you are using visual studio code. Developing inside android studio should also work and be easier to set up but I have never done that)

  1. Install flutter
  2. Install rust
  3. Download/Install OpenJDK 11 and add the bin directory to your PATH
  4. Download the Android studio sdkmanager CLI and add the bin directory to your PATH
  5. Add the ANDROID_HOME environment variable
  6. Install the "platform-tools" using the sdkmanager
  7. Optionally install android emulator(s) using the sdkmanager
  8. Install the Android NDK and add the environment variables ANDROID_NDK and ANDROID_NDK_HOME
  9. Install just (optional), cargo-ndk and flutter_rust_bridge_codegen using cargo:
    cargo install just cargo-ndk flutter_rust_bridge_codegen
  10. Configure rust:
    rustup component add rustfmt
    rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
    

I may have missed a step here but it should be an OK guideline if you want/need to contribute to this project while working directly on your host. Feel free to check out the devcontainer file or submit a PR to fix or expand this list.

Debugging

  1. Enable USB-Debugging on your Android device
  2. Connect your Android device to your PC using USB
  3. Run flutter run inside of the src directory

๐Ÿบ Buy me a beer!

Actually, I dont even like beer...
I initially had the thought of monitizing this app by (for example) putting the ability to set a custom sticker pack provider name behind a paywall. Ultimately I decided against it because I am too lazy to implement it (and paywalls kinda suck). If you would still like to throw some money at me, you can do so here:
https://ko-fi.com/gthvmt

7tv-for-whatsapp's People

Contributors

gthvmt avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bheniamyn

7tv-for-whatsapp's Issues

Display dialog on uncaught exceptions

I think it would be a good idea to show a dialogue for all uncaught exceptions.
The dialogue could contain the exception message along with a prompt to open a github issue (and check if there are any similar (open) issues first). Maybe add a button to copy the stack trace to the clipboard?
This should improve the speed of finding the origin of bugs.

For development on this issue, see this: https://docs.flutter.dev/testing/errors

Retry 7TV API calls

For some reason sometimes requests to the 7TV API for getting emotes return an empty list even though there are emotes available. Retrying these requests generally resolves this issue. One can experience this on the 7TV website as well when filtering for the top and/or trending emotes. Maybe this is done for rate limiting purposes?

url does not lead to a valid webp

Exception:

url does not lead to a valid webp

Stacktrace:

#0      Host.checkIfAnimated (package:seventv_for_whatsapp/models/seventv.dart:296)
<asynchronous suspension>
#1      _BrowserState._createStickerAndAddToPack (package:seventv_for_whatsapp/screens/browser.dart:157)
<asynchronous suspension>

Steps to reproduce:

Sticker Pack can't be added

So ive been trying to add some stickers to packs and some packs have some errors

So first of all I went to add emotes I know would add to whatsapp and then i started adding emotes one by one from a pack that won't work, and it just comes down to some random emotes that brakes the pack

So I'll add screenshots, first 3 emotes in Test2 is emotes that I know work and the rest is added from the pack called yepp that doesn't work and lastly the emote with the fish smoking which is the broken one doesn't want to be added to the pack that works and has already been added to whatsapp

Also don't mind some of the emotes, they were for testing purposes

Screenshot_20240105_004739_com whatsapp
Screenshot_20240105_004752_com whatsapp

Then i tried adding the fish

Details

Screenshot_20240105_004852_com gthvmt seventv_for_whatsapp
Screenshot_20240105_004859_com gthvmt seventv_for_whatsapp

But the only option is to add it to Backtolife pack which is a broken pack and also it doesn't want to add it to another broken pack called lol

Details

Screenshot_20240105_004912_com whatsapp
Screenshot_20240105_004939_com whatsapp

Set up github action to automatically push container image

This action run failed because the pushed container image was outdated.
Set up an action to automatically push the latest container image generated from the Containerfile - this should ideally only be done if the containerfile was touched in the commit that triggered the action (because it takes a pretty long time).
Maybe push seperate images for the development and master branch instead only having one image with the 'latest' tag?

Animated emotes don't work

Hey,
First of all, you did a great job with this App. Secondly, Animated emotes don't work properly on the app. They can't be added to a sticker pack.

:)

Display stickers that are currently being processed in the StickerPack view

Either add an option to refresh the StickerPack view by dragging up and reload all available stickers to add those which just finished processing or display stickers that are currently being processed with a specific filter applied. Doing it the latter way would also add the ability to disable the "add to whatsapp" button while stickers are stil being processed for the given StickerPack.

Support animated emotes which cant be compressed below 500KB

It seems like some animated emotes arent able to be compressed below 500KB (after upscaling).
One example for this is "vkusno".
Even if we encode the upscaled frames of this emote with a our minimum target size (1 byte) the output is still above 500KB.
One way to resolve this issue could be to remove every second frame of the animation. This should roughly be able to cut the filesize in half (I would assume?) and as that emote looks like it has a high framerate it shouldnt be too noticeable.

Add indication for duplicate stickers

When adding a sticker to a pack display a visual indicator at the respective pack to show the user that the sticker already exists in this pack. Alternatively the pack can be grayed out to show that.

user guide

hi, i downloaded the app and added some emotes to sticker packs but they dont show up in whatsapp. there is a greyed out add to whatsapp button on the sticker pack screen. could you let me know how to do it? thanks

App closes instantly upon opening

Title says it all.
Device: Google Pixel 8 Pro
Android 14, completely updated.

No errors whatsoever. Using the latest .apk v1.1.0 from the releases.
I'd love to help resolving this issue.

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.