[ Need APP ] < Alarm app every 30 seconds - Windows Phone 8 Apps and Games

Hi all~!
I'm user of my Lumia 620 and I'm looking for free alarm app . The alarm must repeat every 30 seconds . Is there any app ? I need it , because I'm starting ABS for my chest

kukusiek97 said:
Hi all~!
I'm user of my Lumia 620 and I'm looking for free alarm app . The alarm must repeat every 30 seconds . Is there any app ? I need it , because I'm starting ABS for my chest
Click to expand...
Click to collapse
Hello,
What kind of sound would you like? Pick your own music? etc..
Sounds more like a repeative timer to me...this wouldn't even be that hard to make...
C#:
In App.xaml.cs input:
Code:
using System.Threading;
private static DispatcherTimer m_Timer;
private static bool RepeatTimer;
private static int m_Days, m_Hours, m_Minutes, m_Seconds;
public static void beginTiming(int Days, int Hours, int Minutes, int Seconds, bool Repeative)
{
RepeatTimer = Repeative; //Set repeat
m_Days = Days;
m_Hours = Hours;
m_Minutes = Minutes;
m_Seconds = Seconds;
m_Timer = new DispatcherTimer();
m_Timer.Tick += new EventHandler(m_Timer_Tick);
m_Timer.Interval = new TimeSpan(Days, Hours, Minutes, Seconds);
m_Timer.Start();
}
static void m_Timer_Tick(object sender, EventArgs e)
{
if (RepeatTimer == true)
beginTiming(m_Days, m_Hours, m_Minutes, m_Seconds);
//Play Sound Here (Max Limit 10 Seconds)
}
Then have a sound selector and button to begin timing the fields on the MainPage.xaml, if the user's phone turns off (due to WP8 lacking capability of real multitasking -- Thank you Microsoft!) use the background to set a timer to run every thirty seconds or disable screen powering off in the application.
That's basically how it can be created.
So, if anyone decides to do this really quick (5 minutes?) it's quite simple.
I'll give it a go if no one else completes this for you.

kuzcoed said:
Hello,
What kind of sound would you like? Pick your own music? etc..
Sounds more like a repeative timer to me...this wouldn't even be that hard to make...
C#:
In App.xaml.cs input:
Code:
using System.Threading;
private static DispatcherTimer m_Timer;
private static bool RepeatTimer;
private static int m_Days, m_Hours, m_Minutes, m_Seconds;
public static void beginTiming(int Days, int Hours, int Minutes, int Seconds, bool Repeative)
{
RepeatTimer = Repeative; //Set repeat
m_Days = Days;
m_Hours = Hours;
m_Minutes = Minutes;
m_Seconds = Seconds;
m_Timer = new DispatcherTimer();
m_Timer.Tick += new EventHandler(m_Timer_Tick);
m_Timer.Interval = new TimeSpan(Days, Hours, Minutes, Seconds);
m_Timer.Start();
}
static void m_Timer_Tick(object sender, EventArgs e)
{
if (RepeatTimer == true)
beginTiming(m_Days, m_Hours, m_Minutes, m_Seconds);
//Play Sound Here (Max Limit 10 Seconds)
}
Then have a sound selector and button to begin timing the fields on the MainPage.xaml, if the user's phone turns off (due to WP8 lacking capability of real multitasking -- Thank you Microsoft!) use the background to set a timer to run every thirty seconds or disable screen powering off in the application.
That's basically how it can be created.
So, if anyone decides to do this really quick (5 minutes?) it's quite simple.
I'll give it a go if no one else completes this for you.
Click to expand...
Click to collapse
For me something like this http://www.youtube.com/watch?v=uJ2SqGfURyY is enough . But could you give me more instructions ? I'm new user of my Lumia .

kukusiek97 said:
For me something like this http://www.youtube.com/watch?v=uJ2SqGfURyY is enough . But could you give me more instructions ? I'm new user of my Lumia .
Click to expand...
Click to collapse
Hi,
To play the sound you'll need some code that allows play music, in App.xaml.cs you can use multiple options, but, for what you're looking for I think this would work fine:
Code:
Stream musStr = TitleContainer.OpenStream("alarm.wav");
SoundEffect musEffect = SoundEffect.FromStream(musStr);
FrameworkDispatcher.Update();
musEffect.Play();
Put that code inside the "m_Timer_Tick" event or put another
Code:
private / public static void
in your code, then call it.
For example:
Code:
private static void playSound(string Sound)
{
Stream musStr = TitleContainer.OpenStream(Sound);
SoundEffect musEffect = SoundEffect.FromStream(musStr);
FrameworkDispatcher.Update();
musEffect.Play();
}
Call that with the m_Timer_Tick event using:
Code:
playSound(mysound.wav);
Requirements of doing this way is that:
1) Sample Rate must be between 8k Hz and 48k Hz
2) The audio file must be a PCM wave file
3) Can only be mono or stereo
4) Must be 8 or 16 bit

Related

Turning the screen off (not backlight)

Is there a way to turn off, not the backlight, not the pda, but just the screen?
All I know is, I have Linux on my ipaqs, and you can turn off just the screen (the backlight will be off too of course), to save battery power. I usually do this when I'm listening to mp3 with it.
I imagine the hardware itself is capable to do this, but pocketpc by default does not have such an option. Now I'm wondering if pocketpc has exposed any APIs to do this.
Thanks.
I just know PocketDiVX in the new ROM can map a button to do this. No idea how to do it from code though...
this works on my xda with media player
http://homepage.ntlworld.com/gazzaman2k//a/Software/Display off.zip
Apart from setting the power pref's in system/settings, no such luck ... I've searched the XDA for a program that does this with no luck.
Has anyone found a ROM link ?
I like and use Pocket Toolman
http://members.shaw.ca/pockettoolman/
HTH
here's one that's hopefully the answer to your request. the file is called sleepscreen and it does exactly what you mentioned; turns off the screen while applications are running. i've installed it in my "start" menu so that anytime i want to switch off the screen i can do so.
when you click on the icon on your start menu; the screen goes blank and if you'll notice the LED of the xda is blinking...meaning apps are running while the screen is off. all you have to do to activate the screen is press any button (e.g. the contacts or calendar button)...but DON'T hit the power button because that switches off all the apps running.
how do i attach the file in this forum? it's only 24kb zipped. or give me your email address and i'll mail it to you.
hope that helps mate!
Code:
// offDisplay.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include <stdlib.h>
#include <nled.h>
// LED support
extern "C" BOOL NLedGetDeviceInfo(INT nID, PVOID pOutput);
extern "C" BOOL NLedSetDevice(INT nID, PVOID pOutput);
// GDI Escapes for ExtEscape()
#define QUERYESCSUPPORT 8
// The following are unique to CE
#define GETVFRAMEPHYSICAL 6144
#define GETVFRAMELEN 6145
#define DBGDRIVERSTAT 6146
#define SETPOWERMANAGEMENT 6147
#define GETPOWERMANAGEMENT 6148
typedef enum _VIDEO_POWER_STATE {
VideoPowerOn = 1,
VideoPowerStandBy,
VideoPowerSuspend,
VideoPowerOff
} VIDEO_POWER_STATE, *PVIDEO_POWER_STATE;
typedef struct _VIDEO_POWER_MANAGEMENT {
ULONG Length;
ULONG DPMSVersion;
ULONG PowerState;
} VIDEO_POWER_MANAGEMENT, *PVIDEO_POWER_MANAGEMENT;
// LED handling functions
int GetLedCount()
{
NLED_COUNT_INFO nci;
int wCount = 0;
if(NLedGetDeviceInfo(NLED_COUNT_INFO_ID, (PVOID) &nci))
wCount = (int) nci.cLeds;
return wCount;
}
void SetLedStatus(int wLed, int wStatus)
{
NLED_SETTINGS_INFO nsi;
nsi.LedNum = (INT) wLed;
nsi.OffOnBlink = (INT) wStatus;
NLedSetDevice(NLED_SETTINGS_INFO_ID, &nsi);
}
int WINAPI WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPWSTR pszCommandLine, int nCommandShow)
{
HDC gdc;
int iESC=SETPOWERMANAGEMENT;
gdc = ::GetDC(NULL);
if (ExtEscape(gdc, QUERYESCSUPPORT, sizeof(int), (LPCSTR)&iESC, 0, NULL)==0)
MessageBox(NULL, L"Sorry, your Pocket PC does not support toggleDisplay",
L"Pocket PC toggleDisplay",
MB_OK);
else
{
VIDEO_POWER_MANAGEMENT vpm;
ExtEscape(gdc, GETPOWERMANAGEMENT, 0, 0, sizeof(vpm), (char *) &vpm);
if (vpm.PowerState == VideoPowerOff) {
vpm.Length = sizeof(VIDEO_POWER_MANAGEMENT);
vpm.DPMSVersion = 0x0001;
vpm.PowerState = VideoPowerOn;
ExtEscape(gdc, SETPOWERMANAGEMENT, vpm.Length, (LPCSTR) &vpm, 0, NULL);
if (GetLedCount()) {
SetLedStatus(0, 0);
}
} else {
vpm.Length = sizeof(VIDEO_POWER_MANAGEMENT);
vpm.DPMSVersion = 0x0001;
vpm.PowerState = VideoPowerOff;
ExtEscape(gdc, SETPOWERMANAGEMENT, vpm.Length, (LPCSTR) &vpm, 0, NULL);
if (GetLedCount()) {
SetLedStatus(0, 1);
}
}
::ReleaseDC(NULL, gdc);
}
return 0;
}
uff, binaries for arm, probably compiled with debug on
but who cares with such a BIG file
http://pgate.host.sk/toggleDisplay.exe [4kB]
pigeon said:
Is there a way to turn off, not the backlight, not the pda, but just the screen?
I came across some silly software named PocketLight or PocketTorch or so, just can't find it right now. It turns off the screen but the backlight stays on. This way you can use your PDA as a light source in case you lost something in the dark ....
Is that what you're looking for?
Martin
Click to expand...
Click to collapse
Click to expand...
Click to collapse
i have a free program for this but i dont know how to upload it
http://www.mywirelessoffice.com/xda/screenoff.zip
Thanks emilk
Adrian
emilk said:
uff, binaries for arm, probably compiled with debug on
but who cares with such a BIG file
http://pgate.host.sk/toggleDisplay.exe [4kB]
Click to expand...
Click to collapse
Cant link to that exe file, I get a "not authorised", error message.
I know, my webhosting is not perfect
SOLUTION: when I use rightclick and choose 'save target as..'
it goes through
if you are unsuccesful with linking, that was probably intention
of my provider
Just press and hold the power button, this allows Windows Media Player to still play my mp3's but turns off my screen to reserve power.
Simply as that.
Mike
MIke Gascoigne said:
Just press and hold the power button, this allows Windows Media Player to still play my mp3's but turns off my screen to reserve power.
Simply as that.
Mike
Click to expand...
Click to collapse
If I press and hold the power button, it turns off only the backlight, not the screen.
Sorry, just press the power button, this turns the screen off, DONT HOLD IT as I told you to do before.
Just press it!
Mike
That suspends the device. It doesn't just turn off the screen.
If I have Media Player turned on and I just tap the power it turns off the whole device (MP3 player too)

[APP] TF3D Music Sleep Timer

I was getting utterly annoyed by the fact that the TF3D music player had no sleep funtion (turn of the music after a set amount of time). After doing some searches I was unable to find anything that suits my needs (anything at all in fact).
Now I have been using an application that pauses my music when I press the headset button for 1 second. What that app in fact does is: run an executable that somehow pauses the TF3D music player.
So in combination with 3 lines of mortscript I had my sleep application. Just run it (you will need to have mortscript installed, http://www.sto-helit.de/index.php?module=page&entry=ms_overview&action=view) and enter the amount if time (in minutes) after which you wan't the music player to stop playing. I usually set this to 1 hour, put on my headphones and fall somewhere within that hour to sleep. The players turns off and I won't wake up at 3 'o clock in the morning when I would rather be sleeping because of some loud track that starts playing.
The sddialer.exe file (which pauses the player) was developed by DYNAMIC+ (http://forum.xda-developers.com/showthread.php?t=502881). If the original developer has any problems with me redistributing a piece of his work, contact me.
The mortscript file (for the interested ones)
Code:
t = Input("Minutes until sleep","TF3D Music Sleep",1);
Sleep(60000*t);
Run("SDDialer.exe");
That's all there is to it, the pausing is handled by the SDDialer.exe file. which I did NOT write myself. So in case you find any error related to SDDialer.exe, you should contact DYNAMIC+ (the original dev). Because the SDDialer.exe file was originally written to be used in conjuction with a headset, it only works when a headset is plugged in! (don't know how bluetooth headsets are handled though)
Cabbed using the wonderfully simple QuickCab!
After installation you will have a new shortcut in your startmenu, just tap it, enter the amount of minutes and lay back. This works when your device is in sleep-mode, as well as in normal active mode. One remark: the SDDialer.exe file in fact toggles the music playback, so when you don't play music, and you set the timer to for example 10 minutes, the music will start playing after 10 minutes. Could be useful for a countdowncounter with music or something
Test results are ALWAYS appreciated
ill post you the requested source....
Code:
#define AUDIO_MANAGER_COMMAND_PAUSE 0x3
HWND GetAudioManagerWindow( )
{
return FindWindow( TEXT("AUDIO_MANAGER_ENG"), NULL );
}
BOOL IsAudioManagerPlaying( )
{
BOOL bIsAudioManagerPlaying = FALSE;
HKEY hkAudioManagerInformation;
if ( ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\HTC\\AudioManager_Eng\\information"), 0, 0, &hkAudioManagerInformation) )
{
DWORD dwType, dwStatus, dwCbStatus = sizeof(dwStatus);
if ( ERROR_SUCCESS == RegQueryValueEx(hkAudioManagerInformation, TEXT("status"), 0, &dwType, (LPBYTE)&dwStatus, &dwCbStatus) && dwType == REG_DWORD )
{
if ( dwStatus == 4 )
bIsAudioManagerPlaying = TRUE;
}
RegCloseKey( hkAudioManagerInformation );
}
return bIsAudioManagerPlaying;
}
LRESULT SendAudioManagerMessage( HWND hAudioManagerWnd, DWORD dwCommand )
{
return SendMessage( hAudioManagerWnd, WM_USER + 1, dwCommand, 0 );
}
Code:
if ( IsAudioManagerPlaying() )
{
HWND hAudioManagerWnd = GetAudioManagerWindow( );
if ( hAudioManagerWnd )
SendAudioManagerMessage( hAudioManagerWnd, AUDIO_MANAGER_COMMAND_PAUSE );
}
Is it possible to make this work with the speaker function? I quite like the speaker quality on my TP2.
Another feature I would love to see is the gradual decrease in volume. I have a sleep machine that slowly lowers the volume, so when the sound stops it isnt abrupt and possibly causing the person to wake.
Id be a willing beta tester...
sleep machine functionality for TF3D
Nice one, thank you!
I'd second the above suggestion for a gradual lowering of volume, it would be great to have some sort of sleep machine functionality.
Please not that I won't be adding any features/fix bugs on this 'application'. In fact: I don't even use TF3D anymore (Titanium + Nitrogen music player). But if it works for you, I always like to hear that.

Dial codes?

Coming from the captivate I remember having the sgs tools app that had all the codes you could enter to get into certain menus..such as GPS, service mode, gsm and so on...do we have the codes and where can I find them
Sent from my SGH-I777 using XDA
devoured321 said:
Coming from the captivate I remember having the sgs tools app that had all the codes you could enter to get into certain menus..such as GPS, service mode, gsm and so on...do we have the codes and where can I find them
Sent from my SGH-I777 using XDA
Click to expand...
Click to collapse
http://bit.ly/x96GD8
gsrrr said:
http://bit.ly/x96GD8
Click to expand...
Click to collapse
Noiceeee....lol
Sent from my Ice Cream Sandwich
gsrrr said:
http://bit.ly/x96GD8
Click to expand...
Click to collapse
Back on topic. Try and see which ones work/don't work.
*#1234# = Firmware Version.
*#2222# = H/W Version.
*#8999*8376263# = All Versions Together.
*#8999*8378# = Test Menu.
*#4777*8665# = GPSR Tool.
*#8999*523# = LCD Brightness.
*#8999*377# = Error Menu.
*#8999*327# = EEP Menu.
*#8999*667# = Debug Mode.
*#92782# = PhoneModel. (Wap)
#*5737425# = JAVA Mode.
*#2255# = Call List.
*#232337# = Bluetooth MAC Adress.
*#5282837# = Java Version.
#*4773# = Incremental Redundancy.
#*7752# = 8 PSK uplink capability bit.
#*7785# = Reset wakeup & RTK timer cariables/variables.
#*7200# = Tone Generator Mute.
#*3888# = BLUETOOTH Test mode.
#*7828# = Task screen.
#*#8377466# = S/W Version & H/W Version.
#*2562# = Restarts Phone.
#*2565# = No Blocking? General Defense.
#*3353# = General Defense, Code Erased.
#*3837# = Phone Hangs on White screen.
#*3849# = Restarts Phone.
#*3851# = Restarts Phone.
#*3876# = Restarts Phone.
#*7222# = Operation Typ: (Class C GSM)
#*7224# = !!! ERROR !!!
#*7252# = Operation Typ: (Class B GPRS)
#*7271# = CMD: (Not Available)
#*7274# = CMD: (Not Available)
#*7337# = Restarts Phone. (Resets Wap Settings)
#*2787# = CRTP ON/OFF.
#*2886# = AutoAnswer ON/OFF.
#*3737# = L1 AFC.
#*5133# = L1 HO Data.
#*7288# = GPRS Detached/Attached.
#*7287# = GPRS Attached.
#*7666# = White Screen.
#*7693# = Sleep Deactivate/Activate.
#*7284# = L1 HO Data.
#*2256# = Calibration info? (For CMD set DEBUGAUTONOMY in cihard.opt)
#*2286# = Databattery.
#*2527# = GPRS switching set to (Class 4, 8, 9, 10)
#*2679# = Copycat feature Activa/Deactivate.
#*3940# = External looptest 9600 bps.
#*4263# = Handsfree mode Activate/Deactivate.
#*4700# = Please use function 2637.
#*7352# = BVMC Reg value (LOW_SWTOFF, NOMINAL_SWTOFF)
#*2558# = Time ON.
#*3370# = Same as 4700.
#*3941# = External looptest 115200 bps
#*5176# = L1 Sleep.
#*7462# = SIM Phase.
#*7983# = Voltage/Freq.
#*7986# = Voltage.
#*8466# = Old Time.
#*2255# = Call Failed.
#*5187# = L1C2G trace Activate/Deactivate.
#*5376# = DELETE ALL SMS!!!!.
#*6837# = Official Software Version: (0003000016000702)
#*7524# = KCGPRS: (FF FF FF FF FF FF FF FF 07)
#*7562# = LOCI GPRS: (FF FF FF FF FF FF FF FF FF FF FF FE FF 01)
#*2337# = Permanent Registration Beep.
#*2474# = Charging Duration.
#*2834# = Audio Path. (Handsfree)
#*3270# = DCS Support Activate/Deactivate.
#*3282# = Data Activate/Deactivate.
#*3476# = EGSM Activate/Deactivate.
#*3676# = FORMAT FLASH VOLUME!!!
#*4760# = GSM Activate/Deactivate.
#*4864# = White Screen.
#*6833# = New uplink establishment Activate/Deactivate.
#*3273# = EGPRS multislot. (Class 4, 8, 9, 10)
#*7722# = RLC bitmap compression Activate/Deactivate.
#*2351# = Blinks 1347E201 in RED.
#*4472# = Hysteresis of serving cell: 3 dB
#*2775# = Switch to 2 inner speaker.
#*9270# = Force WBS.
#*7878# = FirstStartup. (0=NO, 1=YES)
#*3757# = DSL UART speed set to. (LOW, HIGH)
#*3838# = Blinks 3D030300 in RED.
#*7878# = FirstStartup. (0=NO, 1=YES)
#*3838# = Blinks 3D030300 in RED.
*2767*226372# = Camera Reset. (deletes photos)
#7263867# = RAM Dump. (On or Off)
samsung mobile code. – - – sound code.
Samsung phones.
Dial *#6984125*#
Test menu dial *#9072641*# (You need this one i think.)
Click 5 Audio – 2 AP volume config
Tune Headset volume:
*#9072641*# – 2 EAR config – 3 Ringtone volume – Stap 6 tune it to 10
Tune movie volume:
*#9072641*# – 3 SPK config – 3 Ringtone volume – Stap 6 tune it to 10
Thanks, I think you are cute too.
lots of xoxo
Sent from my SAMSUNG-SGH-I777 using Tapatalk
Dont be dicks you too.

Change Min volume Level

Hello,
I have a motorola Moto Z2 Force. Like many other motorola, it has a problem: the minimum Media volume (one step above mute) is WAY to lout. (step one is about 36% of the max scale).
In Engineer mode you can set values for each step. But on my Moto there is no Engineer mode since as far as I understood it is only available for Mediatek devices.
I am wondering, in wich file are the volume steps defined? I would like to edit them manually. (>Yes my device is rooted..)
I do not want to use programs like precise volume or things like that.. I would just like to edit the setting and have it done.. I already increased the steps of the slider.. but that does nothing more than adding more steps between 36% volume and 100% volume.
I would like to transform that 36% to about 5%...
I am on Android 8.0.0 latest security update.
Thank you!
Best regards
Sharky
ok guys,
i found out that i have to edit this:
/** Minimum volume index values for audio streams */
protected static int[] MIN_STREAM_VOLUME = new int[] {
1, // STREAM_VOICE_CALL
0, // STREAM_SYSTEM
0, // STREAM_RING
0, // STREAM_MUSIC
1, // STREAM_ALARM
0, // STREAM_NOTIFICATION
0, // STREAM_BLUETOOTH_SCO
0, // STREAM_SYSTEM_ENFORCED
0, // STREAM_DTMF
0, // STREAM_TTS
1 // STREAM_ACCESSIBILITY
};
Click to expand...
Click to collapse
inside the audioservice.java file.. problem is, i dont seem to be able to find this file.. where is it located??
Nobody has an idea on how to change the min. volume of the media, keeping the max volume the same? I am still stuck and found nothing so far...

getRingerMode always returns 0???

Hello,
I would like to detect the ringer mode..so here is the code I am currently using.
Below is the code inside onCreate...
BroadcastReceiver receiver=new BroadcastReceiver(){
@override
public void onReceive(Context context, Intent intent) {
AudioManager am = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
Log.i("MyApp", String.valueOf(am.getRingerMode()));
}
};
IntentFilter filter=new IntentFilter(
AudioManager.RINGER_MODE_CHANGED_ACTION);
registerReceiver(receiver,filter);
1. When the app runs first time, it printed 0. (Even if my phone ringer mode was normal, it always prints 0 first time when my app runs)
2. I tried to change to vibrate mode...normal mode......however, it never printed. I think that onReceive is not getting called even if I changed the ringer mode to vibrate/normal...
Here is another testing...
I created a simple button..and when the button is clicked, I called getSystemService and getRingerMode to print the value...
I noticed it always prints 0, which is RINGER_MODE_SILENT... I changed my phone to vibrate mode..and it still prints 0....I changed my phone to normal mode..but it still prints 0...
BTW, SDK version is 28 (API 28: Android 9.0(Pie))...
Could this be a permission issue? I don't think I would need to add some permission in order to use RINGER_MODE_CHANGED_ACTION...
Any idea?
Any help much appreciated.
Thanks,

Categories

Resources