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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title / Share function #3

Closed
hirbod opened this issue Oct 9, 2015 · 32 comments
Closed

Title / Share function #3

hirbod opened this issue Oct 9, 2015 · 32 comments

Comments

@hirbod
Copy link

hirbod commented Oct 9, 2015

Finally someone managed to develop a working solution for both iOS and Android with Remote Image support. And no picture intent on android. 馃憤 馃憤 馃挴 You can't imagine how thankful I am!

Just two small things:

Title for image and Gallery modus (array of images)
UIDocumentController support title, just a small adjustment, but I don't know if Andorid support's title

@sarriaroman
Copy link
Owner

About the two things:

  • Title: yes, it's absolutely possible.
  • Gallery: I didn't thought the plugin to work in that way and the change it's a bit harder.

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

If you find some time.. I would post a bounty on it, but maybe we would find some more people to make a donation for that feature.

By the way, Title should be optional.

@hirbod hirbod changed the title FINALLY Title / Gallery option Oct 9, 2015
@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

Sorry, for the spam: UIDocumentController gives you the ability to save, share etc.
Is it possible to add a (optional) save button on android? Maybe with a long-press-gesture? Nothing important, but nice to have

@sarriaroman
Copy link
Owner

The feature to handle a set of images can be planned. Maybe moving it to a different issues.

The title will be optional. I agree with that.

@sarriaroman
Copy link
Owner

Yes, It's possible with a long press gesture. I can work on both, the share and title ;)

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

馃憤 Thank you.

@hirbod hirbod changed the title Title / Gallery option Title / Share function Oct 9, 2015
@sarriaroman
Copy link
Owner

If you are working over a project you can try pulling from master for both features. I made a push.

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

Wow, you're fast!!!

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

iOS work fine, Android does not work:

/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:20: error: cannot find symbol
    final GestureDetector gestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() {
          ^
  symbol:   class GestureDetector
  location: class PhotoActivity
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:61: error: cannot find symbol
    public boolean onTouchEvent(MotionEvent event) {
                                ^
  symbol:   class MotionEvent
  location: class PhotoActivity
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:20: error: cannot find symbol
    final GestureDetector gestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() {
                                                ^
  symbol:   class GestureDetector
  location: class PhotoActivity
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:20: error: package GestureDetector does not exist
    final GestureDetector gestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() {
                                                                                   ^
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:37: error: cannot find symbol
        actTitle = this.getIntent().getStringExtra("title");
        ^
  symbol:   variable actTitle
  location: class PhotoActivity
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:38: error: cannot find symbol
        if( !actTitle.equals("") ) {
             ^
  symbol:   variable actTitle
  location: class PhotoActivity
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:39: error: cannot find symbol
            this.setTitle(actTitle);
                          ^
  symbol:   variable actTitle
  location: class PhotoActivity

@sarriaroman
Copy link
Owner

Ups... I forgot the imports. Sorry! Added now!

Thanks for you testing :)

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

Nope.. still

/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:66: error: cannot find symbol
    public boolean onTouchEvent(MotionEvent event) {
                                ^
  symbol:   class MotionEvent
  location: class PhotoActivity
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:25: error: cannot find symbol
        public void onLongPress(MotionEvent e) {
                                ^
  symbol: class MotionEvent
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:29: error: cannot find symbol
            sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(imageUrl));
                                                        ^
  symbol: variable Uri
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:31: error: cannot find symbol
            startActivity(Intent.createChooser(shareIntent, "Share"));
                                               ^
  symbol: variable shareIntent
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:41: error: cannot find symbol
        actTitle = this.getIntent().getStringExtra("title");
        ^
  symbol:   variable actTitle
  location: class PhotoActivity
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:42: error: cannot find symbol
        if( !actTitle.equals("") ) {
             ^
  symbol:   variable actTitle
  location: class PhotoActivity
/Users/Hirbod/Desktop/appdev/Nachbarschaft/platforms/android/src/com/speryans/PhotoViewer/PhotoActivity/PhotoActivity.java:43: error: cannot find symbol
            this.setTitle(actTitle);
                          ^
  symbol:   variable actTitle
  location: class PhotoActivity

@sarriaroman
Copy link
Owner

Note that I'm editing in a text editor hehe.

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

:))

@sarriaroman
Copy link
Owner

Done!

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

It works on iOS, and build does not fail on Android anymore, but now I get:

Uncaught ReferenceError: PhotoViewer is not defined

@sarriaroman
Copy link
Owner

I will check in a project because for some reason is not getting the plugin on Android. Did you try to remove the plugin and add it again?

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

yes, I also removed my android platform.

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

also tried to download from npm and directly from git

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

Ok, Problem caused trough

cordova-hot-code-push-plugin

I removed the plugin. Now it works.

@sarriaroman
Copy link
Owner

That's awesome! Thanks for let me know!

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

Weird.. as soon as I install cordova-hot-code-push-plugin, your plugin fail to work. Before I updated everything worked fine.. what happened?

@sarriaroman
Copy link
Owner

I'm reading about the plugin, but the main change that can break it is the domain of the plugin (Plugin ID) updated for NPM.

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

iOS works fine.. I guess there is some cache I need to clear somehow..

@sarriaroman
Copy link
Owner

Please remove the plugin and install the new version. I think that is the plugin id

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

ok

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

Yes, it works, even with cordova-hot-code-push-plugin 馃憤
Thanks. But why does the plugin id make problems?

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

I dont see any title on android, long-press-gesture also does not work

@sarriaroman
Copy link
Owner

Maybe the cordova-hot-code-push-plugin can't accept plugins with dashes in the id ;).

@hirbod
Copy link
Author

hirbod commented Oct 9, 2015

No, I dont think so, I have all the cordova-plugin-file etc installed.
Nevermind, it works now, but as said, title and gesture does not work

@sarriaroman
Copy link
Owner

The long press seems to be related with the PhotoView library that handle the zoom feature. I will go deep on this problem. I'm checking in a project first to update it again.

@sarriaroman
Copy link
Owner

Implemented on version 1.1.1 with a new Title/Share bar.

@hirbod
Copy link
Author

hirbod commented Oct 10, 2015

Confirmed! Looks great and works perfectly. Sadly there is no "save to photos" option, but I think that is ok.

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

2 participants