Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-3112

Intent Result Activity return Image objects is null

    Details

      Description

      The Android intent result activity will get the image objects and image path.

      But Titanium supporting only for returning the image path . Please review my queries and let me know.

      Huawei U8650 will returning the image path is null. "It will return the image object."

      I have explained the both titanium and android code : The Titanium intent result activity not supporting the object return.

      var win = Ti.UI.createWindow();

      var address = "Take the Picture"; var lblAddress = Titanium.UI.createLabel({ text: "link an adress ", color: 'blue', font:

      { fontSize: 14, fontWeight: 'normal' }

      , width: 'auto', textAlign: 'left', top: 1, left: 10, height: 'auto' }); var intent; lblAddress .addEventListener('click',function(){

      intent = Titanium.Android.createIntent(

      { action: 'android.media.action.IMAGE_CAPTURE',type: 'jpg' }

      );

      var ImageUri = null var fileNativePath1 = null;

      Titanium.Android.currentActivity.startActivityForResult(intent, function(e) { if (e.error) {

      Ti.UI.createNotification(

      { duration: Ti.UI.NOTIFICATION_DURATION_LONG, message: 'Error: ' + e.error }

      ).show();

      } else {

      if (e.resultCode === Titanium.Android.RESULT_OK)

      { fileNativePath1 = e.intent.data; // Huawei U8650 will returning the image path is null var image1 = fileNativePath1; var tmp = jpglib.Resize(fileNativePath1,activity2);// code for resizing the image anImageView.image = tmp; var img1str = Ti.Utils.base64encode(tmp); var setimg1str = Ti.App.Properties.setString('getimg1str', img1str); }


      }
      });

      });

      win.add(lblAddress); win.open();

        Attachments

          Activity

            People

            • Assignee:
              btran Betty Tran
              Reporter:
              gnanaoli Gnanaoly
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration