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

Expose notification handler for new photo #15253

Closed
fxfactorial opened this issue Jul 28, 2017 · 7 comments
Closed

Expose notification handler for new photo #15253

fxfactorial opened this issue Jul 28, 2017 · 7 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@fxfactorial
Copy link
Contributor

fxfactorial commented Jul 28, 2017

I want my application to be notified when there is a new photo added to the CameraRoll. I don't see a way to get that done currently, besides polling. iOS provides this ability with ALAssetsLibraryChangedNotification, but I don't see a single hit for that in the RN codebase, which verifies to me that this is currently not exposed.

I think I can do this after I finish some contract work, assuming that it is indeed the right way....but as I understand ALAssetsLibrary is deprecated anyway and we ought to be using PHPPhotoLibrary, so I don't want to implement something using deprecated frameworks and refactoring RN to use PHPPhotoLibrary is a much larger task than just exposing ALAssetsLibraryChangedNotification.

Thoughts?

(I could also take on refactoring to make RN use PHPPhotoLibrary, a rather large task)

I assume that it could be maybe another event exposed via DeviceEventEmitter?

@hramos
Copy link
Contributor

hramos commented Jul 28, 2017

This issue looks like a question that would be best asked on StackOverflow.

StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

Will close this as this is really a question that should be asked on StackOverflow.

@hramos hramos closed this as completed Jul 28, 2017
@fxfactorial
Copy link
Contributor Author

fxfactorial commented Jul 28, 2017

@hramos Are you serious? Did you even read this? This has nothing to do with StackOverflow.

  1. If ReactNative exposes native APIs
  2. If it is worthwhile to refactor the current code in RN to stop using deprecated APIs.

If the framework does not expose an underlying platform API, then what good is StackOverflow?

@hramos
Copy link
Contributor

hramos commented Jul 28, 2017

@fxfactorial if you believe the issue was closed prematurely, please read the issue template. I also highly advise reading through the Code of Conduct, as your comment is a bit more aggressive than we'd like. Thanks for your understanding.

@fxfactorial
Copy link
Contributor Author

fxfactorial commented Jul 28, 2017

@hramos The issue template has nothing to do with what I'm talking about. I am talking about exposing APIs that aren't currently exposed.

Are you familiar with the ReactNative codebase? Do you know if this functionality is currently exposed? I searched and didn't see it but perhaps you know it better.

Thanks for your understanding.

@hramos
Copy link
Contributor

hramos commented Jul 28, 2017

It does not look like it's exposed. I'm re-opening the issue as it looks like this would fall under "Proposing a change" per the contributor guidelines at http://facebook.github.io/react-native/docs/contributing.html#proposing-a-change. We need to come up with a better way of tagging such issues, as in the future we'll auto-close issues that don't follow the template.

@hramos hramos reopened this Jul 28, 2017
@fxfactorial
Copy link
Contributor Author

@hramos Thank you, apologies about jumping the gun on the keyboard as well.

So I am not sure if it is worth it to extend something deprecated or take on a larger task.

@pull-bot
Copy link

pull-bot commented Oct 9, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Oct 9, 2017
@hramos hramos closed this as completed Oct 9, 2017
facebook-github-bot pushed a commit that referenced this issue Nov 29, 2017
Summary:
WIP: Starting point insofar as I'm not sure if there should be an Android equivalent.

My application needs me to delete photos from the photos in iOS.

I have tested this in my application and it works, have a screenshot from iOS asking as well and it does successfully delete the photos from the global Photos app.

Related to #15253, it kind of continues using the deprecated assets-library framework, but that does need (and will be an bigger and bigger issue coming up) of assets-library URLs being used.

I also assume RN prefers error handling at the JS level? Are the URLs starting with `asset-library`, etc.
Closes #15481

Differential Revision: D6438016

Pulled By: hramos

fbshipit-source-id: 47512140f62f458c14ad2ade2b358846e168c964
bowerman0 pushed a commit to bowerman0/react-native that referenced this issue Dec 5, 2017
Summary:
WIP: Starting point insofar as I'm not sure if there should be an Android equivalent.

My application needs me to delete photos from the photos in iOS.

I have tested this in my application and it works, have a screenshot from iOS asking as well and it does successfully delete the photos from the global Photos app.

Related to facebook#15253, it kind of continues using the deprecated assets-library framework, but that does need (and will be an bigger and bigger issue coming up) of assets-library URLs being used.

I also assume RN prefers error handling at the JS level? Are the URLs starting with `asset-library`, etc.
Closes facebook#15481

Differential Revision: D6438016

Pulled By: hramos

fbshipit-source-id: 47512140f62f458c14ad2ade2b358846e168c964
bowerman0 pushed a commit to bowerman0/react-native that referenced this issue Dec 5, 2017
Summary:
WIP: Starting point insofar as I'm not sure if there should be an Android equivalent.

My application needs me to delete photos from the photos in iOS.

I have tested this in my application and it works, have a screenshot from iOS asking as well and it does successfully delete the photos from the global Photos app.

Related to facebook#15253, it kind of continues using the deprecated assets-library framework, but that does need (and will be an bigger and bigger issue coming up) of assets-library URLs being used.

I also assume RN prefers error handling at the JS level? Are the URLs starting with `asset-library`, etc.
Closes facebook#15481

Differential Revision: D6438016

Pulled By: hramos

fbshipit-source-id: 47512140f62f458c14ad2ade2b358846e168c964
@facebook facebook locked as resolved and limited conversation to collaborators Oct 9, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants