[Q] Map APIs not working for windows phone in HTML - Windows Phone 8 Q&A, Help & Troubleshooting

Ran into this strange issue recently. I'm more of a web programmer and I've only just ventured into developing apps. I've been trying to develop this mapping app on windows phone 8.1 using HTML and I came across a problem.
When I try to integrate Bing maps, I'm supposed to add the URL at virtualearth to my HTML page as a script.
Now, when I try to initialize my map using
if (Microsoft.Maps.ClientRegion) {
Microsoft.Maps.loadModule('Microsoft.Maps.Map', { callback: getMap });
} else {
getMap();
}
Visual Studio breaks the execution and tells me that 'Microsoft' is undefined. It doesn't make sense since this code works perfectly in a browser. I tried linking to another script file on my server and called a random function to display "hello world" and it worked. So, That clearly implies that the app has no problem referring to external scripts.
I gave up on Bing and tried to deploy Google maps in my app. Same thing except now it says, "google" is undefined.
I have no idea what's happening here. Any sort of help is appreciated! Fyi, I've also called init() once the document loads.
Thanks in advance!
Edit: To be clear, this isn't a web app running through a browser. There is an option for me to code in HTML in Visual Studio and it worked fine until this showed up. I've also partly developed a Windows 8 Desktop app using HTML and using Bing Maps to integrate mapping functionalities and it works great.
What I don't understand is how the code for the mobile app works great through a browser, works great on windows store apps, but doesn't work at all when coded directly through Visual Studio. I am pretty sure I've missed something. I hope someone can figure this out.

Just curious does it work in the WP8 1 emulator on you work station? I have a friend who has similar problems but his conclusions are that the emulator is just that and the phone APIs aren't exactly the same in the phone. He is working in C## but the behavior sound similar. BTW, what version of Visual Studio are you using? If it is an Express version like 2013, I would consider going back to 2010. Hope this helps.
Sent from my RM-893_nam_tmous_201 using XDA Windows Phone 7 App

One other issue that occur to me this morning. Did you register the maps at the Bing map site. Your code snippet does not show you using your unique app ID to call the map API. You must have a unique app ID assigned to you. It's not done by just registering your VS 2013 with your Microsoft account. Grady, XTC Media Group, LLC.
Sent from my RM-893_nam_tmous_201 using XDA Windows Phone 7 App
---------- Post added at 11:36 AM ---------- Previous post was at 11:28 AM ----------
BTW, I was wrong to recommend 2010. You must use 2013 with Service pack 2 applied. Also is your hyper-v configured and working properly? The Visual Studio Phone emulator runs in hyper-v. So you need Windows 8 or 8 1 with hyper-v to test with the emulator. You never answered my question about whether the app runs in the 8.1. Phone emulator
Sent from my RM-893_nam_tmous_201 using XDA Windows Phone 7 App

Related

Need video chat / conference testers

I recently published my ReelPortal video chat/conference software for Android 2.2 (using Adobe AIR 2.5) at the AppsLib market:
http://appslib.com/applications/app.html?ida=31520
I don't have a G Tablet, but would like to compile a list of devices that the app works on. So I'm looking for testers out there.
Please provide feedback if you try it. Thanks.
For more info on testing, please visit www.ReelPortal.com.
I just added another version reelportalX.apk (version 1.0.1). This version is working fine now. I suggest using it instead of the older one.
You must get Adobe AIR 2.5.1 from Android Market, or you can download the Adobe AIR SDK (http://www.adobe.com/products/air/sdk/), and get it in subdirectory runtimes\air\android\emulator, or runtimes\air\android\device. I found that Adobe doesn't allow posting the AIR apk on a website. Note: don't use the AIR link in post #6.
If you want to test chat with other folks around the world, please join the "xda" room (all lower case). Capacity is limited .
firewater2003:
Install Adobe Air 2.5.1 from here: http://download.pandaapp.com/?app=soft&controller=android&action=show&f_id=2291
Beware of TNT dashboard:
MoonPops: I kept getting the black screen while starting up ReelPortal in the TNT dashboard home, but it works fine in the Android Home Classic screen interface.
Firmwares that were confirmed to work:
Stock TNT 3588 (do NOT use TNT dashboard)
TnT 4.1.0
TNT lite 5.01
VEGAn-TAB-v1.0.0B5.1
can not find adobe air in market... running tnt 3.1.2
when I launch reelportal app, it get a blank screen
I did find adobe air 2.5 and installed it from another source.
I installed Adobe Air and your. apk and everything installed fine. Web cam and interface came up and seems to work fine. Only problem is, I don't have anyone to chat with, so I don't know how well that works......lol.
worked between my Droid 1 and my Gtablet.
insight3fl said:
when I launch reelportal app, it get a blank screen
I did find adobe air 2.5 and installed it from another source.
Click to expand...
Click to collapse
I found an APK for Air here:
http://forum.xda-developers.com/showthread.php?p=6571754
I was going to try between my Gtab and emulator.
Air installs ok on my emulator, but reelportal.apk says "application did not install" ...
Jim
insight3fl said:
when I launch reelportal app, it get a blank screen
I did find adobe air 2.5 and installed it from another source.
Click to expand...
Click to collapse
Same experience here. Stock 3389 with performance pack. Grabbed Air from another XDA post (2.5.15320). It just comes up to a blank screen.
Can those who got it to work link the apk they located?
reelportal said:
I recently published my ReelPortal video chat/conference software for Android 2.2 (using Adobe AIR 2.5) at the AppsLib market.
I don't have a G Tablet, but would like to compile a list of devices that the app works on. So I'm looking for testers out there.
Please provide feedback if you try it. Thanks.
Enclosed is the apk file. For more info on testing, please visit the ReelPortal website.
Click to expand...
Click to collapse
Hi,
I found this:
http://reelportal.blogspot.com/
Is this your website?
If I'm understanding how this works (when it works), these chats go through your chat server, and the way that we would do one-to-one video chats would basically to "join" a chat on your chat server?
Thanks,
Jim
Installed air and reelportal. Just a black screen for me too, running TnT lite 3.1.3
reelportal.com
Jim:
Yes, that's my "readme" page for my ReelPortal dot com site. Sorry I'm not allowed to post any links .
You are correct on the server. It routes the data from the clients to each other. However, the clients can also do peer-2-peer with each other (this is the default mode). When first started, the clients all connect to my server to sign on. The server checks for name conflict and room availability, and authorizes the session. If you are in a room, the server connects you to all the clients in the room automatically. Of course, you can call individual person if you know their name(nick). You can also disconnect from any client you want.
In p2p mode, all video/audio traffic goes directly from client to client(s). The server doesn't have to process it. If you select client/server mode, then the server receives your stream and distribute it to all subscribing clients. This lessen your uplink bandwidth if you have multiple subscribers.
The next version will allow you to specify your own server. And yes, you can run your own server on linux, windows, or macOS. And perhaps other platforms too, if you are inclined to do so. An older server version is currently available from my download page, but I will release the newer version in conjunction with the next client.
www.reelportal.com
kxs783kms said:
I installed Adobe Air and your. apk and everything installed fine. Web cam and interface came up and seems to work fine. Only problem is, I don't have anyone to chat with, so I don't know how well that works......lol.
Click to expand...
Click to collapse
To test, you can actually call yourself . Once connected, press button 7 (P2P), and select "Send to Server" mode. Then, press one of the "blue head" on the right, then press the ">" button on the dialog. A list will appear, and your nickname is the always the first one on the list. Click it, and you should see your own stream feeding back to you. Basically:
Your video ----> Server -----> Your device
Or if you have a computer, just run the web client on your computer, join the same room on both devices, or call the other's nick to establish connection. Hope that helps.
Link http://www.ReelPortal.com
insight3fl said:
when I launch reelportal app, it get a blank screen
I did find adobe air 2.5 and installed it from another source.
Click to expand...
Click to collapse
If it's a blank white screen, then perhaps it's not finding the server. Is your internet connection available or slow? Ideally, I should have some status indicator to be a bit more user friendly.
I also tried the adobe air file posted here, but reelportal apk only opens to a blank screen still. What are we doing wrong?
copc:
thanks for posting the link.
tcrews said:
worked between my Droid 1 and my Gtablet.
Click to expand...
Click to collapse
cool..thanks. how's the usability? can u hear/see ok on both ends?
insight3fl said:
I also tried the adobe air file posted here, but reelportal apk only opens to a blank screen still. What are we doing wrong?
Click to expand...
Click to collapse
can u retry...if the install was ok, then i suspect either the connection is slow, or my server is busy.
I ran a brief loopback test under low 4g in Philadelphia. Performance looked good but I was unable to select front camera on EVO. I will play with this some more but front camera access is a must.
Sent from my PC36100 using Tapatalk
Dante_l1 said:
I ran a brief loopback test under low 4g in Philadelphia. Performance looked good but I was unable to select front camera on EVO. I will play with this some more but front camera access is a must.
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
Thanks. Apparently, the front camera can't be access at this time . I googled this:
"AIR does not currently support the front camera.
In fact, the Android OS does not natively support the front camera. The device manufacturer provides a separate Java library that makes the camera available to Java apps."
I wonder if Android 2.3 supports multiple cams.
Also, is the front camera access problem the same for all tablet devices? Or is it device dependent?
To answer my own question: android 2.3 supports multiple cameras.
http://developer.android.com/sdk/android-2.3.html

i dev unlocked my ATIV S and have ?s

ok so I dev unlocked my ativ s and was able to side load some apps that needed full unlock to work I guess but surprisingly Tube 8 worked! are there any wp8 xaps out there I can sideload or what wp 7.x xaps are out there that I can sideload at the moment?
noelito said:
ok so I dev unlocked my ativ s and was able to side load some apps that needed full unlock to work I guess but surprisingly Tube 8 worked! are there any wp8 xaps out there I can sideload or what wp 7.x xaps are out there that I can sideload at the moment?
Click to expand...
Click to collapse
Normaly you can sideload any app you build using your own wp8 sdk tools as long as the app doesn't require interop services or other higher capabilities. Sideloading store apps won'tbe possible as they are encrypted.
Which capabilities does Tube 8 uses? I don't think that you were able to install an app using the cap interopservices.
I also have waze for wp7 installed, tube 8 is an adult video service viewer if you get my drift....
Sent from my SGH-T899M using XDA Windows Phone 7 App
Waze
ID_CAP_GAMERSERVICES
ID_CAP_IDENTITY_DEVICE
ID_CAP_IDENTITY_USER
ID_CAP_LOCATION
ID_CAP_MEDIALIB
ID_CAP_NETWORKING
ID_CAP_SENSORS
ID_CAP_WEBBROWSERCOMPONENT
Tube 8
ID_CAP_GAMERSERVICES
ID_CAP_IDENTITY_DEVICE
ID_CAP_IDENTITY_USER
ID_CAP_LOCATION
ID_CAP_MEDIALIB
ID_CAP_MICROPHONE
ID_CAP_NETWORKING
ID_CAP_PHONEDIALER
ID_CAP_PUSH_NOTIFICATION
ID_CAP_SENSORS
ID_CAP_WEBBROWSERCOMPONENT
noelito said:
I also have waze for wp7 installed, tube 8 is an adult video service viewer if you get my drift....
Sent from my SGH-T899M using XDA Windows Phone 7 App
Click to expand...
Click to collapse
titi66200 said:
Waze
ID_CAP_GAMERSERVICES
ID_CAP_IDENTITY_DEVICE
ID_CAP_IDENTITY_USER
ID_CAP_LOCATION
ID_CAP_MEDIALIB
ID_CAP_NETWORKING
ID_CAP_SENSORS
ID_CAP_WEBBROWSERCOMPONENT
Tube 8
ID_CAP_GAMERSERVICES
ID_CAP_IDENTITY_DEVICE
ID_CAP_IDENTITY_USER
ID_CAP_LOCATION
ID_CAP_MEDIALIB
ID_CAP_MICROPHONE
ID_CAP_NETWORKING
ID_CAP_PHONEDIALER
ID_CAP_PUSH_NOTIFICATION
ID_CAP_SENSORS
ID_CAP_WEBBROWSERCOMPONENT
Click to expand...
Click to collapse
@noelito I got your drift. But these two apps don't need any special capabilities to run. They can be run on each dev unlocked device. No full unlock required!
Ok so regarding marketplace apps, how can we de encrypt them so we can sideload? I have the I'll fated Microsoft YouTube xap and read somewhere to remove the wmappheadr XML something and tried that with another app and could not sideload any tips? I would like to be able to factory reset my phone and side load the app
Sent from my SGH-T899M using XDA Windows Phone 7 App
noelito said:
Ok so regarding marketplace apps, how can we de encrypt them so we can sideload? I have the I'll fated Microsoft YouTube xap and read somewhere to remove the wmappheadr XML something and tried that with another app and could not sideload any tips? I would like to be able to factory reset my phone and side load the app
Sent from my SGH-T899M using XDA Windows Phone 7 App
Click to expand...
Click to collapse
As of now, there isn't any way to decrypt XAPs. Since we are on the subject of XAP decryption, this gives way to the subject of piracy which isn't accepted .
Oh my that's not something I want to do
Sent from my SGH-T899M using XDA Windows Phone 7 App
XAP decryption *Is* also useful for reverse engineering the OEM app updates... if one of them introduces a vuln, we want to take advantage of it.
GoodDayToDie said:
XAP decryption *Is* also useful for reverse engineering the OEM app updates... if one of them introduces a vuln, we want to take advantage of it.
Click to expand...
Click to collapse
Oh I agree. I just wanted to make sure the conversation didn't float towards the way of piracy before the mod decided to shut it down.
As for deencrpyting XAP files - currently we don't know of a way to do it. Sideloading of WP7 XAPs for a long time worked after removing those headers but several months after WP7.5 (which introduced support for it) they switched over to truly encrypted XAPs and so far no one has been able to deencrypt those.
As for Interop-Services - this likely won't cause issues any more in WP8 because Native Code is now officially supported. They won't work though as other means are employed to not allow them to access functionality that is not supposed to be accessed. Most of those Apps worked through accessing certain vendor drivers/services which are likely to have changed in WP8.
@StevieBallz: ID_CAP_INTEROPSERVICES and native code have nothing particular to do with one another. Native code is a way to get out of the "API sandbox" that restricts what operations an app can request that the system do (for example, there's no official API for registry access). ID_CAP_INTEROPSERVICES is a way out of the permissions sandbox that restricts what the OS will actually allow the app to do. On WP7, there were low-privilege native-code apps that didn't use interop (DllImport project, for example) and there were high-privilege interop apps that didn't require the author to write any native code (just re-using what was already on the phone, my MultiTask Toggle app for example).
Frequently, the two were combined (WP7 Root Tools is the primary example, but every pre-Root-Tools registry editor app also qualifies). High permissions isn't very useful without native code, because the official APIs don't let you request many things which you would need high permissions to do. Native code isn't very useful without high permissions, because most of the things that you can do with low permissions can be done without native code at all. However, the two really have nothing to do with one another.
Now, on WP8, we have all the native code we could want (well, actually it takes some hacking to get out of the API sandbox again; the official third-party native code API is much more limited than the full Win32 API) but we run in an even more restrictive app sandbox. On WP7, low-privilege apps could at least read most of the registry; I doubt that's true anymore. On the other hand, ID_CAP_INTEROPSERVICES is alive and well; all the fancy, high-privilege OEM apps (like the network configuration ones, or the system diagnostic ones, or Samsung's call blocker, etc.) still use ID_CAP_INTEROPSERVICES. Looking around the Diagnosis app on the Samsung ATIV S, I've already found high-privilege provxml and file system access. Unfortunately, interop-lock is (of course) also alive and well; attempting to sideload an app that uses ID_CAP_INTEROPSERVICES still results in error 0x81030120, same as it did after Mango.
I just sideloaded the old teter hd game that was on the HTC touch hd from back in the day
Sent from my SGH-T899M using XDA Windows Phone 7 App

[Q] Facebook URL preview never works on win phone 8

For the life of me I cannot post a video on a friends wall on Facebook and get the URL preview.
I've tried lots of things like using the developer page to check if the meta data is there, yep its there. If I use my computer to make the post...yep the preview works. But something about windows phone 8...i have never gotten the preview to work. Are client side script languages disabled or something, why is this? Anyone have the same issue?
You're not alone, got the issue aswell. On my HTC 8S AND on my iPhone (strangely, since it worked before..)
Are you using an app or the web browser? If the browser, do you have it set to "desktop mode" in Settings (this is just a user-agent string switch, but it should give you the "real" Facebook page as you would see on a PC).

How to start custom app via http

Dear All,
I am a bit stuck. How can I start a custom receiver via http? I tried sending a GET to /apps/1234ABCD (with the code I get on the developer console) but I constantly get 404.
The same code works via ios/android/chrome sdk, but unfortunately I have to use this outside of the ios/android/chrome world...
I did not have success with Wiresharking the network traffic using the chrome sdk, the app id seems to be not trivially stored in the requests.
Any ideas?
Thank You!
The old V1 app ids like youtube, netflix, etc can be launched with a POST but that doesn't work for the new V2 app ids.
I would like to know how to launch the V2 apps as well (as I have my own). From Wireshark, it looks like it might be related to SSL traffic on port 8009 to the Chromecast, but I have not been able to figure out what to send it.
knoxbrder said:
The old V1 app ids like youtube, netflix, etc can be launched with a POST but that doesn't work for the new V2 app ids.
I would like to know how to launch the V2 apps as well (as I have my own). From Wireshark, it looks like it might be related to SSL traffic on port 8009 to the Chromecast, but I have not been able to figure out what to send it.
Click to expand...
Click to collapse
Thank You. At least I know that I am not alone with my problem!
If you find out anything, or have an idea, please don't hesitate to tell me.
It's sad that this is closed this way, can't figure out why.
The 'nodecastor' project on github (_not_ nodecast) seems interesting!
zsoltt said:
The 'nodecastor' project on github (_not_ nodecast) seems interesting!
Click to expand...
Click to collapse
Wow, that was a pain to get installed. But it was worth it. Now I can launch my app from the command line or my webserver without have to start it from an android app or a special chrome plugin. Thanks!
When I have a few hours I need to trace through it and see what it does that required so many other npm installs.

[Q] Windows Phone 8.1 Encrypt data

Hello, I need to encrypt a string with a public key (or certificate) obtained from a REST service. I have these in base64 format. The question is: how can I do on Windows Phone 8.1? There's no X509Certificate, X509Certificate2 or RsaCryptoServiceProvider available..
I'm using Visual Studio 2013 Update 2..
diego.stamigni said:
Hello, I need to encrypt a string with a public key (or certificate) obtained from a REST service. I have these in base64 format. The question is: how can I do on Windows Phone 8.1? There's no X509Certificate, X509Certificate2 or RsaCryptoServiceProvider available..
I'm using Visual Studio 2013 Update 2..
Click to expand...
Click to collapse
I think you are now using non-Silverlight apps in visual studio.
Try Silverlight application
ngame said:
I think you are now using non-Silverlight apps in visual studio.
Try Silverlight application
Click to expand...
Click to collapse
Yep but I'm developing a universal library. I'll probably try Bouncy Castle (PCL) in order to do what I need.
Universal libraries are extremely crippled. Many features are unavailable for universal libs, even things that can be done (in different ways) across all the different platforms you are targeting.
BouncyCastle is a decent option though, as long as you don't need native performance.

Categories

Resources