MCPcopy Create free account
hub / github.com/cinder/Cinder / launchTwitter

Method launchTwitter

src/cinder/android/app/CinderNativeActivity.cpp:243–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void CinderNativeActivity::launchTwitter( const std::string& text, const Surface8u* surf )
244{
245 std::string pathStr = "";
246 if( nullptr != surf ) {
247 try {
248 cinder::fs::path path = getCacheDirectory() / "launchTwitter_tmp_image.png";
249 pathStr = path.string();
250 cinder::writeImage( path, *surf );
251 }
252 catch( const std::exception& e ) {
253 dbg_app_error( std::string( "launchTwitter temp image write failed: " ) + e.what() );
254 }
255 }
256
257 jstring jstrText = JniHelper::Get()->NewStringUTF( text );
258 jstring jstrPath = JniHelper::Get()->NewStringUTF( pathStr );
259 JniHelper::Get()->CallVoidMethod( getInstance()->getJavaObject(), Java::launchTwitter, jstrText, jstrPath );
260 JniHelper::Get()->DeleteLocalRef( jstrText );
261 JniHelper::Get()->DeleteLocalRef( jstrPath );
262}
263
264
265}}} // namespace cinder::android::app

Callers

nothing calls this directly

Calls 10

getCacheDirectoryFunction · 0.85
writeImageFunction · 0.85
dbg_app_errorFunction · 0.85
stringFunction · 0.85
NewStringUTFMethod · 0.80
CallVoidMethodMethod · 0.80
getJavaObjectMethod · 0.80
DeleteLocalRefMethod · 0.80
stringMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected