How to Play Youtube Videos In Windows phone 8 application? and make application Resolution compatible - c#-4.0

Hello I am developing a windows phone 8 application. My application is complete i am left with two things
first, i have to play videos from youtube channel.
second, i have to make application resolution compatible.
I visited so many pages but no luck.
can someone help me out, My deadline for application submission is near.

You should add MyToolkit.Extended package from NuGet.
try
{
var videoUri = await MyToolkit.Multimedia.YouTube.GetVideoUriAsync(
"uRs4hz1YEQc", MyToolkit.Multimedia.YouTubeQuality.QualityMedium);
MediaYouTubeVideo.Source = videoUri.Uri;
}
catch (Exception exception)
{
// TODO: Show error
}

Have to say that I have not checked the example, but at least the details on the page suggest that you an use it for playing you tube videos: http://code.msdn.microsoft.com/wpapps/Youtube-Video-Sample-f2692dc9

Related

Huawei Safety Detect checkURL API threat return empty list even when using malicious url for testing

Im trying to check if url is malicious in my app. But the output always return that the link is safe even when i put malicious link. Im developing the app using Android Studio and use both GMS and HMS library. Im running the app on my device which is Samsung and its working fine except for the problem i mention above. Help me please.
And one more thing, I've downloaded the appGallery on my phone and install hms core. But do i still need to convert gms library to hms library?
Thank you.
This is the response code.
#Override
public void onSuccess(UrlCheckResponse urlCheckResponse) {
List<UrlCheckThreat> list = urlCheckResponse.getUrlCheckResponse();
if (list.isEmpty()) {
// No threats found.
testRes.setText("No threats found.");
} else {
for (UrlCheckThreat threat : list){
int type = threat.getUrlCheckResult();
if(type == UrlCheckThreat.MALWARE){
//threat.getUrlCheckResult();
testRes.setText("Malware found!");
}
else {
if (type == UrlCheckThreat.PHISHING)
//threat.getUrlCheckResult();
testRes.setText("Phishing found!");
}
}
}
}
Could you please send me the link? That way I can do research. Please note: maybe the link is totally new so it may escape detection.
For your other question: "I've downloaded the AppGallery on my phone and install hms core. But do i still need to convert gms library to hms library.".
The answer is no, you don't need to convert anything. But note: you must integrate Huawei SDK when you try to use Huawei Kit features on your GMS phone or HMS phones.
Apparently, the API to check list of malicious URL took time to function. The response code was functioning well and can detect the malicious URL. Thank you for all the responses.

Sending animated gifs and videos with Microsoft Botbuilder to Skype endpoints

I am building a bot service to communicate to various endpoints. I have Skype basic communication running through Microsoft Botbuilder in Nodejs. I can send text to the Skype client fine, however when I want to send rich messages with images (animated gifs) or videos, things start going haywire.
1) Sending a animated gif:
function createAnimationCard(session) {
return new builder.AnimationCard(session)
.title('Microsoft Bot Framework')
.subtitle('Animation Card')
.image(builder.CardImage.create(session, 'https://docs.botframework.com/en-us/images/faq-overview/botframework_overview_july.png'))
.media([
{ url: 'http://i.giphy.com/Ki55RUbOV5njy.gif' }
]);
}
I call this code from another function:
exports.sendGif = function sendGif(chatBotUserSession, picUrl, contentType) {
var card = createAnimationCard(chatBotUserSession);
var reply = new builder.Message(chatBotUserSession).addAttachment(card);
_bot.send(reply);
};
When I do this I get to see an image with a play button (in the desktop Skype, mobile client does not show image at all), however pressing the button shows an error "opening not possible". I have tried different gif sources in the url field, but none seem to work. Also tried https for source.
2) I then moved to trying to display a video:
function createVideoCard(session) {
return new builder.VideoCard(session)
.title('Big Buck Bunny')
.subtitle('by the Blender Institute')
.text('Big Buck Bunny (code-named Peach) is a short computer-animated comedy film by the Blender Institute, part of the Blender Foundation. Like the foundation\'s previous film Elephants Dream, the film was made using Blender, a free software application for animation made by the same foundation. It was released as an open-source film under Creative Commons License Attribution 3.0.')
.image(builder.CardImage.create(session, 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/220px-Big_buck_bunny_poster_big.jpg'))
.media([
{ url: 'http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4' }
])
.buttons([
builder.CardAction.openUrl(session, 'https://peach.blender.org/', 'Learn More')
]);
}
When I call this using:
exports.sendMovie = function sendMovie(chatBotUserSession, picUrl, contentType) {
var card = createVideoCard(chatBotUserSession);
var reply = new builder.Message(chatBotUserSession).addAttachment(card);
_bot.send(reply);
};
It all works... at least on my desktop Skype. My mobile skype (iOS) now crashes each time when I open the chat with my bot...
So two questions:
1) Does anyone know why I can't seem to send animated gifs that actually play?
2) Anyone have experience with bots on mobile Skype sending rich content and consequently crashing the app?
Thanks.

Universal Link for IOS is not working

Hi I have done with following steps to implement Universal Link for IOS.
1.My sub domain is npd.nowconfer.com, and my apple-app-site-association file contains,
{
"applinks": {
"apps": [],
"details": [
{
"appID":"R3UDJNSN2P.com.sampleUniversal.teledna",
"paths": ["*"]
}
]
}
}
this file is uploaded into my subdomain npd.nowconfer.com and its serveing over https.
2.I tested using AASA Validator i.e https://branch.io/resources/aasa-validator/#resultsbox and i got Test result as all pass.
you can see attached screenshot.
3.Now In app side,my colleague did configuration such as
Added the domain to Capabilities i.e applinks:nowconfer.com and applinks:npd.nowconfer.com
Handled Universal Links in app i.e in delegate like this
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *))restorationHandler {
NSURL *url = userActivity.webpageURL;
// handle url
}
4.my universalink is https://npd.nowconfer.com:5000/calendar/deeplink?url=nowconfer when i click on this link from email ,my app is not opening instead it is redirecting to app store(becasue server side request came handling to redirect app shore if app is not installed on device)
But when i tested universalink validator here https://search.developer.apple.com/appsearch-validation-tool ,i have got some error
Link to Application : Error no apps with domain entitlements
The entitlement data used to verify deep link dual authentication is from the current released version of your app. This data may take 48 hours to update.
I have seen lot of tutorials but not used anything for me.Can you guys help me to figure out what is happening here?
Universal Links have to be standard http:// or https:// links. This means they need to use the standard web ports, of which 5000 is not one. That is why your link is not working — it's not actually a valid Universal Link.
The Apple validator checks for some additional things, and is also somewhat unreliable. This particular error message is confusing, but it has nothing to do with whether your Universal Linking configuration is correct. What it actually means is Apple can't detect applinks: entitlements and 'proper' handling of passed-in link values in the version of your app that is currently live in the App Store. This is expected if you are just implementing Universal Links for the first time. You don't need to worry about this — a number of large and successful apps with working Universal Links implementations fail this step too.

Is it possible to get the currently playing track in the 1.x apps api?

I am trying to update my Spotify remote control app that is currently using the legacy API to use the new 1.x API. Is it possible using the 1.x API to access information about the currently playing track? models.player.track does not seem to exist anymore (though it's in the documentation).
For the curious, I am using this for my app running in Spotify Desktop which uses websockets to talk with a Python server, which then provides a web interface for phones and tablets to remotely control the instance of Spotify running on the desktop. This works great using the legacy API and I can control playback and get the now playing info from any connected remote. I assume this app is going to stop working at some point soon since Spotify says they are retiring the legacy API. (Unless my assumption that the app will stop working is wrong, then never mind).
Thanks.
It is possible to access the current playing track loading the track property of the Player.
You would do something like this:
require(['$api/models'], function(models) {
function printStatus(track) {
if (track === null) {
console.log('No track currently playing');
} else {
console.log('Now playing: ' + track.name);
}
}
// update on load
models.player.load('track').done(function(p) {
printStatus(p.track);
});
// update on change
models.player.addEventListener('change', function(p) {
printStatus(p.data.track);
});
});
You have a working example in the Tutorial App named Get the currently playing track.

notify user to play sound windows phone 8 and stop current music

In my Windows Phone 7 and 7.5 apps I used to prompt a message box when the app was launched if the user was already playing music, to notify the user to stop current music to play the sounds, or to exit the app, this was working, but when I coded from the beginning for Windows Phone 8, for some reason this code doesn't work, if you are playing a sound, instead to prompt the notification, the apps opens and close itself.
This is the code I was using:
private void Application_Launching(object sender, LaunchingEventArgs e)
{
FrameworkDispatcher.Update();
if (MediaPlayer.GameHasControl != true)
{
if (MessageBox.Show("This application requires play sounds and stop your currently playlist", "Information",
MessageBoxButton.OK) == MessageBoxResult.OK)
{
MediaPlayer.Stop();
FrameworkDispatcher.Update();
}
}
}
I'm pretty sure must be some change in the Api with the MediaPlayer? I couldn't find any information about that, someone knows how can I fix that?
Thanks!!!
As you guessed,there are some changes in APIs.
First thing I notice, calling MessageBox.Show(string) from the Application_Launching event causes an exception. You app is probably shutting down due to an unhandled exception.
From MSDN: "If you call Show(String) method from the app Activated and Launching event handlers an InvalidOperationException is thrown with the message Error Displaying MessageBox."
EDIT: The documentation on MSDN is unclear whether calling .Show(string, string, messageBoxButton) raises the same exception.
App platform compatibility for Windows Phone

Resources