从应用Automate,我想发送Glympse。自动化const App = () => {
return (
<Router navigationBarStyle={styles.navBar}
titleStyle={styles.navTitle}
sceneStyle={styles.routerScene}
barButtonIconStyle={styles.barButton} >
<Scene key="root">
<Scene key="login"
component={Login}
title="Login"
hideNavBar = {true}
initial
/>
<Scene
key="recipes"
component={Recipes}
title="Recipes"
hideNavBar = {false}
hideBackImage = {false}
//backButtonImage = {require('image!ui_nav_bar_hamburgher_icon')}
onBack = {() =>{return null;}}
rightTitle = "Bad Hombres"
onRight = {() => { Alert.alert(
'No puppet, No puppet',
'You\'re the puppet!',)}}
leftTitle ="Bigly"
onLeft = {() => {Alert("Such a nasty woman..")}}
// leftButtonImage={require('image!ui_login_email_icon')}
panHandlers ={null}
/>
</Scene>
</Router>
);
}
块采用以下输入。我假设不是所有这些都必须指定。
我应该为上述值设置什么?
我正在阅读一些code并查看一些documentation。我发现App Start
应该是Package
而com.glympse.android.glympse
应该是Activity Class
。 com.glympse.android.intent.Create
输入应设置为字典对象。字典应该有一个带有字符串值的extras
键。 message
键具有long值,该值保存共享位置的毫秒数。我还没弄明白其余的按键或格式。
答案 0 :(得分:1)
以下是步骤......
recipient
的字典:
type
,字符串值为sms
address
,字符串值为5425551212
//替换为实际的电话号码 options
的字典:
recipients
,字符串值为jsonEncode(recipient)
//这会将recipient
字典转换为JSON字符串 message
,字符串值为whatever you want to say
duration
,用于分享Glympse位置的长毫秒数(例如1800000,持续30分钟)App Start
块:
Package
设置为com.glympse.android.glympse
Activity Class
设置为com.glympse.android.intent.Create
Action
设置为Run
Extras
设置为options
//上面创建的词典 这将导致Glympse屏幕显示,以便用户只需点击Create
按钮。