forked from jens/Automation
store descriptions
This commit is contained in:
parent
f738e02b72
commit
2361c758c9
@ -197,7 +197,16 @@ public class Actions
|
||||
{
|
||||
Miscellaneous.logEvent("i", "sendBroadcast", "Sending broadcast with action " + action, 5);
|
||||
Intent broadcastIntent = new Intent();
|
||||
|
||||
if(action.contains(Action.actionParameter2Split))
|
||||
{
|
||||
String[] parts = action.split(Action.actionParameter2Split);
|
||||
broadcastIntent.setAction(parts[0]);
|
||||
add params
|
||||
}
|
||||
else
|
||||
broadcastIntent.setAction(action);
|
||||
|
||||
context.sendBroadcast(broadcastIntent);
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,7 @@ public class ActivityManageActionSendBroadcast extends Activity
|
||||
intentTypeSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, ActivityManageActionSendBroadcast.supportedIntentTypes);
|
||||
spinnerParameterType.setAdapter(intentTypeSpinnerAdapter);
|
||||
intentTypeSpinnerAdapter.notifyDataSetChanged();
|
||||
intentPairAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, intentPairList);
|
||||
|
||||
bSaveSendBroadcast.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@ -61,7 +62,19 @@ public class ActivityManageActionSendBroadcast extends Activity
|
||||
{
|
||||
Intent answer = new Intent();
|
||||
|
||||
answer.putExtra(ActivityManageRule.intentNameActionParameter2, etBroadcastToSend.getText().toString());
|
||||
String param2 = etBroadcastToSend.getText().toString();
|
||||
|
||||
if(intentPairList.size() > 0)
|
||||
{
|
||||
param2 += Action.actionParameter2Split;
|
||||
|
||||
for (String s : intentPairList)
|
||||
param2 += s + ";";
|
||||
|
||||
param2 = param2.substring(0, param2.length() - 1);
|
||||
}
|
||||
|
||||
answer.putExtra(ActivityManageRule.intentNameActionParameter2, param2);
|
||||
setResult(RESULT_OK, answer);
|
||||
finish();
|
||||
}
|
||||
@ -101,11 +114,9 @@ public class ActivityManageActionSendBroadcast extends Activity
|
||||
|
||||
String[] params = param2Parts[1].split(";");
|
||||
|
||||
if(startIndex > -1 && params.length > startIndex)
|
||||
{
|
||||
intentPairList.clear();
|
||||
|
||||
for(int i=startIndex; i<params.length; i++)
|
||||
for(int i = 0; i < params.length; i++)
|
||||
{
|
||||
if(lvIntentPairs.getVisibility() != View.VISIBLE)
|
||||
lvIntentPairs.setVisibility(View.VISIBLE);
|
||||
@ -116,7 +127,6 @@ public class ActivityManageActionSendBroadcast extends Activity
|
||||
updateIntentPairList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bAddIntentPair.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user