Ad Provider integration with PhoneGap App - windows-phone-7

How do I integrate ad providers with a PhoneGap App (for windows phone)?

I would think there are a couple of answers to this. One is to edit the XAML page, add the normal silverlight control to the page. This would require you to fiddle with the provided xaml from phonegap. This would give you access to the MS Ad Control and Google's Ad control for .net. At the end of the day, PhoneGap is just a silverlight page, with a browser control in it. So you can still edit that page, but you have to make sure you don't screw up the PhoneGap libraries and page.
The other solution is to find an html based ad control. Although this might not be possible with your ad provider.

Related

How can Xamarin be used to wrap a web app as if it were a native app for Android?

Say I build a super mobile friendly web application that I want in the Play Store for Android users to be able to download.
Could I use Xamarin to:
Wrap the entire mobile app as a single WebView
Register for mobile push notifications
Essentially shortlining an MVP of an android app by using an existing web app? If so, is there any well-known process or documentation that demonstrates this?
Probably the best approach for you would be using Xamarin Forms with one or more pages containing only web views.
I don't love Xamarin Forms because usually for me Xamarin Android+iOS gives a better result in similar time, but your app would be so simple that doesn't make sense to do it with Xamarin Android.
Make sure that your web app will show only what makes sense to be shown in your app, otherwise you risk to see double header/footer, useless buttons... but if the website is yours adding a few parameters to change a bit the UI won't be a problem I guess.
Have a look at this example:
https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithWebview
Another approach is the use of Razor to build your pages in html directly inside your app, but if I understood well it's not what you need:
https://developer.xamarin.com/guides/cross-platform/advanced/razor_html_templates/
Although it is technically possible to do this as the previous answer has suggested. I would recommended firstly reviewing, the relevant stores guidelines on submissions. Apple for example will not allow a submission to their store of any application that simply mirrors the functionality of a website. I suspect Google's would likely be the same.
However that said, to answer your question, Xamarin.Forms would be appropriate for a simple application like the one you are suggesting. Or if you prefer to build to a specific OS, then in iOS with Xamarin you would use the Safari View Controller that was added in it's xcode 8.1 release. Android uses something similar as does windows.
EDIT:
You can use the Web View control in Xamarins Andorid native PCL project to encapsulate your mobile friendly website within an application here is the documentation:
Xamarin Android Developer link to Android Web View
As for push notifications, yes this is perfectly possible using Xamarin.Android. and varies on implementation depending on what you want to use as the back end to handle them, I.E. Azure's notification hub etc.

How to integrate cortana in Universal App?

I am trying to develop windows 10 app using existing website.
Here is I have followed link http://microsoftedge.github.io/WebAppsDocs/en-US/win10/CreateHWA.htm
I am able to view my website in Windows 10 app, but I don't know how can I integrate Cortana into my web page?
I have checked this link also WebApp: Cortana loads app, but how can I deep link into the web app with javascript?
but it didn't help me.
I found solution for this. Based on this link WebApp: Cortana loads app, but how can I deep link into the web app with javascript? I did write code in my application
The reason cortana was not working because I need to first run windows universal application manually, so it will download vcd file from home page of website.
After running application manually first time and second time I did try to give command to cortana to open my application, it works !!!

How to create a custom app entry inside the Application Settings with Windows Phone SDK

Do you know if the Windows Phone SDK offers an API that allows to add a custom App entry inside the Application Settings page?
I would like to create a new entry "AppXYZ" that links the settings page of the application.
Is this view reserved just for "system" applications or could also be used to add a link to an external app's settings?
Although not well-known, there is a way to do that. In WMAppManifest.xml you can specify that your app belongs in HubType="268435456". That way, it will be integrated there. This is not an officially-supported approach and I am yet to see a third-party app approved in the Store that would handle this.
You can link to the settings page of your own application but not to the windows phone settings page you show us in the screenshot. Developers are only allowed to show some of these by using the corresponding URL schmemes.
Unfortuantely there is no possibility to integrate your app to the official settings hub as a third party developer. Adding HubType="268435456" in your WMAppManifest.xml file will prevent a successful sumbission.
Sorry for the bad news...

AdControl in windows phone 7

We are planning to use AdControl in our windows phone app to show advertisement.
But we have some doubts,
Is the ads shown in Adcontrol is given by the microsoft ?.
We want to use a openx link to show ads. Is it possible to set openx link to the AdControl ?
Thnks.
If you use the AdControl that is part of the WP7 the ads are served to your app by Microsoft's Pubcenter. AdControl does not allow the client injecting additional ads into the AdControl.
If you want to vary how the ads are served, you will have to build your ad control. Have a look at AdRotator that supports a bunch or ad providers. WP7 also does not support arbitrary flash rendering, which OpenX appears to use.

facebook login with facebook c# sdk doesn't work on windows phone 7

I want to include the option to share some acutivies of my WP7 app on facebook. For this I have downloaded the Facebook C# SDK and I'm currently over the authentication phase.
I have followed the WP7 example but then I run the app the login button of the facebook page isn't working. Is this a bug in my code, in the facebook sdk or a facebook bug?
I have uploaded a test project to my SkyDrive account.
Thanks for the help.
Best regards,
Ralf
Change the WebBrowser definition (in XAML) to this:
<phone:WebBrowser Grid.Row="1"
Name="FacebookLoginBrowser"
Navigated="FacebookLoginBrowser_Navigated"
LoadCompleted="FacebookLoginBrowser_LoadCompleted"
IsScriptEnabled="True" />
The last item is the key. WP7's WebBrowser control defaults to having scripting off. Facebook login requires it.
(Please mark me as the answer if it solves your problem.. it worked for me)
You may have run into a Visual Studio bug (or your folders were not packaged up properly and I am the only one seeing this ;). Try this:
Launch notepad, and edit `FacebookTest\FacebookTest.csproj' (as a text file)
Halfway down in the file, the is an <ItemGroup> containing <Reference ...> tags
Add a reference <Reference Include="mscorlib" />
Save, (re)start Visual Studio
At this point, I was able to build your code, but deploying and running may require additional steps.
This is the exact behavior I saw when I trying to authenticate with the C# Facebook SDK in Windows Phone 7. When you load Facebook's auth page into a BrowserControl a page loads with a button, but tapping on the button does nothing - the page with the token in the never loads (in contrast with my nearly identical WPF project).

Resources