Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-20533

Ti.Android.Intent is not working properly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Duplicate
    • Affects Version/s: Release 5.2.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
      None
    • Environment:

      Mac OS X El Captain
      SDK: 5.1.1GA - 5.2.0GA
      Device: Real (Sony Xperia Z2) and GenyMotion Simulator

    • Story Points:
      8
    • Sprint:
      2018 Sprint 10 SDK

      Description

      Steps to Reproduce

      var filename = 'someImage.jpg';
       
      var file = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, filename);
       
      var window = Ti.UI.createWindow({
      	backgroundColor: 'white'
      });
       
      	var imageView = Ti.UI.createImageView({
      		top: 0,
      		width: '100%',
      		image: file.nativePath
      	});
      	
      	var shareButton = Ti.UI.createView({
      		height: 100,
      		width: 200,
      		backgroundColor: 'purple',
      		bottom: 0,
      	});
      	
       
      	window.add(imageView);
      	window.add(shareButton); 
       
       
      	shareButton.addEventListener('click', function() {
      		alert('shareClick');
      		
      		var shareIntent = Ti.Android.createIntent({
      	        action: Ti.Android.ACTION_SEND,
      	        type: "image/jpeg"
              });
       
      	    shareIntent.putExtra(Ti.Android.EXTRA_TITLE, 'title');
      	    shareIntent.putExtra(Ti.Android.EXTRA_TEXT, 'text');
      	    shareIntent.putExtraUri(Ti.Android.EXTRA_STREAM, file.nativePath);
      	    Ti.Android.currentActivity.startActivity(Ti.Android.createIntentChooser(shareIntent, 'share'));
      		
      	});
       
      window.open();
      

      Actual Result

      .putExtra() and .putExtraUri() is not working properly because EXTRA_TEXT, EXTRA_TITLE, EXTRA_STREAM is not showing in app - fields (text, title) are blank, and shared image is blank (Facebook, Messages - 1. shared.png) or application is returning message that it was impossible to read image.

      It's a new bug (AS 4.5.0) because this function was working properly in earlier version.

      Everything is fine with image because it is showing in the app. (1. screen.png)

      Expected Result

      Removing bug. It is blocking whole share functionality

        Attachments

        1. .log
          8.67 MB
        2. 1. screen.png
          1. screen.png
          131 kB
        3. 1. shared.png
          1. shared.png
          58 kB

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                CREATIVE KAIZEN CREATIVE KAIZEN
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-7028
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration