Is Worklight App based on Dojo toolkit 1.9 supported in Windows phone 8? - windows-phone-8

I am working on a worklight App using it's default 1.9 Dojo Toolkit. My App is working fine in Android emulator and in the web browser simulator. I tried to test the same app in Windows phone 8 Emulator but I am not able to see the whole Home page. I can see only Tabbar Button part used at the button while I am not able to see the list items used in the page. My Question is does Dojo Toolkit 1.9 supports Windows Phone 8?
I have visited dojo 1.9 release link and It says that in dojo 1.9, support for Windows Phone 8 has been included. If this is true, What could be the reason of failure for my app in Windows phone 8 emulator?
I also got below log when I created Windows phone 8 environment in my Worklight Project.
[2013-11-12 22:14:08] Environment 'Windows Phone 8' was created.
[2013-11-12 22:14:13] Starting build process: application 'KaiserTestApp', environment 'windowsphone8'
[2013-11-12 22:14:28] Windows Phone 8 app may not work well with Dojo toolkit included for this Application. Use a different Worklight Project, without Dojo toolkit, for Windows Phone 8 apps.
[2013-11-12 22:14:28] Application 'KaiserTestApp' with environment 'windowsphone8' build finished.

There is a WP8 VM bug that might hurt ListItem and might explain your issue. To check if that you are falling into this just monkey patch the _ItemBase _setSelectedAttr method this way and see if that fixes your issue:
_setSelectedAttr: function(/*Boolean*/selected){
// summary:
// Makes this widget in the selected or unselected state.
// description:
// Subclass should override.
// tags:
// private
if(selected){
var p = this.getParent();
if(p && p.selectOne){
// deselect the currently selected item
var arr = array.filter(p.getChildren(), function(w){
return w.selected;
});
array.forEach(arr, function(c){
this._prevSel = c;
c.set("selected", false);
}, this);
}
}
this.selected = selected;
//this._set("selected", selected);
}
If that is fixing your issue let us know and we will see how to release an updated version of Dojo that workarounds that WP8 WM bug.

Related

Create reminder in windows runtime

I am in the process of porting an app from windows phone 8 silverlight to windows phone 8.1 runtime.
Before I could create reminders like this:
Reminder reminder = new Reminder(name);
reminder.Title = titleTextBox.Text;
reminder.Content = contentTextBox.Text;
reminder.BeginTime = beginTime;
reminder.ExpirationTime = expirationTime;
reminder.RecurrenceType = recurrence;
reminder.NavigationUri = navigationUri;
// Register the reminder with the system.
ScheduledActionService.Add(reminder);
How would I do this in windows phone 8.1 runtime?
Thanks,
unfortunately there's no equivalent for Windows phone 8.1 runtime
Migrating your Windows Phone 8 app to a Windows Runtime XAML app
Now you must use toast notifications using the new Action Center feature
MSDN Reference
Action Center QuickStart

WP8 App localization does not working

I'm working on windows phone 8 application. I have a lot of multilanguage resources, but when I have tried to test my app on "ru-RU" localization - it loads in English only.
I have tried to set
Thread.CurrentThread.CurrentUICulture
= Thread.CurrentThread.CurrentCulture
= new CultureInfo("ru-RU");
manually, but when i check AppResources.ResourceLanguage it will return "en"
When I set CultureInfo("ru") - everything works fine
You have to set all supported locals in the csproj. Example: <SupportedCultures>de-DE;es-ES;</SupportedCultures>.
Localizing a Windows Phone app Step by Step

close windows phone 8 application inibm worklight?

WL.App.close() in ibm worklight is avaiable in wp 8?
I try to use this to quit my application when backbutton was pressed, but nothing've happened.
If this API is not avaiable to WP8, how can i make my app close when backbutton was pressed.
here's my code:
WL.App.overrideBackButton(backFunc);
function backFunc() {
if (isMapOn == true) {
loadInfo();
}
else {
WL.App.close();
}
}
It looks like the current version of Cordova does not support exiting the app on Windows phone. See: https://groups.google.com/forum/#!msg/phonegap/9v2kOwXj6sQ/O8SVpd-qjicJ
It may be supported in the future.

Windows Phone 8 Emulator returning Redmond location only

I am using the following code
Geolocator myGeolocator = new Geolocator
{
DesiredAccuracy = PositionAccuracy.High
};
Geoposition myGeoposition = await myGeolocator.GetGeopositionAsync();
Geocoordinate myGeocoordinate = myGeoposition.Coordinate;
while running the simulator each time i get the location as Redmond, is this a bug, if yes then how can we get rid out of it?
There is location sensor simulator available for Windows Phone emulator (both 7.5 and 8): How to test apps that use location data for Windows Phone.
It looks like that:
You can set current phone location to anything you want using that tool. IT also allows you to record paths and playing recorded paths.
To open it click Additional Tools button - the last one within emulator toolbar. It's hovered to yellow on photo below.

Detect Windows Phone 8 in browser

This link claims that Windows Phone 8 devices will get a unique user agent string that specifies both "Windows Phone 8" and "MSIE 10.0". However in my tests of two production WP8 devices (Nokia Lumia 920 and an HTC 8x) both continue to report IE 9 and Windows Phone OS 7.5.
Does anyone know what's going on?
Edit: A friend suggested that this might have to do with incorrect doc-types on the html page, but that doesn't make sense to me since I'm detecting this user agent in the OnActionExecuting event in an ASP.net MVC site (I haven't returned a doctype to the user at this point).
Edit 2: This website will be running inside a webbrowser control in a Xaml application, instead of natively in a browser, should that make any difference.
My code was executing inside a WP7 XAML application and the WebBrowser control. You have to upgrade your app to WP8 if you want to get the updated browser in your app.
I can not meet your problem.
my htc 8x's ua is :
Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC;Windows Phone 8X by HTC)
this website can detect your useragent.
http://whatsmyuseragent.com/
function isIEMobile() {
var regExp = new RegExp("IEMobile", "i");
return navigator.userAgent.match(regExp);
}