Xcode when start zoomsdk meeting get error InvalidArguments - zoom-sdk

Using xcode to run DEMO sdk(zoom-sdk-ios-5.9.1.2191)
After logining in ZOOM successfuly,We run the the following code as below
MobileRTCMeetingStartParam * param = nil;
MobileRTCMeetingStartParam4LoginlUser * user = [[MobileRTCMeetingStartParam4LoginlUser alloc] init];
param = user;
param.meetingNumber = kSDKMeetNumber; // if kSDKMeetNumber is empty, it‘s a instant meeting.
param.isAppShare = false;
Then got the error 150

Related

STK MATLAB interface. Trying to access Range Rate data

I'm trying to get the Range Rate data between a satellite and ground site and everything works up until the last line. I've followed the online example but I get the error (below) when running this MATLAB script:
stk = stkApp.Personality2;
stkScenario = stk.CurrentScenario;
if isempty(stkScenario)
error('Please load a scenario');
end
facility = stk.GetObjectFromPath('Facility/RRFac');
satellite = stk.GetObjectFromPath('Satellite/P02S01');
access = satellite.GetAccessToObject(facility);
access.ComputeAccess;
accessDP = access.DataProviders.Item('Access Data').Exec(stkScenario.StartTime,stkScenario.StopTime);
accessStartTimes = accessDP.DataSets.GetDataSetByName('Start Time').GetValues;
accessStopTimes = accessDP.DataSets.GetDataSetByName('Stop Time').GetValues;
accessIntervals = access.ComputedAccessIntervalTimes;
accessDataProvider = access.DataProviders.Item('Access Data');
dataProviderElements = {'Start Time';'Stop Time'};
accessIntervals = access.ComputedAccessIntervalTimes;
for i = 1:1:accessIntervals.Count
[start, stop] = accessIntervals.GetInterval(i-1);
satelliteDP = satellite.DataProviders.Item('DeckAccess Data').Group.Item('Start Time LocalHorizontal Geometry').ExecElements(accessStartTimes{1},accessStopTimes{1},{'Time';'Range Rate'});
satelliteAlt = satelliteDP.DataSets.GetDataSetByName('Range Rate').GetValues;
end
Error using Interface.AGI_STK_Objects_12_IAgDrDataSetCollection/GetDataSetByName Invoke Error, Dispatch Exception: The parameter is incorrect.
Error in GenRRreport (line 37)
satelliteAlt = satelliteDP.DataSets.GetDataSetByName('Range Rate').GetValues
Why does it throw this error and how to avoid that?

Blackberry 10: Unable to record voice

I want to record call voice during the call time on BlackBerry 10 OS. For this I used Telephony Phone and Call State Listener. I start as found Call State "Connected" and stop when call "Disconnected".
But at start time recorder records only 160Byte of data each time.
and at stop time recorder shows "Already unprepared".
For this I use recorder.prepare() but it still didn't work for me. Please suggest and help me. Here is the code
void ApplicationHeadless::onCallUpdated(const Call &call)
{
QMetaObject MetaCallTypeObject = CallType::staticMetaObject;
QMetaEnum CallTypeEnum = MetaCallTypeObject.enumerator(
MetaCallTypeObject.indexOfEnumerator("Type"));
QMetaObject MetaCallStateObject = CallState::staticMetaObject;
QMetaEnum CallStateEnum = MetaCallStateObject.enumerator(
MetaCallStateObject.indexOfEnumerator("Type"));
CallType::Type CurrentCallType = call.callType();
CallState::Type CurrentCallState = call.callState();
QString conn = "Connected";
QString dcon = "Disconnected";
QDateTime now = QDateTime::currentDateTime();
bb::multimedia::AudioRecorder recorder;
if (conn.compare(CallStateEnum.valueToKey(CurrentCallState)) == 0) {
recorder.setOutputUrl(QUrl("/tmp/" + now.toString() + ".m4a"));
recorder.setOutputUrl(QUrl("file://" + QDir::currentPath() + "/data/recording121.m4a"));
recorder.record();
}
if (dcon.compare(CallStateEnum.valueToKey(CurrentCallState)) == 0) {
recorder.reset();
}
}
Thanks in advance..

Invalid URL in iOS SDK Deezer player

I have problem with iOS SDK from Deezer. I initialize a connection with Deezer:
_deez = [[DeezerConnect alloc] initWithAppId:kDeezerAppId andDelegate:self];
// List of permissions available from the Deezer SDK web site */
NSMutableArray* permissionsArray = [NSMutableArray arrayWithObjects:#"basic_access", #"offline_access", #"manage_library", #"delete_library", nil];
[_deez authorize:permissionsArray];
Login is successfull.
After login I want to initialize a player I use:
_player = [PlayerFactory createPlayer];
[_player setPlayerDelegate:self];
[_player setBufferDelegate:self];
[_player preparePlayerForTrackWithDeezerId:trackid
stream:stream
andDeezerConnect:_deez];
And I get in bufferDidFailWithError:
Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo=0x194370a0 {NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x190894f0 "unsupported URL"}
Maybe the problem is in stream. What is that?
Thanks.
If you try to listen to an album or a playlist, do you check the "readable" value received with each track object ?
Example of JSon received for a track :
tracks = {
data = (
{
artist = {
id = 1234;
name = toto;
};
duration = 1;
id = 6789;
link = "";
preview = "";
rank = 1;
readable = 0;
stream = 0;
title = Title;
type = track;
},
If "readable" and "stream" are both equals to false, you can not read the track.

How do I test a trigger with an approval process?

I have a trigger which initiates an approval process when certain criteria are met:
trigger AddendumAfterIHMS on Addendum__c (after update) {
for (integer i = 0; i<Trigger.new.size(); i++){
if(Trigger.new[i].RecordTypeId != '012V0000000CkQA'){
if(Trigger.new[i].From_IHMS__c != null && Trigger.old[i].From_IHMS__c == null){
ID addendumId = Trigger.new[i].Id;
// Start next approval process
Approval.ProcessSubmitRequest request = new Approval.ProcessSubmitRequest();
request.setObjectId(addendumId);
Approval.ProcessResult requestResult = Approval.process(request);
}
}
}
}
It works perfectly, but now i need to create a test class for it. I have created a class which brings the code up to 75% coverage, which is the minimum, but I'm picky and like to have 100% coverage on my code. The test class I have now gets stuck on the line request.setObjectId(addendumId); and doesn't move past it. The error I receive is:
System.DmlException: Update failed. First exception on row 0 with id a0CV0000000B8cgMAC; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AddendumAfterIHMS: execution of AfterUpdate
Here is the test class that I have written so far, most of the class actually tests some other triggers, but the important line which is throwing the error is the very last line update addendumTierFeature;
#isTest
private class AddendumTest {
static testMethod void myUnitTest() {
// Query Testing Account, will need ID changed before testing to place into production
Account existingAccount = [SELECT Id FROM Account LIMIT 1];
Model__c existingModel = [SELECT Id FROM Model__c WHERE Active__c = TRUE LIMIT 1];
Pricebook2 existingPricebook = [SELECT Id,Name FROM Pricebook2 WHERE IsActive = TRUE LIMIT 1];
List<Contact> existingContacts = [SELECT Id,Name FROM Contact LIMIT 2];
Contact existingContactPrimary = existingContacts[0];
Contact existingContactSecondary = existingContacts[1];
Opportunity newOpportunity = new Opportunity(
Name = 'New Opportunity',
Account = existingAccount,
CloseDate = Date.today(),
Order_Proposed__c = Date.today(),
StageName = 'Branch Visit - Not Responding',
Opportunity_Follow_Up__c = 'Every 120 Days',
LeadSource = 'Farm Lists',
Source_Detail__c = 'FSBO',
Model_Name__c = existingModel.Id,
Processing_Fee__c = 100.50,
Site_State__c = 'OR',
base_Build_Zone__c = 'OR',
Pricebook_from_Lead__c = existingPricebook.Name
);
insert newOpportunity;
//system.assert(newOpportunity.Id != null);
ID newOppId = newOpportunity.Id;
OpportunityContactRole contactPrimary = new OpportunityContactRole(
Role = 'Primary',
IsPrimary = true,
OpportunityId = newOppId,
ContactId = existingContactPrimary.Id
);
OpportunityContactRole contactSecondary = new OpportunityContactRole(
Role = 'Primary',
IsPrimary = false,
OpportunityId = newOppId,
ContactId = existingContactPrimary.Id
);
insert contactPrimary;
insert contactSecondary;
newOpportunity.Name = 'Different - Updating';
newOpportunity.Order_Accepted__c = Datetime.now();
update newOpportunity;
Addendum__c addendumCustomOption = new Addendum__c(
RecordTypeId = '012V0000000CkQA', //Pre Priced Custom Option
Opportunity__c = newOppId,
Item_Pre_Priced_Description__c = 'a1eV00000004DNu',
Reason__c = 'This is a reason',
Item__c = 'This is an Item',
Quantity__c = 1
);
Addendum__c addendumTierFeature = new Addendum__c(
RecordTypeId = '012V0000000Cjks', //Tier Feature
Opportunity__c = newOppId,
Category__c = 'Countertops',
Reason__c = 'This is a reason',
Item__c = 'This is an Item',
Quantity__c = 1
);
insert addendumCustomOption;
insert addendumTierFeature;
addendumCustomOption.Quantity__c = 2;
addendumTierFeature.Quantity__c = 2;
update addendumCustomOption;
update addendumTierFeature;
update newOpportunity;
addendumTierFeature.To_IHMS__c = system.now();
update addendumTierFeature;
addendumTierFeature.From_IHMS__c = system.now();
update addendumTierFeature;
}
}
Any help on this matter would be greatly appreciated. I believe the problem is in the way I am testing the approval process start. Is there by chance a special testing function for this?
After fiddling around for a little while I discovered that the error was actually tied into my approval process. I kept digging into the error logs until I got to the error: caused by: System.DmlException: Process failed. First exception on row 0; first error: MANAGER_NOT_DEFINED, Manager undefined.: []. This phrase indicates that there is no one defined for the next step in my approval process.
When I created the opportunity, I did not set the owner and somehow this created an opportunity which had an owner without a manager. The addendum was also created without an owner/manager. So when I tried to launch the next approval process, there was no manager to send the approval to and an error was thrown.

Create a CFTree in Objective C

I want to create a basic CFTree with some string info in Objective-C.
This is my code
//CFtree attempt
NSString *info;
CFTreeContext ctx;
NSString *treeString = [[NSString alloc] initWithFormat:#"the tree string"];
info = treeString;
ctx.info = info;
CFTreeRef myTree = CFTreeCreate(NULL, &ctx);
I get an "EXC_BAD_ACESS" error on the last line.
Can someone please tell me how to configure this properly.
It seems that ctx should be initialized.
ctx.version = 0;
ctx.info = info;
ctx.retain = CFRetain;
ctx.release = CFRelease;
ctx.copyDescription = CFCopyDescription;
You may want to initialize the ctx struct to 0 before using it since there are members in it that otherwise may cause erratic behavior as the CFTreeCreate thinks they are pointing to something relevant.
see