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

Custom sounds #4

Merged
merged 3 commits into from Mar 4, 2024
Merged

Custom sounds #4

merged 3 commits into from Mar 4, 2024

Conversation

cgfischer
Copy link
Contributor

I took a crack at trying to add a property and resolve it in the Android Java using a main/res/raw resource name. Not really familiar with Java or how to test Android specific code with flutter. Hoping this helps and you can tidy up any mistakes on my part.

@stefanschaller
Copy link

@caseyryan What do you think? I would appreciate the feature in the new release .

@jtmcdole
Copy link
Contributor

jtmcdole commented Mar 4, 2024

Kind ping from 2024 :)

@caseyryan caseyryan merged commit e739beb into caseyryan:master Mar 4, 2024
@caseyryan
Copy link
Owner

caseyryan commented Mar 4, 2024

Kind ping from 2024 :)

Hi. I've merged this and updated flutter / dart restrictions. I haven't cheched it myself though, since I don't use this package anymore.
The updates are available in version 3.0.0 https://pub.dev/packages/flutter_notification_channel

@jtmcdole
Copy link
Contributor

jtmcdole commented Mar 4, 2024

I just tried to compile with it and got:

Local\Pub\Cache\hosted\pub.dev\flutter_notification_channel-3.0.0\android\src\main\java\com\softmaestri\notification\channel\flutter_notification_channel\FlutterNotificationChannelPlugin.java:88: error: cannot find symbol
              uri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"+ getApplicationContext().getPackageName() + "/raw/" + customSound);
                              ^
  symbol:   variable ContentResolver
  location: class FlutterNotificationChannelPlugin
\Pub\Cache\hosted\pub.dev\flutter_notification_channel-3.0.0\android\src\main\java\com\softmaestri\notification\channel\flutter_notification_channel\FlutterNotificationChannelPlugin.java:88: error: cannot find symbol
              uri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"+ getApplicationContext().getPackageName() + "/raw/" + customSound);
                                                                               ^
  symbol:   method getApplicationContext()
  location: class FlutterNotificationChannelPlugin
\Local\Pub\Cache\hosted\pub.dev\flutter_notification_channel-3.0.0\android\src\main\java\com\softmaestri\notification\channel\flutter_notification_channel\FlutterNotificationChannelPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

@jtmcdole
Copy link
Contributor

jtmcdole commented Mar 4, 2024

I'll try to fork and test tomorrow

@caseyryan
Copy link
Owner

I'll try to fork and test tomorrow

I would appreciate it, since I absolutely have no time to support some of my packages at the moment

@jtmcdole
Copy link
Contributor

jtmcdole commented Mar 5, 2024

I tried... but this plugin is fairly old (java, old embedding, etc) and every thing I've done has failed to get it even analyzing in android studio. The plugin is fairly simple; so I wonder if it's worth a nuke, re-create, and copy over the meat. Thoughts?

@jtmcdole
Copy link
Contributor

jtmcdole commented Mar 5, 2024

nuke-it-from-orbit worked. I'll put up a chaunky pull request.

@caseyryan
Copy link
Owner

I tried... but this plugin is fairly old (java, old embedding, etc) and every thing I've done has failed to get it even analyzing in android studio. The plugin is fairly simple; so I wonder if it's worth a nuke, re-create, and copy over the meat. Thoughts?

Yeah, I think that's the best option. Way better than trying to fix the current solution

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

Successfully merging this pull request may close these issues.

None yet

4 participants