I am trying to implement an OpenTok application using codename one. I already started with android and had pretty much everything working. I use a native interface to import the OpenTok library.
Now I am trying to implement the ios side. I have a class acting like the view controller :
#interface be_lsit_opentok_iosTestHelper <OTSessionDelegate, OTPublisherDelegate> : NSObject
This class implements all the needed methods for the session connection : https://tokbox.com/developer/tutorials/ios/basic-video-chat/ (step 4).
My class implementing the native interface handles the initialization of the session with the api_key... and then calls the session's "connectWithToken".
Once this is done I can notice using the OpenTok Playground that the connection works but I do also notice that opentok does not send a message to call the method "sessionDidConnect" which is a problem.
I do not understand why the call is not done and what sould I do?
I also tryed to call the method myself using a thread call the method only when the connection to the session is made and that its status is "OTSessionConnectionStatusConnected" and this worked.
I'm guessing here since I didn't do this. You implemented the viewDidLoad in your own code instead of the Codename One view did load.
You can inject code into the Codename One viewDidLoad method using the build hint ios.viewDidLoad. So a build hint like:
ios.viewDidLoad=[self connectToAnOpenTokSession];
Should work but you would also need to add an import for the API into our code. Unfortunately I couldn't find a suitable build hint to define that so I added one ios.viewDidLoadInclude which I will add tomorrow to the build will allow you to define an import or include statement required by the statement above.
Related
I am a novice to iOS app development. While using the StoryBoards for creating the iOS app, the control transfers from applicationDidFinishLaunchingWithOptions() methods to the viewDidLoad() method directly without any code been mentioned in the applicationDidFinishLauching() method.
What is the internal process that occurs in this scenario.
I have seen in the main.m file that there is a piece of code which calls the AppDelegate.class, but nothing such is present in the applicationDidFinishLaunching() method.
You have a default storyboard with initial controller (the arrow incoming to controller). this controller is initiated first after Application initialization is done. I mean, there is no explicit code for this, the Cocoa makes it for you.
I try to use JavaScript library visjs.org in Dart. I prepared ‘adapter’ code according examples on Dart site pub.dartlang.org/packages/js and github.com/google/chartjs.dart/blob/master/lib/chartjs.dart.
Also according basic use case example from http://visjs.org I prepare client dart code.
While code compiles without any errors and warnings nothing happens in browser, expected to see graph-tree.
What I did wrong or miss to do?
https://gist.github.com/EdSv/e274a4d12ad3491c383fb4fe76ee671e
The attribute #anonymous is meant to be used when the object you're describing doesn't actually exist in the JS library you're binding, and is only used as a plain old data object. By adding it to all of your objects, my guess is that dart is never attempting to create anything from the visjs library.
Try removing the #anonymous from your Network class and see if that has an effect. You will likely also need to make these abstract classes as well.
I am getting this response in the log.
There is no delegates which responds to didReceiveNewSession:userInfo:
I wonder If this points to specific delegate as I am not able to find any relative solution for this.
Also Previously there was a class QBVideoChat which is not mentioned on Quickblox blog or updation guide.
I wonder if that has any thing to do with this issue.
Thanks in advance
QuickBlox has deprecated old QBVideoChat with WebRTC QuickBloxWebRTC
http://quickblox.com/developers/Sample-webrtc-ios
Here is the open source sample-video-chat project available on github
https://github.com/QuickBlox/quickblox-ios-sdk/tree/master/sample-videochat-webrtc
Error There is no delegates which responds to didReceiveNewSession:userInfo: means that you did not add any class to QBRTCClient delegates list
I am developing an application where I have to use my some class in Today- Widget-Extension. But I am not getting any way to access those class.
Is it possible to access application class in Today- Widget-Extension.
It is possible. First you need to set targets of your class to both aplication and extension. Second you need to put public keyword to your class. You can read more on that here.
How would I expose an Objective-C method within JavaScript when using the iPhone SDK when using the UIWebView?
Any help would be appreciated!
The best way to do this would be through a custom link, and then use the UIWebView delegate method -webView:shouldStartLoadWithRequest:navigationType: to trap requests. When you see a request come through with your link in it, you know your action has been triggered.
There is an example application in the QuickConnectiPhone framework that shows you how to do this.
QuickConnectiPhone also gives you a JavaScript function called 'makeCall'. You pass it a command and an array of parameters and it will pass them to the Objective-C side of your app for handling. You can then make your function call.
You can find it here on Sourceforge.
To see an example of this check out the PhoneGap source code from Github:
http://github.com/sintaxi/phonegap/tree/master/iphone/Classes/GlassAppDelegate.m