Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
nemory
Posts: 217
Registered: ‎05-21-2012
My Device: BlackBerry RED Z10
Accepted Solution

HELP Invoking Video Editor - Problem

I followed all the formats here

https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/video_edit...

 

When this function runs, the screen dims a little bit then goes back to a the normal screen brightness. this means it actually tries invokes it but doesnt seem to continue. this also happens to some apps like Blaq, when I share an image in the Pictures Application to Blaq sometimes this happens too. I also tried the below code to 10.1 and 10.2 devices Z10 and a Dev Alpha C.

 

this is the file that's being passed and does really exist and valid 

 

file:///accounts/1000/shared/camera/VID_00000001.mp4

 

And this is my function

 

void VideoEditor::invokeVideoEditor(QString filePath)
{
	bb::system::InvokeRequest request;
	request.setTarget("sys.video_editor.card");
	request.setAction("bb.action.EDIT");
	request.setUri(filePath);
// also tried with this uncommented //request.setFileTransferMode(bb::system::FileTransferMode::CopyReadWrite); request.setMimeType("video/mp4"); invokeManager->invoke(request); bool connected = connect(invokeManager, SIGNAL(childCardDone(const bb::system::CardDoneMessage&)), this, SLOT(onChildCardDone(const bb::system::CardDoneMessage&))); if(connected) { qDebug() << "CONNECTED: " + filePath; } }

 

My Picture Editor Function works totally flawlessly fine:

 

void PictureEditor::invokePictureEditor(QString filePath)
{
	bb::system::InvokeRequest request;
	request.setTarget("sys.pictureeditor.cardeditor");
	request.setAction("bb.action.EDIT");
	request.setUri(filePath);
	request.setFileTransferMode(bb::system::FileTransferMode::CopyReadWrite);
	request.setMimeType("image/jpeg");
	invokeManager->invoke(request);

	bool connected = connect(invokeManager, SIGNAL(childCardDone(const bb::system::CardDoneMessage&)),
	this, SLOT(onChildCardDone(const bb::system::CardDoneMessage&)));

	if(connected)
	{
		qDebug() << "CONNECTED";
	}
}

 

Any suggestions please?

Developer
nemory
Posts: 217
Registered: ‎05-21-2012
My Device: BlackBerry RED Z10

Re: HELP Invoking Video Editor - Problem

Any solutions to this? :smileysad: or who has tried this with success to invoke the video editor?
BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: HELP Invoking Video Editor - Problem

I also tried this out and see the same behaviour you are.  I'm looking into it and have logged it in Issue Tracker here:

 

Unable to invoke video editor from third party application

 

Note that after today, I won't be back online here until January 2nd.

 

 

 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
nemoryoliver
Posts: 97
Registered: ‎11-13-2012
My Device: BB10 Simulator

Re: HELP Invoking Video Editor - Problem

THanks so much for reporting in JIRA. Hope they can fix it :smileyhappy:

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: HELP Invoking Video Editor - Problem

It does work, however the docs were lacking in what you had to do here.  I'll get that updated.  For now, here is a code snippet that does invoke the video editor.

 

bb::system::InvokeRequest request;
QUrl invokeUri = QUrl::fromLocalFile("/accounts/1000/shared/camera/VID_20131224_132306.mp4");
invokeUri.setScheme("videoeditor");
invokeUri.setQueryDelimiters('=', ';');
request.setTarget("sys.video_editor.card");
request.setAction("bb.action.EDIT");
request.setUri(invokeUri);
request.setMimeType("video/mp4");
InvokeManager manager;
manager.invoke(request);

 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
nemoryoliver
Posts: 97
Registered: ‎11-13-2012
My Device: BB10 Simulator

Re: HELP Invoking Video Editor - Problem

So happy I reopened this thread to see any updates and there is. MSohm's code really works! thanks so much! only problem with it is it can't access the /data/ and /tmp/ paths.. it needs to be in shared files.

 

BIG THANKS!!!!

Developer
nemoryoliver
Posts: 97
Registered: ‎11-13-2012
My Device: BB10 Simulator

Re: HELP Invoking Video Editor - Problem

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: HELP Invoking Video Editor - Problem

No problem, happy to help out.  :smileyhappy:

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
nemoryoliver
Posts: 97
Registered: ‎11-13-2012
My Device: BB10 Simulator

Re: HELP Invoking Video Editor - Problem

I wish there are parameters we can pass to limit the file size.. my 200KB video converted to 1MB :smileysad: