Giter Site home page Giter Site logo

Not working? about kizzy HOT 27 CLOSED

dead8309 avatar dead8309 commented on May 17, 2024
Not working?

from kizzy.

Comments (27)

dead8309 avatar dead8309 commented on May 17, 2024

Can you provide some screenshots of your custom rpc config and logs screen

from kizzy.

 avatar commented on May 17, 2024

Custom RPC: Screenshot_20230528_232645_Kizzy.jpg

Logs: Screenshot_20230528_232704_Kizzy.jpg

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Provide full screenshot of custom rpc screen

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

Provide full screenshot of custom rpc screen

A friend also had a similar issue recently and i asked her for some screenshots.
She enabled App Detection and selected some games, it's not showing up on Discord.
image
image

I've also been working on an RPC script for another project of mine, and i know that the socket doesn't just close like that, if it does it shows a 40XX error.
Testing with the browser, it seems to be something related to the socket and internet connection (is it the gateway address?).
(Also, i have to give you a huge thanks for the complete documentation on the activity stuff, i couldn't find it anywhere, thank you, Thank You!)

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Code 1000 is a normal closure, it happens:

  • If you manually switch off the rpc
  • Android system shuts down the app to release memory

If your phone is closing the app then you can try disabling battery restrictions for kizzy app

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

Code 1000 is a normal closure, it happens:

  • If you manually switch off the rpc
  • Android system shuts down the app to release memory

If your phone is closing the app then you can try disabling battery restrictions for kizzy app

I've been doing some tests on my phone and sometimes things will just deactivate when switching apps, and enabling Apps Detection won't start the service until Custom RPC is enabled (Apps Detection won't show the gateway logs until the Custom RPC is enabled first, which does connect to the gateway), and after switching apps and testing some more, it finally saved the state and now it kinda works as it should

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Apps rpc doesn't run gateway indefinitely.If a selected app is detected then it starts the gateway and set presence and once that app is no longer running, gateway gets closed.

This is done to avoid consuming battery

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

Apps rpc doesn't run gateway indefinitely.If a selected app is detected then it starts the gateway and set presence and once that app is no longer running, gateway gets closed.

This is done to avoid consuming battery

I know, and that was a great idea, i'm just saying that, that service doesn't start as soon as you enable Apps Detection, unless Custom RPC is enabled first and you play with its settings a little (happened twice already on two different devices)
That also happened on the first and second run of the app though, after that, it does work like normal.

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

I know, and that was a great idea, i'm just saying that, that service doesn't start as soon as you enable Apps Detection

That's what I was saying, that rpc in app detection will only start once it detects the app, not from the starting the service

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

That's what I was saying, that rpc in app detection will only start once it detects the app, not from the starting the service

The issue i have is with the service rather than the gateway socket.
When you enable Apps Detection first, the service (and so this notification) won't show up, doesn't matter if you re-open the app, it just won't for some reason.
But, once enabling Custom RPC (which does show the service notification for it), and enabling Apps Detection again, it does show the notification, regardless of choosing and starting any selected app.
Again, this issue only happened to me on the first and second launch of the Kizzy app.
If i had to guess it's just Android having trouble starting a service for whatever reason, it happened to me while i was testing apps in the past.
image

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

If i had to guess it's just Android having trouble starting a service for whatever reason, it happened to me while i was testing apps in the past.

Then it's your device issue, nothing much i can do about it

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

If i had to guess it's just Android having trouble starting a service for whatever reason, it happened to me while i was testing apps in the past.

Then it's your device issue, nothing much i can do about it

How about my other device, TeaEndsAcronyms's device, and my friend's device?
More info i can provide, i have Android 12, they have Android 13, and my other device has Android 8

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

Suggestion: Check if service is running when enabling any RPC option, after some time if it's not running and not cancelled by the user, restart it automatically, or give the user a warning

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

After telling her the steps i did to fix it, now it works for her.
image

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Suggestion: Check if service is running when enabling any RPC option, after some time if it's not running and not cancelled by the user, restart it automatically, or give the user a warning

It already does that

when (serviceEnabled) {
true -> {
ctx.stopService(Intent(ctx, MediaRpcService::class.java))
ctx.stopService(Intent(ctx, CustomRpcService::class.java))
ctx.stopService(Intent(ctx, ExperimentalRpc::class.java))
ctx.startService(Intent(ctx, AppDetectionService::class.java))
}
false -> ctx.stopService(Intent(ctx, AppDetectionService::class.java))
}

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Closing this as you are not providing

  • Logs which states there's any bug or crash
  • Steps to reproduce this issue

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

It already does that

That's what i've assumed looking at the logs but, i'm talking about calling ctx.startService a second time if the service itself it's not running, like a second after

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

Closing this as you are not providing

  • Logs which states there's any bug or crash
  • Steps to reproduce this issue

Wait but i did it for him, if you can just start the app in an emulator and only enabling App Detection and testing if it appears on Discord

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Closing this as you are not providing

  • Logs which states there's any bug or crash
  • Steps to reproduce this issue

Wait but i did it for him, if you can just start the app in an emulator and only enabling App Detection and testing if it appears on Discord

I already did that a couple of times, even tried on my phone

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

I already did that a couple of times, even tried on my phone

I'll try to reproduce the issue consistantly and send a video clip

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Sure

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

Sure

Had to upload it there since it was over 30MB in size
Did this three times and it happened every time
https://youtu.be/hKJTw4KXVxc

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

The issue was not related to gateway neither the service, the service started instantly as you can see the notification icon on status bar. The actual problem was you selecting the app after enabling apps rpc . You have to select the apps before launching service

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

The issue was not related to gateway neither the service, the service started instantly as you can see the notification icon on status bar. The actual problem was you selecting the app after enabling apps rpc . You have to select the apps before launching service

Which may be kind of counterintuitive since the App Detection switch appears before you can see your apps.
If your service can only start with certain data then, restart the service every time a new app is selected after enabling apps rpc.

Wait, does that mean if you enable other apps while Apps Detection is active, they won't show up until disabled and enabled again?

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Which may be kind of counterintuitive since the App Detection switch appears before you can see your apps.

It's there so people can quickly start/stop services.

Wait, does that mean if you enable other apps while Apps Detection is active, they won't show up until disabled and enabled again?

The enabled apps data is stored in preferences, and it's not very efficient to repeatedly read the data from JSON and convert it into data classes every 5 seconds. Therefore, it would be more efficient to retrieve and process the data once at the start of the service rather than inside the loop."

from kizzy.

andrewdevcup avatar andrewdevcup commented on May 17, 2024

The enabled apps data is stored in preferences, and it's not very efficient to repeatedly read the data from JSON and convert it into data classes every 5 seconds. Therefore, it would be more efficient to retrieve and process the data once at the start of the service rather than inside the loop."

Alright, so, if efficiency is the concern then, for the user experience, at least add a popup saying "Please select an app before enabling App Detection, do this for any new app you want to add." If no apps are selected, the enable button just makes you go to the app list, a feedback animation would be nice (it'll be better than MIUI).
Although restarting the service for selecting any new app also works.
It's all just for the sake of comfort using the app, fancy good looking UIs.

Idk very well how is your service structure, but if you could, send the JSON data from the app to the service every time the app is put in background, the service is enabled and app selection has been changed.

from kizzy.

dead8309 avatar dead8309 commented on May 17, 2024

Not prioritising this as I am busy with other stuffs however if you wish you can make a pr with the said changes.

from kizzy.

Related Issues (20)

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.