New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP]: Bundling of retroshare-service apk using QT #2
Conversation
I merged the original PR, so I suppose this one should be rebased on the existing code. |
ok @csoler. This PR is not completed yet. This require some more changes. Once it will complete, I will let you know then after you will merge this pull request. |
Finally I have implemented this feature. Now, we do not need to download retroshare-service apk. WhatsApp.Video.2021-06-08.at.23.11.31.mp4 |
@defnax @csoler where are the login jsonapi available ? I am facing problem in this api. I want to recheck this api route in retroshare. So I can check the parameters of this request. final accountDetails = {
"location": {
"mLocationName": nodeName,
"mPgpName": username,
},
"password": password,
'makeHidden': false,
'makeAutoTor': false
};
final response = await http.post(
'http://localhost:9092/rsLoginHelper/createLocation',
body: json.encode(accountDetails));
if (response.statusCode == 200 && json.decode(response.body)['retval']) {
dynamic resp = json.decode(response.body)['location'];
Account account = Account(resp['mLocationId'], resp['mPgpId'],
resp['mLocationName'], resp['mPgpName']);
return Tuple2<bool, Account>(json.decode(response.body)['retval'], account);
} else {
throw Exception('Failed to load response');
} |
i dont know about these maybe ask |
Thanks @defnax. |
Hi
You can find the API defined on this headers: https://github.com/RetroShare/RetroShare/tree/master/libretroshare/src/retroshare You hace to use the Another trick, from your computer, with your phone conected, you can talk with the android retroshare service using: adb forward tcp:9091 tcp:9092 # This will redirect your computer 9091 port to the 9092 on your phone
# Then use curl to test API endpoints
curl -u "test:test" -d '{ "forumId" : "5abe40ea3f194a69b066ec58d6063a03" }' http://127.0.0.1:9091/rsGxsForums/getForumsSummaries This will help you to debug your problems |
But my question is why this above code is not working. |
Hi,
|
I am using the isRetroshareRunning function for checking retro share is running or not like elrepo.io do and the return type of isRetroshareRunning is coming |
Try to debug the response, use the method I suggested, check the response status code etc... We need more info to diagnosticate the problem.. |
It worked with
one more problem I am facing sometimes this exception showed up which crash the app
|
@csoler Now, everything is working properly. Now it's ready to merge. |
I tried to run this PR from linux. It seems that something's missing: "flutter run" generates the following errors: ERROR: lib/common/input_chips/chips_input.dart:67:7: Error: The non-abstract class 'ChipsInputState' is missing implementations for these members: ERROR: ../../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux-0.5.4/lib/flutter_redux.dart:77:19: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'. ERROR: ../../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_redux-0.5.4/lib/flutter_redux.dart:79:14: Error: The method 'ancestorInheritedElementForWidgetOfExactType' isn't defined for the class 'BuildContext'. |
@csoler which flutter version are you using.sometimes these problem are usual when flutter version is different. In windows, it's is not showing any error. |
I'm using 2.2.1 on Ubuntu 20.04. Seems these errors are not complicated to fix. It looks like these functions are not used and the compiler only complains as error instead of warning. Defining them as doing nothing should fix it right? |
Hi @csoler it seem that could be a problem with flutter version that has deprecated some plugins... Maybe. For @Kumaravinash9 as I understand, the not working method is |
You are using the latest version of flutter. There are many packages are not working properly with the new version of flutter like redux in this module. Run the following command to see a list of available versions. flutter version Then choose a version you want to switch to by running flutter version v1.17.1 ( i am using this version now) |
already added by taking a help of |
|
Once have a look at this link https://stackoverflow.com/questions/49468321/how-to-downgrade-flutter-sdk-dart-1-x and try to migrate the flutter version to flutter version v1.17.1 |
Sorry to ask that, but why do we have to stick with an old---unsupported---version of flutter for this project? Isn't that counterproductive? Also I really lack time now, so I can't spend too long debugging why flutter doesn't allow me to downgrade. |
Actually i have already planned to migrate the flutter version of repo with new version in second phase of |
I guess there won't be much differences if you try to just upgrade flutter redux, maybe is easier for everybody :) FYI:
So just to warn you that the code is a little "Frankenstein Code". Also, it only supports in a buggy way the old and deprecated RetroShare chat system. (just for your information) In my opinion, if you give support for forums will be absolutely awesome and I will make a golden statue of "you using retroshare in your phone" :) . |
Thanks @selankon. I didn't have info about this problem. Now,I will update the repo with current version then. |
Hello @csoler. I have updated the repo with newer version. Have a look please. Some changes still needed but we can use the app now. |
Preview : WhatsApp.Video.2021-06-15.at.23.20.08.mp4 |
thx for the update. Now it runs for me!
|
Fix : #3
Fix : #10