Reputation: 169
I am new to windows phone app development. Is it possible to open windows phone app via browser url. If possible, please someone help me.
How to implement my very own URI scheme on Android
please visit the above url;
but its possible in the android
<activity
android:name="TabHost"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="myschema" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
below code is working in windows 8 desktop IE Browser
but its not working in the windows phone
<Applications>
<Application Id="SDKSample.App" Executable="$targetnametoken$.exe" EntryPoint="SDKSample.App">
<Extensions>
<Extension Category="windows.protocol">
<Protocol Name="alsdkcs" m2:DesiredView="useLess"/>
</Extension>
<Extension Category="windows.fileTypeAssociation">
<FileTypeAssociation Name=".alsdkcs" m2:DesiredView="useLess">
<SupportedFileTypes>
<FileType>.alsdkcs</FileType>
</SupportedFileTypes>
</FileTypeAssociation>
</Extension>
</Extensions>
<m3:VisualElements DisplayName="Launcher API C# sample" Description="AssociationLaunching C# sample" ForegroundText="light" BackgroundColor="#00b2f0" Square150x150Logo="Assets\squaretile-sdk.png" Square44x44Logo="Assets\smallTile-Phone-sdk.png">
<m3:DefaultTile ShortName="Launcher API C#" DefaultSize="square150x150Logo" Wide310x150Logo="Assets\tile-sdk.png" Square71x71Logo="Assets\mediumtile-sdk.png">
<m3:ShowNameOnTiles>
<m3:ShowOn Tile="square150x150Logo"/>
<m3:ShowOn Tile="wide310x150Logo"/>
</m3:ShowNameOnTiles>
</m3:DefaultTile>
<m3:SplashScreen Image="Assets\splash-Phone-sdk.png" BackgroundColor="#00b2f0"/>
<m3:ApplicationView MinWidth="width320"/>
</m3:VisualElements>
</Application>
Upvotes: 4
Views: 4206
Reputation: 3362
This documentation article works for Windows Phone 8.1 / Windows Phone 10 Mobile:
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh779670.aspx
If you're running into issues not being able to open the URI scheme you registered it's most likely because you're trying to open it using Internet Explorer / Edge. This will not work.
Instead send yourself an email containing the link or put it down into OneNote - just an external place, that actually links into the browser.
Otherwise IE / Edge will treat your scheme as http://myscheme/ instead of myscheme://.
Upvotes: 0
Reputation: 169
Hell... I got the answer. It's working if I call via javascript
<input id="btnwindowsphone" type="button" class="button" name="" value="open windows phone" onclick="javascript:loadwindowsphone();" /><br /><br />
function loadwindowsphone() {
window.location = 'alsdkcs://hd';
}
Upvotes: 3
Reputation: 7112
You can do the same for Windows phone - registering custom URI scheme that will open your app.
Here are some resources for you:
Upvotes: 2