2016-08-27 2 views
0

그래서 저는 sl4a에서 Python을 사용하여 미리 정의 된 메시지로 WhatsApp을 시작하려고합니다. 이것은 나의 코드입니다 :sl4a startActivity 패키지 이름과 클래스 이름을 찾으십시오.

import android 
droid = android.Android() 

droid.startActivity("android.intent.action.SEND", 
        None, "text/plain", 
        {'com.whatsapp.locale.extras.TEXT':"sl4a test"}, 
        False, "com.whatsapp", "classname" 
        ) 

패키지 이름이 맞는지 잘 모르겠지만 클래스 이름을 알고 싶습니다. 구문은 다음과 같습니다

startActivity(
    action (String), 
    uri (String) (optional), 
    type (String) MIME type/subtype of the URI (optional), 
    extras (JSONObject) a Map of extras to add to the Intent (optional), 
    wait (Boolean) block until the user exits the started activity (optional), 
    packagename (String) name of package. If used, requires classname to be useful (optional), 
    classname (String) name of class. If used, requires packagename to be useful (optional), 
) 
+0

시도 할 때 표시되는 오류 메시지를 포함시킬 수 있다면 답변자에게 도움이 될 것입니다. – James

답변

0

신경 끄시 고 난 그냥 어쨌든 패키지 이름을 지정할 필요가 없습니다 그래서 대화의 표준 응용 프로그램으로 WhatsApp에 설정할 수 있다는 것을 알아 냈다.

관련 문제