本文整理汇总了C#中Android.Content.Intent.GetStringArrayExtra方法的典型用法代码示例。如果您正苦于以下问题:C# Intent.GetStringArrayExtra方法的具体用法?C# Intent.GetStringArrayExtra怎么用?C# Intent.GetStringArrayExtra使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Content.Intent
的用法示例。
在下文中一共展示了Intent.GetStringArrayExtra方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnReceive
public override void OnReceive(Context context, Intent intent) {
// Do stuff here
var service = Mvx.Resolve<ISignatureService>() as DroidSignatureService;
if (service != null) {
var fileStore = intent.GetStringExtra("fileStore");
var pointsString = intent.GetStringArrayExtra("points");
if (string.IsNullOrWhiteSpace(fileStore) || pointsString.Length == 0) {
service.Cancel();
} else {
var points = pointsString.Select(i => DrawPoint.Parse(i));
service.Complete(new SignatureResult(
false,
() => new FileStream(fileStore, FileMode.Open, FileAccess.Read, FileShare.Read),
points
));
}
}
Android.App.Application.Context.UnregisterReceiver(this);
}
示例2: handleCommand
/**
* The {@link BillingReceiver} sends messages to this service using intents.
* Each intent has an action and some extra arguments specific to that action.
* @param intent the intent containing one of the supported actions
* @param startId an identifier for the invocation instance of this service
*/
public void handleCommand(Intent intent, int startId)
{
string action = intent.Action;
if (Consts.DEBUG)
Log.Info(TAG, "handleCommand() action: " + action);
if (Consts.ACTION_CONFIRM_NOTIFICATION.Equals(action))
{
string[] notifyIds = intent.GetStringArrayExtra(Consts.NOTIFICATION_ID);
Execute(new ConfirmNotifications(startId, notifyIds));
}
else if (Consts.ACTION_GET_PURCHASE_INFORMATION.Equals(action))
{
string notifyId = intent.GetStringExtra(Consts.NOTIFICATION_ID);
Execute(new GetPurchaseInformation(startId, new string[] { notifyId }));
}
else if (Consts.ACTION_PURCHASE_STATE_CHANGED.Equals(action))
{
string signedData = intent.GetStringExtra(Consts.INAPP_SIGNED_DATA);
string signature = intent.GetStringExtra(Consts.INAPP_SIGNATURE);
purchaseStateChanged(startId, signedData, signature);
}
else if (Consts.ACTION_RESPONSE_CODE.Equals(action))
{
long requestId = intent.GetLongExtra(Consts.INAPP_REQUEST_ID, -1);
int responseCodeIndex = intent.GetIntExtra(Consts.INAPP_RESPONSE_CODE, (int)Consts.ResponseCode.RESULT_ERROR);
Consts.ResponseCode responseCode = (Consts.ResponseCode)responseCodeIndex;
checkResponseCode(requestId, responseCode);
}
}
示例3: getPurchaseInformation
private void getPurchaseInformation(Intent intent, int startId)
{
string packageName = PackageName;
long nonce = intent.GetLongExtra(EXTRA_NONCE, 0);
string[] notifyIds = intent.GetStringArrayExtra(EXTRA_NOTIFY_IDS);
GetPurchaseInformation request = new GetPurchaseInformation(packageName, startId, notifyIds);
request.setNonce(nonce);
runRequestOrQueue(request);
}
示例4: confirmNotifications
public void confirmNotifications(Intent intent, int startId)
{
string packageName = intent.Package;
string[] notifyIds = intent.GetStringArrayExtra(EXTRA_NOTIFY_IDS);
ConfirmNotifications request = new ConfirmNotifications(packageName, startId, notifyIds);
runRequestOrQueue(request);
}
示例5: OnActivityResult
protected override void OnActivityResult (int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult (requestCode, resultCode, data);
Console.WriteLine (requestCode);
if (resultCode == Result.Ok && requestCode == REQUEST_SENDBIRD_MESSAGING_CHANNEL_LIST_ACTIVITY && data != null) {
JoinMessaging (data.GetStringExtra ("channelUrl"));
}
if (resultCode == Result.Ok && requestCode == REQUEST_SENDBIRD_MEMBER_LIST_ACTIVITY && data != null) {
StartMessaging (data.GetStringArrayExtra ("userIds"));
}
if (resultCode == Result.Ok && requestCode == REQUEST_SENDBIRD_CHAT_ACTIVITY && data != null) {
StartMessaging (data.GetStringArrayExtra ("userIds"));
}
if (resultCode == Result.Ok && requestCode == REQUEST_SENDBIRD_CHANNEL_LIST_ACTIVITY && data != null) {
StartChat (data.GetStringExtra ("channelUrl"));
}
}
示例6: OnActivityResult
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
if (resultCode != Result.Ok)
return;
if (requestCode == REQUEST_FILECHOOSER)
{
HandleShareFile(data.Data);
}
else if (requestCode == REQUEST_CONTACTCHOOSER)
{
var contactIds = data.GetStringArrayExtra(ContactListActivity.IE_RESULT_SELECTED_CONTACT_IDS);
HandleShareContacts(contactIds);
}
}