[Q] some questions about windows runtime c# programming - Windows Phone 8 Q&A, Help & Troubleshooting

hi everyone .
I am working on a windows phone music player and it's a Windows Runtime project .
I tried many ways to solve these problems but I couldn't find anything useful .
when user leave app for a while (I think about 4-5 minutes) , I mean if user pause music playback , not able to continue playing after this while because background audio agent ran out and it's not running !
I want to know how can I keep it alive after app registers this background task .
my second question is how can I update live tile periodically .
I tried updating in background task but it is a runtime exception and get me Wrong Thread error .
I also tried updating it in foreground and in MediaEnded event , It again returns same runtime error .
at last I wrote a ThreadPoolTimer in my foreground app to update my tile . fortunately it works while DEBUG but when i stop debugging and run it normally again doesn't works .
unfortunately I tried to code two background tasks one for audio one for timer but only audio background agent runs and the timer agent couldn't run
anyone can help me here ?

no idea guys ?

I asked in MSDN also , they removed my question
https://social.msdn.microsoft.com/F...er-alive-in-windows-runtime-c?forum=wpdevelop

Related

[Q] List for Samsung: Froyo user problems

Is there already a list with collected problems after the Froyo . I'm sure that Samsung is following everything that's on XDA, and maybe it's a good idea to put them in one Thread.
My Problems:
- still no support for Exchange 2003 email. It worked once, but only very slow and after returning to the original settings I suddenly was not able to add my account again...
- Mp3 player in sleep modes, doesn't return to the last played song. Very annoying if you close the player to check email or surf on the internet...
- battery drain looks worse after updating to 2.2
GPS is the worst problem
Which version with anything like a lagfix ??
-exchange I'm not using (because I redirected them to gmail) so I can't tell
-mp3 I use it every day and I always find it where it was
-battery drain might be related to a lagfix have you done this http://forum.xda-developers.com/showthread.php?t=722862 ??

[APP] Easy Timer -[R]- 24/02/2011 -[U]- 11/09/2011 -[V]- v1.4 [Mango]

Name: Timer
I'm making this Timer app for windows phone 7. I searched for some timer apps on the marketplace (http://www.appsfuze.com/), I still don't own a wp7 device, working on that . I saw a few apps, but they all don't match the design of wp7 theme, and not all have the functionality of stopwatch or countdown.
So I decided to make an app myself, that matches the metro-design and also matches the theme you're using (light or dark). It has two modes: stopwatch and countdown. It'll be a free app because I'm a student and don't really do Windows Phone programming, it's just what I do in my free time
Video:
http://www.youtube.com/watch?v=y05BhoMqSss (light theme switch is at the second half of the video)
Some pics: see the attachments
Now I have some questions: what do YOU want to see in a timer app, what functionality can I add to my app? I don't have a wp7 device so I want to know some differences with the emulator (like locking and unlocking the device, you can't emulate that)
UPDATE:
------------------------------------------------------------------------------------------------------
Program is live here: http://social.zune.net/redirect?type=phoneApp&id=4a4bbd3b-4f23-e011-854c-00237de2db9e
There are no push notifications because of the complexity of the system (at least for me). Any requests and ideas are welcome! (landscape support is coming in the next version and maybe thombstoning handling)
------------------------------------------------------------------------------------------------------
UPDATE V1.1:
------------------------------------------------------------------------------------------------------
Program is live here: http://social.zune.net/redirect?type=phoneApp&id=4a4bbd3b-4f23-e011-854c-00237de2db9e
Ok this version can be run under lockscreen! (don't forget to activate that feature in settings).
Next update I will add the last countdown memory as requested and the ability to try to resume the timers if the program was stopped and reopened.
Greetings and thx for support
Edit: added the .xap package because the marketplace version is still 1.0...
------------------------------------------------------------------------------------------------------
UPDATE V1.2:
------------------------------------------------------------------------------------------------------
Program is live here: http://social.zune.net/redirect?type=phoneApp&id=4a4bbd3b-4f23-e011-854c-00237de2db9e
Most people were probably waiting for this: the timers are now resumed when you close and open the app again! Now you can finally check your mail or send an sms and come back to your timer later.
The timer-start variables are stored, at the launch they are restored. Of course, the alarm CAN'T go off while the app is closed! (WP7 doesn't have multitasking).
Lap times are now calculated correctly. In the older versions you had this bug: you can't receive an sms while a timer was running, now it's solved.
The next versions will add some more usability and requested features (like the memory function, or pause and reset timer buttons) and new ideas are welcome!
I don't know if the latest version is distributed worldwide (I can see 2 versions in my app hub: English and EnglishNorthAmerica) If anyone outside USA can confirm that they are able to update (or fresh install) to 1.2, that will be nice.
I added a .xap for all other people without marketplace, in the attachment.
------------------------------------------------------------------------------------------------------
UPDATE V1.3:
------------------------------------------------------------------------------------------------------
Program is live here: http://social.zune.net/redirect?type=phoneApp&id=4a4bbd3b-4f23-e011-854c-00237de2db9e
Not a big update, but some people requested it:
- You can now "export" stopwatch data. You just send an email to yourself so you can use that data later.
- There's a memory function for countdown. The last timer set is now remembered.
.xap file for people without marketplace is in the attachment
------------------------------------------------------------------------------------------------------
UPDATE V1.4 Mango features preview:
------------------------------------------------------------------------------------------------------
I was typing extended info on the new features here when I accidentally closed the window. So just look at the video:
http://www.youtube.com/watch?v=ZCspKWwS8S4
I will release this app soon (1-2 weeks from now) I hope I can still submit to marketplace, my student account is almost 1 year old
The app will still be free.
Oh, just saw some comments more on this! Thanks for the support. I will redesign UI a bit before the release, so it'll use the default time picker.
Other feature requests are not forgotten! Just stay tuned, I'm programming this in my free time
------------------------------------------------------------------------------------------------------
UPDATE V1.4 (Mango):
------------------------------------------------------------------------------------------------------
Alright, the app is now on the marketplace! You can update/download it there. The new .xap is also in the attachment for those who still can't use marketplace (HD2)
Blogpost: http://alexju.be/blog/?p=251
------------------------------------------------------------------------------------------------------
Grtz, Ioulian Alexeev
http://alexju.be/blog/?p=86
The only thing i can think of would be to have it play a sound and vibrate once the countdown is complete. That way you could use it for cooking and stuff
Audio said:
The only thing i can think of would be to have it play a sound and vibrate once the countdown is complete. That way you could use it for cooking and stuff
Click to expand...
Click to collapse
Yep, it's already there ^^ (vibration needs to be tested cause the emulator wont emulate the vibration either)
simple , clean , real good looking good work .
hope to see it soon , I am getting this app for sure .
Looks great!
Hope can be released soon
very much interested in this. Will be even better when wp7 will let it run in the background.
nrfitchett4 said:
very much interested in this. Will be even better when wp7 will let it run in the background.
Click to expand...
Click to collapse
yes, I had the idea to make the countdown timer visible as a live tile, maybe I'll add this functionality in the future versions still very newb with wp7 development
ioulian said:
yes, I had the idea to make the countdown timer visible as a live tile, maybe I'll add this functionality in the future versions still very newb with wp7 development
Click to expand...
Click to collapse
I believe it is possible to run timers in the background, by calculating the time between the app was closed and it was reopened. So it's not technically running in the background but is able to update the timer when you return to the program. Unfortauntely though it would not let you signal an alert or anything unless the app is actually open.
The alternative would be to have a webserver for the app; when you set a timer, eg 30 minutes, the app will register this with the webserver. Whether or not you are still in the app, the webserver can send the alert to your phone as a traditional toast notification (via MS servers as usual).
Here's a suggestion; perhaps you could develop this app as freeware, but make it a euro or two for this live tile / toast notification functionality? As it stands, it looks way more metro than the other timers I've tried so far. I need a timer for cooking!
wheresmybeaver said:
I believe it is possible to run timers in the background, by calculating the time between the app was closed and it was reopened. So it's not technically running in the background but is able to update the timer when you return to the program. Unfortauntely though it would not let you signal an alert or anything unless the app is actually open.
The alternative would be to have a webserver for the app; when you set a timer, eg 30 minutes, the app will register this with the webserver. Whether or not you are still in the app, the webserver can send the alert to your phone as a traditional toast notification (via MS servers as usual).
Here's a suggestion; perhaps you could develop this app as freeware, but make it a euro or two for this live tile / toast notification functionality? As it stands, it looks way more metro than the other timers I've tried so far. I need a timer for cooking!
Click to expand...
Click to collapse
Good idea, I'll look into that!
EDIT: I searched for some more info on toast notifications, but there's one thing that's bugging me.
So I can send and notification and the phone receives it, but if there are more than one app running, then a person might receive a notification that is from another user... Toest notifications are perfect if there's one message for all the users? or does it only send notifications to the phone that has requested that?
I've been searching for a free Timer App (there a already a number of free Stopwatch app) ever since I got my HD7. This is really very timely.
Whatever you have is already good enough as a launch product!
Suggestions:
1. As suggested earlier, to be able to ran even when WP7 is off (i.e. screen is off). Even better, if WP7 is running other app.
2. Have a different font color for the title of the app (probably build into the theme color change or just a separate settings option)
3. Ability to change the Alarm sound.
4. When Stopwatch or Timer is running, to blow up the font size of the running digits to cover the screen size (good feature) and have the fonts in different color (option)
I'm looking forward to your app and if you need someone to help you to test, I'm definitely willing but from what I know, I have to unlock my HD7 before I can do any software testing.
Thanks in advance for coming up with the app.
May I suggest a few names for the app?
1. Free Timer
2. StopW n Timer
3. Timer n StopW
4. Tmr n StopW
5. StopW n Tmr
This...looks...AMAZING!
It is possible to add option for reset en restart automaticly the couldown ?
This application is released on marketplace! Check the first post for more info!
I've tried the application from the marketplace today and while I really like it, there are still two plotstoppers for me:
Like:
- Nice, elegant design
- Fast transitions between stopwatch/timer
Dislike:
- The last set timer isn't saved. If I use the timer for my 5:40 boiled-egg every morning I have to set the timer everytime anew. Would be good to have a "reset to last set time"-option that is saved when exiting the application.
- The application really needs to prevent the phone from going entering standby-mode. As long as the timer or the stopwatch is running the phone and the display should stay switched on.
Maybe you could considering implementing my suggestions.
Thank you for your app anyway
skycamefalling said:
- The last set timer isn't saved. If I use the timer for my 5:40 boiled-egg every morning I have to set the timer everytime anew. Would be good to have a "reset to last set time"-option that is saved when exiting the application.
- The application really needs to prevent the phone from going entering standby-mode. As long as the timer or the stopwatch is running the phone and the display should stay switched on.
Click to expand...
Click to collapse
Yes, the tombstoning is a big issue. The next update will have a better support for this feature. I hope I can prevent the screen for turning off.
Thanks
ioulian said:
I hope I can prevent the screen for turning off.
Click to expand...
Click to collapse
I'm sure...you grow with your tasks, you know
Hello again
I saw your video on youtube.. im the one that posted those comments. here if you want me to help you with the design end please let me know. i have some ideas design and i can show then to you... email me at [email protected]
i really wanna help.
Great app!! Very simple (=positive!) and works great. However...could you please make a version without background? That would make it even more cleaner (=again positive! ) and more 'metro-ish'.
Keep up your great work!
JHoogstede said:
Great app!! Very simple (=positive!) and works great. However...could you please make a version without background? That would make it even more cleaner (=again positive! ) and more 'metro-ish'.
Keep up your great work!
Click to expand...
Click to collapse
Ok, I will add this functionality, I just submitted new version (with possibility to run behind the lockscreen). Once this is approved I will do the next update.
The only thing i can think of would be to have it play a sound and vibrate once the countdown is complete.

[Q&A] [HOW TO] Install Android apps on Windows 10 Mobile

Q&A for [HOW TO] Install Android apps on Windows 10 Mobile
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [HOW TO] Install Android apps on Windows 10 Mobile. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Hello, I was giving this a try but when I try to connect my phone to the PC it says "Error connecting to ADBD. Error code = 7", any suggestions on what to do?
Thanks.
Sorry for some reason this went to the incorrect place, please delete this thread.
I seem to be getting "Error 14: Cannot boot Astoria platform" on my Lumia 925, even though its supported. Windows 10 and 8.1 SDKs installed on desktop, latest build of W10m, developer settings on and discovery on. I tried unregistering from 8.1 registration too but that didn't help.
I fixed Developer Menu crashed
I just tested Kingdom Rush, it works fine. Some fps drop from time to time, but totally playable.
problem while using project astoria tool
after entering wconnect.exe usb in command prompt i got this error
The procedure entry point EventSetInformation could not be located the dynamic link library ADVAPI32.dll, what should I do?
I tried to do all these instructions but got an error with "IpOverUsb", which did not manage to solve. In task manager this service is running, but crashes constantly. Does anyone knows, how to solve this issue?
So, tried this on my testing device (Lumia 830), but am getting Error Code 14 which suggests my device isn't supported?
Did anyone else get this, of anyone got it working on a Lumia 830?
APK to W10M Tool
Hi everyone!
I'm Antonio de la Iglesia from Microsoft Insider, a Microsoft fan spanish website. I've released a tool to do everything for you, one install, no command lines, etc. Only you have to drag an drop the apk in the box:
Download link is on: bit dot ly 1MddHUK (I can't post links or images, sorry)
Applications I tested and are working: Angry Birds 2, Plants vs. Zombies 2, Impossible Road, Facebook Messenger (head chat only works inside the app), Facebook, Whatsapp, Fruit Ninja, Dumb Way to Dies 2.
Apps that have not worked: Never Alone (stuck on a black screen), Prince of Persia Shadow and Flame (not start), The Room Two (eternally in the loading screen), Storm Rush (missing textures), Heartstone ( forever on the pub entrance screen ).
And I wanted to talk with yours about Snapchat. Currently it is impossible to use the official due to check with the services google, put the Casper can be installed. I can login and view snaps, but the native Casper camera does not work (is a black image). It is possible to make the camera work going in the settings and switching to the native camera phone however it does not help much. With this option activate the camera opens and I shot the photo but when I confirm, the application simply returns to the home screen without letting me post. If I enable the "Chose document chooser", when trying to choose a photo in the gallery I will have access to Windows applications choice of menu and I can get there in the gallery, camera or drive but it does not help much because that:
The Android has no access to the Windows file system and Windows also does not have access to Android file system . You do not need to activate the Blackbary option for camera work, it will open even without this option . The problem is that when you take the picture it is saved in a Windows directory and then when he tries to send to Casper, HERE IS ERROR . The camera does not have access to android files . The same applies to the gallery. If you enable the " Chose document chooser ", by clicking on the gallery you will be brought to application choice screen. Here you can choose the camera and the phone's own gallery. Again , when you select a photo from gallery an error occurs saying that was not possible use the file. This is again because the gallery can not send the file to Casper . Here is the whole problem.
My girlfriend is pissed me off to make this application work and I can not . I am in contact with Caster developer also to try to fix the problem. if we can bypass this issue of access to the file system , I'm sure it would work. You guys have any idea ? Sorry for my bad English. It is not my first language .
For Developers mode on Windows 10 Mobile crashing
Hey guys. I'm new to software development on Windows Phone but I've been using my Lumia devices for more than a year and a half now. Lately, I've been testing the builds for Windows 10 Mobile. I am currently on build 10166 running on my Lumia 1520. Due to the recent development, I tried to install APK files on it via the leaked Project Astoria porting tool and it worked great until the "For Developers" option started to crash and I am unable to install the APKs anymore since I can no longer pair my device to the sideloading app on my PC.
I've downloaded the Windows Phone 8.1 SDK as they said that I can "unregister" my device from there and it will regain access to the "For Developers" settings on my Windows 10 Mobile. After the installation, I plugged my phone in to my laptop and then I tried to hit Connect from the SDK, but I ran into an error that says "Waiting for Update Pack" wherein it prompts me to install an update. After i click update, an error code 0x80004003 - Object reference not set to an instance of an object. Says something about Phone Tools Update Pack. How can i get through this?
Adelaiglesia said:
Hi everyone!
I'm Antonio de la Iglesia from Microsoft Insider, a Microsoft fan spanish website. I've released a tool to do everything for you, one install, no command lines, etc. Only you have to drag an drop the apk in the box:
Download link is on: bit dot ly 1MddHUK (I can't post links or images, sorry)
Click to expand...
Click to collapse
As great as this is, is there anyway to get it in English?
Mine is 1520. =.= Im a student and dont have laptop or pc to do this solution. Is there any solution which is allow me to install directly?
Server error. Error Code=1?
So not matter what method I do or what version of windows my PC is running(I've tried 8.1, and 10) I keep getting the same error "Creating session... Server Error. Error Code=1" and that goes for APK Deployment Application a trying it with the wconnect.exe through CMD.
Anyone got a clue as to how to fix this error, I haven't ran crossed it yet on any of the sites covering this. I'd hate to have update my Lumia 1520 to 10 just to find out my only reasoning for doing so was a bust...
how?
How did you guys do this deactivate developer tools using Windows Phone 8.1 SDK. Can someone post a direct link the download. Every time I search for it, it pulls up Visual Studio. I'm sure that where it is but I've played around with visual studio and I'm not seeing this deactivate developer mode......
Keyboard problem
Hi Everyone!
I tried a lot of android applications in my Lumia 930 (build 10166) - for example: german dictionaries, dumb ways to die 2 game, lumosity, outlook web app... and so on- and everything was just perfect. Hovewer, when I get the windows 10 update 10512 my applications become useless, because I can not use the keyboard in the applications (not come up), so I cant fill in the necessary field, for example to log in to my account. I tried to delete and install apps again, but it doesnt help.
Does anybody has an idea to solve my problem?
Thanks for your help!
AFter upgrade my Lumia 1520 to latest build 10512 then I cannot active keyboard in Android app.
keyboard problem
hey my keyboard doesn't shows up while using android apps , please tell me how to resolve this
---------- Post added at 12:40 PM ---------- Previous post was at 12:37 PM ----------
ariltonsama said:
Applications I tested and are working: Angry Birds 2, Plants vs. Zombies 2, Impossible Road, Facebook Messenger (head chat only works inside the app), Facebook, Whatsapp, Fruit Ninja, Dumb Way to Dies 2.
Apps that have not worked: Never Alone (stuck on a black screen), Prince of Persia Shadow and Flame (not start), The Room Two (eternally in the loading screen), Storm Rush (missing textures), Heartstone ( forever on the pub entrance screen ).
And I wanted to talk with yours about Snapchat. Currently it is impossible to use the official due to check with the services google, put the Casper can be installed. I can login and view snaps, but the native Casper camera does not work (is a black image). It is possible to make the camera work going in the settings and switching to the native camera phone however it does not help much. With this option activate the camera opens and I shot the photo but when I confirm, the application simply returns to the home screen without letting me post. If I enable the "Chose document chooser", when trying to choose a photo in the gallery I will have access to Windows applications choice of menu and I can get there in the gallery, camera or drive but it does not help much because that:
The Android has no access to the Windows file system and Windows also does not have access to Android file system . You do not need to activate the Blackbary option for camera work, it will open even without this option . The problem is that when you take the picture it is saved in a Windows directory and then when he tries to send to Casper, HERE IS ERROR . The camera does not have access to android files . The same applies to the gallery. If you enable the " Chose document chooser ", by clicking on the gallery you will be brought to application choice screen. Here you can choose the camera and the phone's own gallery. Again , when you select a photo from gallery an error occurs saying that was not possible use the file. This is again because the gallery can not send the file to Casper . Here is the whole problem.
My girlfriend is pissed me off to make this application work and I can not . I am in contact with Caster developer also to try to fix the problem. if we can bypass this issue of access to the file system , I'm sure it would work. You guys have any idea ? Sorry for my bad English. It is not my first language .
Click to expand...
Click to collapse
bro my keyboard doesn't shows up while using android apps how to resolve this. please help.
Keyboard problem since 10512
Since my update to 10512 the keyboard doesn't open in sideloaded apks
Anyone with a similar problem?
Sadly, I will need to report that Sideloading APK's on the latest build 512 (At least on the 1520) is causing the windows keyboard to not load. This means you cannot type at all in the app. Will continue working on this and report a solution if found.

Orux maps app will be closed while running in background randomly

Hello everyone,
i need some help and didn't find something here in the forums.
i own a P9+ with the latest ota-stock-rom installed, not rooted.
I am running my emap-app Orux-maps for many years now on different android-phones and have never had this problem.
If i use this app in the background recording my gps-track it will be closed after a while.
As far as i know now it could be related to Android power saving options.
I tried the following but with no success:
Under:
settings
batterie
-close apps after screenlock = toggle orux don't close
settings ( gear wheel upper right corner)
-close excessively power intensive apps -uncheck
apps
orux
close after screenlock -uncheck
Do you know if there are more power saving options in Android 7?
Is this maybe a known issue?
I also already gave the app all permissions...
THX a lot,
Henning
I know it's been years since this question was posted but issue remained
This is a MUST: enable "Apps>OruxMaps>App Permissions>Location>Allowed All the time"!
My original setting was "Allow only while using the app" and it did not work while running the app in the background because once the OruxMaps goes into background it will disconnect the Location Service and will reconnect as soon as app is reactivated (i.e. screen unlocked) drawing a straight track-line between two GPS readings... even though it says that the tracking is active but apparently without Location input...

Play Music (url) from Time A to Time B every day

Hello there folks!
First post here, believe me I've search through all the internets and this forum searching for a solution to this and I can't find it, so maybe I'm approaching this problem in a wrong way, let's see if the gurus around here can give me a hand.
I am looking for a way to play music from an url from 8 to 22 every day. I am trying this on an Android machine that is not a phone. It has Android Version 7.1.2 and Kernel Version 3.14.29.
What I'm doing at the moment is launching Chrome with the url in the DATA field in a task, and launching that task with a profile at 8h, then using the Media Control pausing it at 22h, and the next day at 8 launching again Chrome with the url in the DATA field. I tried to play again using the Media Control but I think after a few minutes Chrome closes the connection and it's not possible to play again, you have to reload.
This way of doing things brings a problem: Chrome always will open in a new tab, so after a week I'll have 7 tabs open in Chrome. Checking the "Always start a new copy" field does nothing in this regard. Also my device is not rooted so I can't kill Chrome, however I am not sure if I was able to kill it, if it would still open the last session with all the previous tabs, not solving the problem anyway. I am willing to root the device but it seems not being a commercial phone it's not a trivial task, some apps don't work and if it won't solve anything it'd be a waste of time.
Things that I've tried but haven't been able to achieve: close tabs, open Chrome from Tasker in Incognito Mode. Using Autoinput for this things seem to not work, or I think I may not have the right code for what Autoinput should look for. I've tried to use VLC to open the url because maybe I would solve the multitab problem and maybe I could just play and pause forever without being forced to relaunch. But VLC for Android doesn't seem to care if you tell it to open an url from Tasker.
So questions, do you guys think there would be a better approach for this? Chrome is not meant for playing music but it seemed like the easiest way to get the job done, giving that VLC is too simple in Android to manage urls. Maybe there's an app that would just do this and I'm going crazy for no reason.
A part B of the problem that would be great if I had some input is that I should monitor the network and the music so when it stops between 8 and 22 I do something. For instance, if it stops and the connection is down I'd play something from a folder, and whenever the connection is back I'd switch to the url again. My first approach to this is to check the Network and make a if_else routine doing changes. This routine runs infinitely through a GoTo at the end of it. If I'm not mistaken that's the only way in Tasker to check for instant changes in the Network (this device is connected through cable, not WiFi) since Tasker only checks changes every 2 minutes. If there is another way of doing this it'd be great to know, the machine seems to suffer a bit when I run this task.
Besides checking the Network I've also tried the Is Music Playing plugin but still with no success. Maybe it won't work with Chrome? I still have to invest some time on this, but there's not a lot of documentation available I believe.
Well, sorry for the long post! I'd be great to have some advice, I'm going a bit crazy doing something that it's probably basic. I am a newbie with this.
Thanks a lot!
Try using a "system -> send intent" action to launch the url instead.
A1: Send Intent [
Action: android.intent.action.VIEW
Cat: None
Mime Type:
Data: https://google.com
Extra: com.android.browser.application_id:music
Extra:
Package:
Class:
Target: Activity
On the "Extra:" line, notice the "music". That is giving a label to the window and most modern browsers (tested on Firefox) will then reuse that window.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
And to follow-up on the second part of your question, where you want to know if the streaming stops....
There is a thread on the tasker google group discussing a variety of monitor network usage options. I think that is the easiest way to determine if streaming has stopped.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Thanks a lot ktmom! I've done exactly what you said and I searching about it I see it's been recommended for similar purposes on other forums. But it doesn't work for me, I'm just able to open chrome but it seems to ignore the url. Any ideas? This machine won't allow me to install Firefox, although I can install Firefox Focus, in case that could help.
I'm going to check out now the network thread, thanks a lot!
Try whatever other browser you can. Is webview installed? I'm not sure if it matters though.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
I think I experimented before with some incognito mode stuff and that was interfering with the routine. Now seems to work like a charm! Thanks a lot!
About the Network management, here's what I've done, maybe I'm a bit basic but I understand this better than what the guys are talking about in the other thread. If you find it doesn't have something that could potentially crash Android or damage somehow the working of the machine in general, or it's improvable, I'm all ears. I know I'm not the best on this stuff:
Test Net
Type Connection Type Store Result in %NETSTATUS // Check the connection
If %NETSTATUS eq ethernet & %FLAG eq 1 // If there were a connection and there's still a connection, do nothing
Wait 1ms
End If
If %NETSTATUS eq ethernet & %FLAG eq 0 // If the machine were offline and the ethernet cable is reconnected
Music Play Dir
Dir Music Subdirs Off Audio Only On Random On // Stop offline music. For some reason this works well for stopping the offline music, whereas the Media Stop only works the first time
Send Intent
Action android.intent.action.VIEW // This is the sweet code you gave me
Variable Set
Name %FLAG to 1
End If
If %NETSTATUS eq none & %FLAG eq 1 // If there were a connection but there's not anymore
Media Control Cmd Pause Simulate Media Button On App Chrome // Pause streaming so it doesn't overlap the offline music
Dir Music Subdirs Off Audio Only On Random On // Play offline music
Music Play Dir
Variable Set
Name %FLAG to 0
End If
If %NETSTATUS eq none & %FLAG eq 0 // If there were not a connection and there's still no connection, do nothing
Variable Set
Name %FLAG To 0
Goto
Type Action Number Number 1
--
One thing I see about this is that it's an infinite loop and may cause some suffering to the machine.
Now I'll see how to add WiFi to the routine and I'd like to check how to do something when the music stop in general.
Thanks a lot for your time!

Categories

Resources