Firefox OS:processes, memory - mobile

I am developing an application for the Firefox OS which is going to kill the applications which uses a lot of power of the mobile phone, I could find out the information about battery by using Battery API. So my question is
How to extract information about the processes which are running on the Firefox-OS?

Applications in Firefox OS are just iframes, so you can get the list of running processes by switching to the right window context and doing
var apps = document.getElementsByTagName('iframe');
apps.forEach(function(app) {
console.log(app.src); // Print out the app origin.
});
That being said, only apps with elevated privileges are allowed to execute code in the context you need. You can read more about certified apps here https://developer.mozilla.org/en-US/Marketplace/Publishing/Packaged_apps, but the short story is that certified apps are not distributed through the normal marketplace.
Hope that helps!

Related

Can I run a web app from usb with Bitlocker

As per the title, can I run a web application (AngularJS) from usb with Bitlocker.
I installed xampp portable, git portable and nodejs in usb. But I don't know my application can run normaly. I need distribute my application to many customer and secure my source code. Please let me know what I do is possible or not.
NOTE: my question is not duplicated with question Secure distribution of NODEJS application
Many Thanks

How do I view my site on multiple screen sizes?

Ok, so I know how to write code for multiple screen sizes. But, I have no idea how to view my code on a mobile device before making my site go live. Please help!
You can play around with emulators which can simulate a variety of cellular devices. These can be downloaded using a program called Bluestacks for example.
If you have Google Chrome you can open a website and press F12 (on windows) to enter Developer Mode.
On the top left you can see a little smartphone icon.
Click it and choose a device. Then refresh the page.
Chrome will emulate the experience of a smartphone user straight from your computer, sou you can test it from there.
This is a view of this question on the emulator:
Here is the solution if you are using safari.
Enable the "develop" menu bar using Safari > Preferences > Advanced. Your menu bar should look like this:
Go to your website
Go to Develop > User Agent and choose the device/browser you wish to emulate.
You have two options.
Use of Emulators.
What you need - is any modern browser. Nearly every modern browser will offer you roughly similar emulator capabilities where you can select a target device/resolution. #intboolstring & #Pither has already mentioned safari & chrome options for you. IE & Edge have similar features (which you can probably explore yourself or see this link IE Emulator feature).
Using actual devices.
What you need - 1) wireless router 2) your dev machine/laptop which has a web server (like IIS on windows) & 3) some mobile devices (I would assume you would have atleast one smartphone which has a mobile browser on it).
You will need to connect your dev machine/laotop & your device(s) to the wireless and setup firewall on your dev machine to allow access to your website on your local wireless network. Check out this answer.
Once this is done, you should be able to load your site on any device connected on your wireless by tying http://your.dev.machine.ipv4:port-if-applicable/landingpage.html in the mobile browser.
(to find your machine's ipv4 address, goto command prompt and type ipconfig and press enter - I am assuming you are using windows)
You may be limiting your testing to a much smaller set of devices (ones you have access to). But this will give you a real-world idea (if not a much better one) of how you site renders & behaves on devices.

Smartphone browser emulator

Im trying to test my website on different kind of devices, for example iphone, tablets or androids. The problem is i do not have access to all of those devices and every so called online emulator doesnt really emulate anything else besides resolution.
So say iphone related issue doesnt appear on my computer.
My question would be whats the best paid or free service that would provide me the tools needed to test my website on as many different devices as possible?
Just to name a few so far i tried:
http://mobiletest.me/
http://www.mobilephoneemulator.com/
http://www.brickandmobile.com/mobile-emulator/
None of them displayed same issues that im having on the actuall device.
For Android, you can install the SDK, which includes a device emulator that runs Android in (basically) a virtual machine. This virtualized copy of Android includes the browser, so you can use it for testing your site. You can create virtual Android devices with a variety of screen sizes, so you can test your design on both phones and tablets.
Note that if you want decent performance from the emulator, you should configure it to run an x86 system image (as opposed to ARM), and install the HAXM add-on (available through the SDK manager app) that enables the emulator to use your processor's virtualization support. This allows the emulator to run the Android system directly on your real processor, instead of having to emulate a processor. You should also enable the "use host GPU" option so that graphics in the emulated Android device can be hardware-accelerated instead of rendered in software.

How do you debug Share Picker extensions?

I have registered my Phone 7 app as a Share Picker Extension. It works—my app is in the list of Share options and it gets launched and I can load the chosen image. Okay, great.
But then things go wrong in my code. I would like to be able to debug the issues, but I can't seem to keep the debugger attached.
I cannot debug this in the simulator, since the Pictures app (and thus the Share Picker functionality) is not present in the simulator.
I cannot debug this on the phone because as soon as I pick my app from the Share list, the debugger detaches... right as my app is "launching" again.
Is it possible to attach the debugger to a running WP7 app? Is it possible to keep the debugger attached? Am I doing it wrong? Any suggestions, advice or guesses are welcome because I'm tearing my hair out.
When doing M+V hub integration (sorry, haven't done any pictures hub integration yet) I initially used a crude debug technique (Messagebox.Show, etc. - like Justin mentioned) to verify what was being passed to the NavigationEventArgs of OnNavigatedTo and wrapped the whole method in a try..catch block to learn what was going on. I then refactored the code when I knew what could be expected. (Remember OnNavigatedTo will be called when your app is launched normally too and so e won't be populated in the same way.)
When the app is launched from a/the hub it creates a new instance of the app and there is currently no way to connect to this for debugging while the main page is being navigated to.
Great question. I'm unsure if that's possible. As far as I know, there's no way to attach the debugger to when the WP7 O/S starts an app (which wasn't triggered by the debugger).
Photo Share picker extensibility, music+Video hub extensibility and other O/S extensibility points seem to not play nicely with the VS debugger. Normally I resort to MessageBox.Show to debug any problems with WP7 O/S integration.
1) Connect the Device
2) Turn off Zune
3) Start C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x86\WPConnect.exe
To properly debug your application that uses the Media Library, you'll need to use the Windows Phone Connect Tool (WPConnect.exe) as described on MSDN. Jaime has some additional tips on his blog.
Once you are connected, you should be able to debug your application. Fingers crossed anyway. If that doesn't help, I'll dig a bit further.
It's not so much about the WPConnect tool. The nature of your application means that you have to have it closed and the user should pick a photo. Only after that the data is returned to the application.
You should read about the application execution model on Windows Phone 7. Also a good explanation is available here.
Initially, I would say that you should look at tombstoning (a good explanation here) but then again, the image returned will re-start the app and won't allow you to directly attach the debugger.
Yeah, looks like this is impossible...
All the answers above seem to be missing the point: I presume you're able to debug your app in the "standalone" mode (when it's launched normally), but not when it's launched via the Share Picker Extension. Am I write? This is the wall I'm hitting... :-(
I thought the proper way would be to attach to the process once it's launched.
I tried to use Debug > Attach to Process, then select Smart Device as the Transport and Windows Phone Device as the Qualifier... But in return I get the ugly "Unable to connect to 'Windows Phone Device'. Not implemented" message.
Bummer :-(

Out of browser feature of Silverlight 3.0

Why and when somebody would take out the Silverlight application out of browser and run? As this is feature provided in Silverlight 3.
When the application is useful enough that you want to use it often and you don't want to depend on a browser or an internet connection, for example.
In Silverlight 4, out of browser applications will make even more sense since they can run with elevated permissions and do things such as accessing the local filesystem or running applications on the client machine: http://silverlight.net/getstarted/silverlight-4-beta/#whatsnew (search For Trusted applications)

Resources