Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25296] Help on using an 3rd-p SDK with Android that requires Surface V

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsescalation
Reporter Ricardo Ramirez
AssigneeGary Mathews
Created2017-09-15T18:53:21.000+0000
Updated2017-10-05T22:31:52.000+0000

Description

Issue Description

So we have this 3rd party SDK that allows our app to do Live Streaming videos. We've successfully integrated it on iOS, and we're looking forward to integrate it with Android as well. One of the requirements that the SDK has for working is that it needs an instance of Surface View - to display a camera preview from where to broadcast the stream signal. On iOS it only needed an instance of UIView, which was accomplished by passing on a TiUIProxyView object to an iOS Titanium Module, that could be casted to UIView. However we couldn't find a way to do so on Android - seems like TiUIProxyView cannot be casted to Surface View object. So the question is: can titanium handle / create Surface Views for Android and pass them to an Android Titanium Module somehow ?

Comments

  1. Gary Mathews 2017-09-21

    To retrieve the native component of a TiViewProxy you can do the following:
       TiViewProxy.peekView() // returns TiUIView
       TiUIView.getNativeView() // returns View
       
  2. Ricardo Ramirez 2017-10-05

    Ok Gary thanks ! I will let you know the results.

JSON Source