toast

Windows Phone 8.1 Toast Notification not playing custom sound

我的未来我决定 提交于 2019-12-25 00:29:57
问题 I am in dire need of your help. I am a Windows app developer and I need my app to play an alarm sound when a toast notification is received. I have tried many different loadouts and everything works fine (Even applying silent='true' in the audio tag), except, ofcourse, for the custom sound. I have tried my dev server and I have tried with a local toast sent from the app, and nothing seems to work. My current XML loadout is as follows (I got it from an example in MSDN): string audio = "ms

Displaying parameters of method in a textview or toast

元气小坏坏 提交于 2019-12-24 19:46:42
问题 Hey guys i cannot figure out the logic behind why my code is not working, apparently I am not allowed to print out these values in this way. I cannot display the values of v1,v2,v3 or v4 into a toast or a textfield, but i can display strings. Am i calling these values wrong? If you need me to post more code let me know. testWheelValue(R.id.passw_1, v1); testWheelValue(R.id.passw_2, v2); testWheelValue(R.id.passw_3, v3); testWheelValue(R.id.passw_4, v4); testpins = v1 + v2 + v3 + v4; text

dynamically adding views and toasting it

荒凉一梦 提交于 2019-12-24 19:08:06
问题 I'm adding views dynamically. Mean to say that, Initially there is one EditText , Button Add , Button Submit . 1.OnClick of Button Add I'm inflating new layout which has one EditText and Button Remove . If Button Add is keep on pressed it will add inflated layout respectively. 2.OnClick of Button Submit it has to Toast the EditText values of Inflated layout. I'm getting only the last EditText Toast, and the Toast for rest of EditText didn't show. how to do this? public class MainActivity

Windows 10 toast notification issue

江枫思渺然 提交于 2019-12-24 15:17:51
问题 I've tried using the registry changes to move the windows 10 toast notification thing, but when I went in, there was no "DisplayToastAtBottom"(Mind you, they already appear at the bottom) Very sorry if this isn't the right place to ask! :s 回答1: In this question on the Microsoft answers site, a Microsoft rep tries to smooth things over, but then later replies and basically says you can't: The Toast notification which you receive at bottom is by design in Windows 10. This cannot be changed. In

Espresso checking if toasts are displayed (one on top of another)

这一生的挚爱 提交于 2019-12-24 06:38:28
问题 I have an problem with checking if toast is displayed using espresso. I'm using class: import android.os.IBinder; import android.support.test.espresso.Root; import android.view.WindowManager; import org.hamcrest.Description; import org.hamcrest.TypeSafeMatcher; public class ToastMatcher extends TypeSafeMatcher<Root> { @Override public void describeTo(Description description) { description.appendText("is toast"); } @Override public boolean matchesSafely(Root root) { int type = root

Xamarin forms: Toast Notification in Android & IOS

半城伤御伤魂 提交于 2019-12-24 05:54:16
问题 Hi I am creating an app in xamarin forms using PCL project. I want to implement Toast notification on twice back press only for android and ios. For android I tried - long doublePressInterval_ms = 300; DateTime lastPressTime = DateTime.MinValue; DateTime pressTime = DateTime.Now; if ((pressTime - lastPressTime).TotalMilliseconds <= doublePressInterval_ms) { if(Device.OS == TargetPlatform.Android) { Java.Lang.JavaSystem.Exit(0); } } else { Android.Widget.Toast.MakeText(this, string_name,

Toast.makeText(getApplicationContext(), “String”, Toast.LENGTH_LONG); ==>Here getApplicationContext() cannot change to “this”?

孤街浪徒 提交于 2019-12-24 02:56:14
问题 First the format of Toast.makeText(): public static Toast makeText (Context context, CharSequence text, int duration) the first argument is Context , the function getApplicationContext() also return the current context, everything is ok, but IMO, the getApplicationContext() can also be replaced with this, just as follows: public class ContextMenuResourcesActivity extends Activity { /** Called when the activity is first created. */ private Button b1; @Override public void onCreate(Bundle

Toast not appearing on Android 4.4 KitKat

痞子三分冷 提交于 2019-12-24 01:28:15
问题 I have an application that uses Toast and I have tested it on a Samsung Galaxy II using Android 4.3 and it works fine. I have recently gotten a Nexus 5 running Android 4.4 KitKat and when I try to load the Toast it doesn't appear. Has Toast been removed or the syntax altered in KitKat? This is the code I'm using to make and call the Toast: @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { int itemId = item.getItemId(); switch (itemId) { case R.id.action_settings: Log

Is there a notification on windows phone that disappears after seconds?

陌路散爱 提交于 2019-12-23 23:24:09
问题 Is there something like Androids toast message for windows phone ? I just want to notify the user somehow if my BackgroundAudioPlayer is at the end of the playlist or couldn't find a song. It should also only appear if the user is currently inside the application, so something like "ShellToast" doesn't work. 来源: https://stackoverflow.com/questions/8625620/is-there-a-notification-on-windows-phone-that-disappears-after-seconds

vue组件弹窗

∥☆過路亽.° 提交于 2019-12-23 21:46:05
定义弹窗组件   先写一个普通的vue组件,其显示的内容就是弹窗的内容。   文件的位置 /src/views/toast/toast.vue    <template> <div class="wrap">已经是最底部了</div> </template> <script> export default { name: 'Toast' } </script> <style lang="scss" scoped> .wrap{ position: fixed; left: 50%; top:50%; background: rgba(0,0,0,.65); padding: 10px; border-radius: 5px; transform: translate(-50%,-50%); color:#fff; } </style> 引用弹窗组件   组件注册定义好了,那接下来就是引入组件,使用弹窗组件了。 <template> <div class="movies-list"> <!-- 其他代码 -->   这里写页面的其他代码 <!-- 其他代码 --> <toast v-if="cont"></toast> </div> </template> <script> // 引入弹窗组件 import toast from './toast/toast'; export