2012-09-07 4 views
-1

Google에서 미리 정한 Google + 메시지를 Android를 통해 보내고 싶지만, 올바른 URL을 찾지 못했습니다. https://plus.google.com/app/plus/mp/430/#~loop:view=compose을 찾았지만 텍스트를 설정하지 않았습니다. 실제로 허용 할 수있는 또 다른 공식 앱 URL이 있습니까? 트위터에는 하나의 노호가있다. 10 배Google 모바일 페이지 URL을 작성하십시오.

Intent i = new Intent(); 
i.putExtra(Intent.EXTRA_TEXT, msg); 
i.setAction(Intent.ACTION_VIEW); 
i.setData(Uri.parse("https://mobile.twitter.com/compose/tweet")); 
ctx.startActivity(i); 

답변

0

당신은 ACTION_SEND 목적으로 Google+의 텍스트와 이미지를 공유 할 수 있습니다.

예 : 직접 Google+ 앱을 대상으로하려는 경우

Intent shareIntent = new Intent(); 
shareIntent.setAction(Intent.ACTION_SEND); 
shareIntent.putExtra(Intent.EXTRA_TEXT, "Hello World!"); 
shareIntent.setType("text/plain"); 
startActivity(shareIntent); 

, 당신은 startActivity를 호출하기 전에 shareIntent에 setPackage를 호출 할 수 있습니다.

shareIntent.setPackage("com.google.android.apps.plus"); 
관련 문제