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);
|
Miscellaneous.logEvent("i", "sendBroadcast", "Sending broadcast with action " + action, 5);
|
||||||
Intent broadcastIntent = new Intent();
|
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);
|
broadcastIntent.setAction(action);
|
||||||
|
|
||||||
context.sendBroadcast(broadcastIntent);
|
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);
|
intentTypeSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, ActivityManageActionSendBroadcast.supportedIntentTypes);
|
||||||
spinnerParameterType.setAdapter(intentTypeSpinnerAdapter);
|
spinnerParameterType.setAdapter(intentTypeSpinnerAdapter);
|
||||||
intentTypeSpinnerAdapter.notifyDataSetChanged();
|
intentTypeSpinnerAdapter.notifyDataSetChanged();
|
||||||
|
intentPairAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, intentPairList);
|
||||||
|
|
||||||
bSaveSendBroadcast.setOnClickListener(new View.OnClickListener()
|
bSaveSendBroadcast.setOnClickListener(new View.OnClickListener()
|
||||||
{
|
{
|
||||||
@ -61,7 +62,19 @@ public class ActivityManageActionSendBroadcast extends Activity
|
|||||||
{
|
{
|
||||||
Intent answer = new Intent();
|
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);
|
setResult(RESULT_OK, answer);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
@ -101,11 +114,9 @@ public class ActivityManageActionSendBroadcast extends Activity
|
|||||||
|
|
||||||
String[] params = param2Parts[1].split(";");
|
String[] params = param2Parts[1].split(";");
|
||||||
|
|
||||||
if(startIndex > -1 && params.length > startIndex)
|
|
||||||
{
|
|
||||||
intentPairList.clear();
|
intentPairList.clear();
|
||||||
|
|
||||||
for(int i=startIndex; i<params.length; i++)
|
for(int i = 0; i < params.length; i++)
|
||||||
{
|
{
|
||||||
if(lvIntentPairs.getVisibility() != View.VISIBLE)
|
if(lvIntentPairs.getVisibility() != View.VISIBLE)
|
||||||
lvIntentPairs.setVisibility(View.VISIBLE);
|
lvIntentPairs.setVisibility(View.VISIBLE);
|
||||||
@ -116,7 +127,6 @@ public class ActivityManageActionSendBroadcast extends Activity
|
|||||||
updateIntentPairList();
|
updateIntentPairList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bAddIntentPair.setOnClickListener(new View.OnClickListener()
|
bAddIntentPair.setOnClickListener(new View.OnClickListener()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user