Skip to content
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

compile apk #42

Open
ahmaddxb opened this issue Apr 29, 2024 · 12 comments
Open

compile apk #42

ahmaddxb opened this issue Apr 29, 2024 · 12 comments

Comments

@ahmaddxb
Copy link

ahmaddxb commented Apr 29, 2024

Could you give some instructions of how to do the compiling of this apk. I want SMS functionality.

e.g Github actions workflow that will get it built.

I have forked your repo to try this myself, not sure how to get it working. You can see what I have done in my fork.

https://github.com/ahmaddxb/financisto1-holo

@tiberiusteng
Copy link
Owner

Clone the repo locally, import with Android Studio, and (theoretically) it should build. I haven't tried cloning and building from scratch for a while frankly ...

You don't need to recompile for SMS access actually, as long as your phone shows notification for received SMS messages (that including message text and sender number/name), you can use the new Notification Template feature to achieve the same result.

@ahmaddxb
Copy link
Author

Thanks for your help, I will give it a try locally. I was hoping to do it with github actions, I will try locally and give github more effort when I can.

I have tonnes of SMS templates that need changing that's why, yes I should go through and change them all but that will take time.

@ahaghshenas
Copy link

ahaghshenas commented Apr 29, 2024

You don't need to recompile for SMS access actually, as long as your phone shows notification for received SMS messages (that including message text and sender number/name), you can use the new Notification Template feature to achieve the same result.

Hi,

I have tested this, and it is great with my tests with other notifications, eg WhatsApp and telegram, but I cannot get it to capture incoming SMS.

Screenshot_20240429_195826_Financisto

This is an old template that has been working on previous app

@tiberiusteng
Copy link
Owner

tiberiusteng commented Apr 29, 2024

Hi,
I've encountered similar issues, in my case it's displayed SMS/contact name not exactly matched the title pattern (you can put % at start or end for wildcard string match). With the config in your screenshot the notification title posted by SMS app must exactly displayed as WioPersonal for it to work.

Wait for next SMS sent by it, don't swipe it away, go to Notification Template list activity and use the right-top list button to copy exactly what the app sees the notification, and build on that.

@ahaghshenas
Copy link

Hi,

Did a test without result, screenshots attached. Am I missing something?

Screenshot_20240429_203547_Financisto

Screenshot_20240429_203617_Financisto

@tiberiusteng
Copy link
Owner

Strange ... sender with Amir Haghshenas should work. Is that what you copy/pasted from notification list? (click entry to copy)

you can try a last resort that put % on sender so it tries to search the message body on every notification.

for the message body part, you don't need to put {{}} at the end (it's using regex search substring so you only need {{}} if you want to skip something in center)

@ahmaddxb
Copy link
Author

ahmaddxb commented Sep 24, 2024

I managed to compile the app and install it on my phone. SMS permissions are still not there.

I have tried testing it with an SMS and it's not picked up.

Screenshot_20240924_164428_Permission controller

@tiberiusteng
Copy link
Owner

I don't think the old code path decoding SMS payload will work on new android versions (I never tested that part with my environment).

@ahmaddxb
Copy link
Author

ahmaddxb commented Sep 24, 2024

I still use the original financisto with sms support and I'm on android 14. Sms does still work.

Screenshot_20240924_204843_Permission controller.jpg

@tiberiusteng
Copy link
Owner

you will need to add following sections to AndroidManifest.xml to get SMS permission:

<uses-permission android:name="android.permission.RECEIVE_SMS" />

<receiver
    android:name=".service.SmsReceiver"
    android:exported="true"
    android:permission="android.permission.BROADCAST_SMS">
    <intent-filter android:priority="1000"> <!-- https://stackoverflow.com/a/23732410/365675 -->
        <action android:name="android.provider.Telephony.SMS_RECEIVED" />
    </intent-filter>
</receiver>

and modify RequestPermissionActivity.java to un-comment this line

disableToggleIfGranted(Manifest.permission.RECEIVE_SMS, toggleSms, toggleSmsWrap);

and delete the following line

toggleSmsWrap.setVisibility(View.GONE);

to make the switch appear.

But I'm curious on the behavior of SMS notification on your device - Does it show notification? Does the notification have the message body? Is it showing but Financisto can't obtain its contents or it's completely not showing?

@ahmaddxb
Copy link
Author

Ok, thanks I will give it a try.

The sms I tested is sending myself an sms from the same sim. When you do that there is no notification as you get normally in your notification.

If I get sms working with your changes then the testing method I'm doing will work as it reads the sms and doesn't look for the notification.

@ahmaddxb
Copy link
Author

I don't know if you have added android intents to this app but if I could add transactions with android intents it would be useful. I currently use macrodroid to handle sms for another application. Macrodroid can manipule sms data and send intents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants