Related
To moderators,
Please, please, please ... reduce the size allowed to signatures
Some users have endless signatures, with many graphics, pictures ... it makes threads difficult to read
Ok, I use AdBlock Plus to remove many, but that´s an endless fight
Cheers
ChefChaudart said:
To moderators,
Please, please, please ... reduce the size allowed to signatures
Some users have endless signatures, with many graphics, pictures ... it makes threads difficult to read
Ok, I use AdBlock Plus to remove many, but that´s an endless fight
Cheers
Click to expand...
Click to collapse
Click the link in my sig please would you say those signatures there are too big , I will happily resize them if they are , their resolution is 600*200 and btw. Moderators will ask members with over sized sigs to resize them
ChefChaudart said:
To moderators,
Please, please, please ... reduce the size allowed to signatures
Some users have endless signatures, with many graphics, pictures ... it makes threads difficult to read
Ok, I use AdBlock Plus to remove many, but that´s an endless fight
Cheers
Click to expand...
Click to collapse
Size of the signature is already greatly restricted by the number of characters in it.
If someone puts care into their signature, the number of characters could be much greater, but take up less screen space. Just changing the color counts as characters.
The total vertical pixels of all images in signatures could could have a limit, which would prevent the signatures that are blatantly too large.
Often times using more characters can actually reduce the total screen space taken up by the signature.
For instance posting a raw URL takes up more screen space than embedding it as something like
using { and } in place of [ and ]
{URL=the raw URL}link{/URL}
By doing this, many links can all appear on one line.
Rather than modifying the site to automatically restrict this, I think enforcement would probably be better done by making a site policy to not have obscenely large signatures.
If someone does, and a complaint is made, the user would be warned and the signature would be editted or removed by a mod with a message to the user.
That would be similar to how an inappropriate post by a user would be handled.
The mods already do an excellent job at handling those issues.
MacaronyMax said:
Click the link in my sig please would you say those signatures there are too big , I will happily resize them if they are , their resolution is 600*200 and btw. Moderators will ask members with over sized sigs to resize them
Click to expand...
Click to collapse
Yeah, our policy is to not restrict the size of signatures, unless one of the mods finds it to be too big. At that point, we'll ask the user to trim it!
Well, I guess, another option would be a user option that allows to display or not members signatures
ChefChaudart said:
Well, I guess, another option would be a user option that allows to display or not members signatures
Click to expand...
Click to collapse
You mean this? (in your usercp)
Visible Post Elements
You have the option to show or hide various elements of messages, which may be of use to users on slow internet connections, or who want to remove extraneous clutter from posts.
Show Signatures
Show Avatars
Show Images (including attached images and images in code)
[/QUOTE]Built into vBulletin long ago
Click to expand...
Click to collapse
MordyT said:
You mean this? (in your usercp)
Built into vBulletin long ago
Click to expand...
Click to collapse
Oups
Yes What a (new) pleasure to read XDA !!!
annoying mod signatures!
Yes, these large signatures, especially by moderators with constant moving colors and images are annoying and distract from the content/purpose of each thread. It is possible to turn off signatures. Go to User CP>Edit Options>Thread display Options and you can turn them off. But in reality, mods should not be allowed to have such large annoying signatures advertising their wares.
JVH3 said:
Size of the signature is already greatly restricted by the number of characters in it.
If someone puts care into their signature, the number of characters could be much greater, but take up less screen space. Just changing the color counts as characters.
The total vertical pixels of all images in signatures could could have a limit, which would prevent the signatures that are blatantly too large.
Often times using more characters can actually reduce the total screen space taken up by the signature.
For instance posting a raw URL takes up more screen space than embedding it as something like
using { and } in place of [ and ]
{URL=the raw URL}link{/URL}
By doing this, many links can all appear on one line.
Rather than modifying the site to automatically restrict this, I think enforcement would probably be better done by making a site policy to not have obscenely large signatures.
If someone does, and a complaint is made, the user would be warned and the signature would be editted or removed by a mod with a message to the user.
That would be similar to how an inappropriate post by a user would be handled.
The mods already do an excellent job at handling those issues.
Click to expand...
Click to collapse
I agree with your points. Would you mind reducing the size of your signature?
me even too dont like big signaturs cause problems wid loading of page wen ur net sucks :-/
If you see someone with a ridiculously large signature image, report them using the "report post" button at the top right of one of their posts
Right now,
Bone Stock Sprint Rom + The Gingerbread EXT4 Kernel Spacemoose and I are working on for the tabs.
Now, its hit and miss, only way I can actually get this to boot is through a long process of flashing all sorts of other stuff using heimdall, long story short, its running, doing a weird bootloop, yet i am still connected and FS Mounted via ADB as I type.
So, link for the logcat, I let it run for +- 20 seconds, man it scrolled fast.
I just cant see the error, I cant, then again some aspects of the System are very new to me.
Help me with this so I can release this for the Sprint guys, and have a Kernel for all the CDMA Tabs before the VZW OTA comes out.
Jim
http://blackmugmedia.com/Android/GT/sprintGB-2.3.4-on-GB-Kern-Logcat-sys-bootloops
...
Probably best to put this in Q&A.
It looks as if dbus has problems. There are many log entries like this one on line 520:
Code:
W/libdbus (23874): Failed to start message bus: Failed to open "/etc/dbus.conf": No such file or directory
I'd check the permissions of dbus.conf or if it's there at all.
Lines 925 thru 984 don't look so good:
Code:
E/installd( 76): eof
E/installd( 76): failed to read size
I/installd( 76): closing connection
E/JavaBinder(23799): !!! FAILED BINDER TRANSACTION !!!
D/Launcher.Model(23799): cached all 41 apps in 226ms
I/ServiceManager( 65): service 'batteryinfo' died
I/ServiceManager( 65): service 'wifi' died
I/ServiceManager( 65): service 'connectivity' died
(...)
A similar pattern can be seen several times: starting at line 2076 thru 2145, at line 3241 thru 3318, 4538 thru 4620, 5863 thru 5947 and 7190 thru 7274. Each time it is preceded by a dbus error message. This might go away once dbus is fixed.
If that does not help, check line 291:
Code:
W/dalvikvm(23704): threadid=27: thread exiting with uncaught exception (group=0x40015578)
E/ (23704): Dumpstate > /data/log/dumpstate_sys_error
Dunno what thread 27 is doing. Maybe /data/log/dumpstate_sys_error has further info?
I'm gonna leave this here in development for now as its a proper question and not some "oh noez mai fone haz dun a boo boo" thread.
Let me know when this is resolved though guys so I can lock it to prevent n00bs digging it up 6 months down the line.
Cheers.
Sent From My Fingers To Your Face.....
conantroutman said:
I'm gonna leave this here in development for now as its a proper question and not some "oh noez mai fone haz dun a boo boo" thread.
Let me know when this is resolved though guys so I can lock it to prevent n00bs digging it up 6 months down the line.
Cheers.
Sent From My Fingers To Your Face.....
Click to expand...
Click to collapse
Yeah tbh this actually looks like the first real dev discussion in here for long time, Makes a refreshing change then all the n00b off-topic crap.
Anyway, gunna leave topic now and leave topic now and not clutter up.
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Our well-known bus type, do not change this -->
<type>system</type>
<!-- Only allow socket-credentials-based authentication -->
<auth>EXTERNAL</auth>
<!-- Only listen on a local socket. (abstract=/path/to/socket
means use abstract namespace, don't really create filesystem
file; only Linux supports this. Use path=/whatever on other
systems.) -->
<listen>unixath=/dev/socket/dbus</listen>
<!-- Allow everything, D-Bus socket is protected by unix filesystem
permissions -->
<policy context="default">
<allow send_interface="*"/>
<allow receive_interface="*"/>
<allow own="*"/>
<allow user="*"/>
<allow send_requested_reply="true"/>
<allow receive_requested_reply="true"/>
</policy>
</busconfig>
Sent from my SPH-P100 using XDA App
these are some cool skins for SAMSUNG GALAXY Y .
u can even ask them for your own customized skin by sending them a pic of your choice...
http://www.mystyle.co.in/SearchResult.aspx(manually search for galaxy y in search box)
HIT THE THANKS BUTTON IF I HELPED U!!
wha?
are you spamming? i just see a simple webshop with no skins whatsoever
You have to manually search for "galaxy y", then skins come up. They're quite nice.
Interesting..
Whats their price in euro ?
[email protected] said:
Interesting..
Whats their price in euro ?
Click to expand...
Click to collapse
When you click on "View details" it also displays you converted currency to dollars and.. pounds?. Here's 1:
http://www.mystyle.co.in/ProductDetails.aspx?pid=3045
4.1 $ 2.6 £
Anyways, use this to convert currencies: http://coinmill.com/EUR_INR.html#INR
[email protected] said:
Interesting..
Whats their price in euro ?
Click to expand...
Click to collapse
2.6 euro
from where to buy these??????
bhaiwala said:
from where to buy these??????
Click to expand...
Click to collapse
what do u mean from where to buy theseI HAVE POSTED A LINK IN OP GO THERE N SEARCH FOR THE PHONE U WANT THE SKIN FOR AND BUY THEM
Does not work, this is the error I get :
Server Error in '/' Application._________________________________________"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"*Description:**An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.*
*Exception Details:**System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
*Source Error:**
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
*Stack Trace:**
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.ThrowHelper.ThrowArgumentOutOfRangeException() +78
System.Collections.Generic.List`1.get_Item(Int32 index) +53
PoojaraTele.Web.ProductDetails.GetProductDetails() in D:\Mystyle Live - 10-5-2012 - COD\src\PoojaraTele.Web\ProductDetails.aspx.cs:325
PoojaraTele.Web.ProductDetails.Page_Load(Object sender, EventArgs e) in D:\Mystyle Live - 10-5-2012 - COD\src\PoojaraTele.Web\ProductDetails.aspx.cs:49
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
_________________________________________*Version Information:**Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET Version:2.0.50727.4971
Sent from my GT-S5360 using XDA
website link die????????
levanhau03 said:
website link die????????
Click to expand...
Click to collapse
No, it just doesn't change the address after you search, just type in s5360 into the search bar and you will get the skins.
Tried One!
I ordered one and they called me after a day and said the cant send me the skin in the part of country I live in.
Astrul said:
Does not work, this is the error I get :
Server Error in '/' Application._________________________________________"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"*Description:**An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.*
*Exception Details:**System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
*Source Error:**
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
*Stack Trace:**
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.ThrowHelper.ThrowArgumentOutOfRangeException() +78
System.Collections.Generic.List`1.get_Item(Int32 index) +53
PoojaraTele.Web.ProductDetails.GetProductDetails() in D:\Mystyle Live - 10-5-2012 - COD\src\PoojaraTele.Web\ProductDetails.aspx.cs:325
PoojaraTele.Web.ProductDetails.Page_Load(Object sender, EventArgs e) in D:\Mystyle Live - 10-5-2012 - COD\src\PoojaraTele.Web\ProductDetails.aspx.cs:49
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
_________________________________________*Version Information:**Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET Version:2.0.50727.4971
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
This is an error from .Net programming...
Skin in Brazil
where can I buy skin in Brazil?
sorry have no idea
thank you
great share, thank you
thanks dude.
Hi, I'm Trent and I co-created AppThwack, a service for on-demand automated testing of Android apps on real devices. Basically, you upload an apk and a couple minutes later you get screenshots and logcat dumps from actual phones and tablets we host.
Beta Users Needed
We're currently looking for devs to join our private beta. You can message me or sign up on our website and I'll get a beta code to you shortly. We're trying to stress the system and make additions/adjustments so the service is as useful as possible for developers.
Current Features
Real phones and tablets: About 20 high- and low-end devices and we add a few more every week.
Fast: See results in real time. Full test runs on all devices takes a minute or two to complete.
Selectable default tests: Install, launch, UI Monkey, Cleanup
Configurable tests: For example, specify the number of UI Monkey events and seed the randomizer
JUnit including Robotium support via uploaded test packages
Screenshots in portrait and landscape on all devices
Logcat and filterable logcat viewer
High-level results sortable by device or test
Full stack-traces for any exception that occurs
Future
We're working on adding more test frameworks like monkeyrunner and more default tests, particularly performance tests that measure battery consumption, CPU usage, etc. We're also adding more data visualization and charting so it's easy to see what some of the gathered statistics mean.
We plan to launch soon, but the beta program will remain in effect even after that. The service will follow a freemium model. Again, the beta is free and we're going to keep it in place even after we eventually launch.
Inter-device automation
Our back-end supports device-to-device automation, so if you have an app or scenario that you'd like to test that involves multiple devices or interaction with other devices, even non-Android devices, let me know. We're looking for people to help us develop how this service will be exposed.
Edit: I can't post links, but if you search for "appthwack" you'll find it. Btw, I've apparently lurked since October, 2008. Yikes.
Just wondering will this support of testing apps that require root?
Also any chance we can see like a live pic of the device when it installs the app and opens it?
Sent from my VS910 4G using xda premium
motodroidfreak said:
Just wondering will this support of testing apps that require root?
Click to expand...
Click to collapse
Right now it does not and all of our phones are as close to stock as possible. I'll look into making it an option so we automatically root before your app installs and then un-root after the tests are complete. Root opens up some new possibilities, both good and bad, so I'll need to think about it.
motodroidfreak said:
Also any chance we can see like a live pic of the device when it installs the app and opens it?
Click to expand...
Click to collapse
Yes! The launch test takes a screenshot in both landscape and portrait. You can see all screenshots sorted by device by clicking "By Device" or "By Test" and clicking the "Screenshots" link in the blue box at the top.
Screenshots also show up in each launch test log so you can see the context as the shot was captured. Logcat dumps show up in the same place (Link from the blue box at the top will open a filterable and highlighted log viewer).
Alright thanks I'll try it out tonight
Sent from my VS910 4G using xda premium
Holy cow. Didn't realize such web service existed.
I just signed up and currently having a look around. Is it possible for me to join the beta? Thanks!
Is it possible for a "free" upgrade for my account? Heh just asking
EDIT : Created a new project. Then I'm stuck. The "Runs" tab is empty.
EDIT again : Oh.. uploading had error previously. Uploading again.
Very interesting project. Good luck to your team and I hope I can be a good beta tester
Realy interesting, for us, almost of our apps needs root access, so please think about adding root to your service
Test on my Sensation
Will test on my sensation
test
nullFactory said:
Hi, I'm Trent and I co-created AppThwack, a service for on-demand automated testing of Android apps on real devices. Basically, you upload an apk and a couple minutes later you get screenshots and logcat dumps from actual phones and tablets we host.
Beta Users Needed
We're currently looking for devs to join our private beta. You can message me or sign up on our website and I'll get a beta code to you shortly. We're trying to stress the system and make additions/adjustments so the service is as useful as possible for developers.
Current Features
Real phones and tablets: About 20 high- and low-end devices and we add a few more every week.
Fast: See results in real time. Full test runs on all devices takes a minute or two to complete.
Selectable default tests: Install, launch, UI Monkey, Cleanup
Configurable tests: For example, specify the number of UI Monkey events and seed the randomizer
JUnit including Robotium support via uploaded test packages
Screenshots in portrait and landscape on all devices
Logcat and filterable logcat viewer
High-level results sortable by device or test
Full stack-traces for any exception that occurs
Future
We're working on adding more test frameworks like monkeyrunner and more default tests, particularly performance tests that measure battery consumption, CPU usage, etc. We're also adding more data visualization and charting so it's easy to see what some of the gathered statistics mean.
We plan to launch soon, but the beta program will remain in effect even after that. The service will follow a freemium model. Again, the beta is free and we're going to keep it in place even after we eventually launch.
Inter-device automation
Our back-end supports device-to-device automation, so if you have an app or scenario that you'd like to test that involves multiple devices or interaction with other devices, even non-Android devices, let me know. We're looking for people to help us develop how this service will be exposed.
Edit: I can't post links, but if you search for "appthwack" you'll find it. Btw, I've apparently lurked since October, 2008. Yikes.
Click to expand...
Click to collapse
I would like to test the tool, can you share with me..
Tested
Tested the tool, seems too good..
Suggestion : In-case if you want to reach maximum number of developer. Allow developer to use has free.
IDEA : You can request developer to post about you're tool on there app page, website & play store... As you're giving the tool as free you will get enough number of people to view & use the tool.. if the developer agree then you will allow him to use the tool for free of cost..
As a developer am ready to use the tool & post about you in my app & other places too...
This is a great tool, just uploaded an apk of my app that's in my signature and it worked, with a couple of NullPointers from the Play Store's licence service. That shouldn't happen, and doesn't on any of my devices, so I suspect it's an issue on your end. Any idea why?
HTML:
java.lang.NullPointerException at com.google.android.vending.licensing.LicenseValidator.verify(LicenseValidator.java:99) at com.google.android.vending.licensing.LicenseChecker$ResultListener$2.run(LicenseChecker.java:228) at android.os.Handler.handleCallback(Handler.java:605) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.os.HandlerThread.run(HandlerThread.java:60)
HTML:
FATAL EXCEPTION: background thread java.lang.NullPointerException at com.google.android.vending.licensing.LicenseValidator.verify(LicenseValidator.java:99) at com.google.android.vending.licensing.LicenseChecker$ResultListener$2.run(LicenseChecker.java:228) at android.os.Handler.handleCallback(Handler.java:608) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:156) at android.os.HandlerThread.run(HandlerThread.java:60)
Borland
We are using Silk Mobile for end to end applications testing. Do you ever used this tool?
What an interesting service! I'll look into this from work tomorrow.
Not having used this at all, the first things which do spring to mind are:
-streaming realtime logcat
-a (skype?) connection with live streaming video of the app running, so you can see layouts/animations etc.
Anyway, I'm going to check this out tomorrow!
Quinny899 said:
This is a great tool, just uploaded an apk of my app that's in my signature and it worked, with a couple of NullPointers from the Play Store's licence service. That shouldn't happen, and doesn't on any of my devices, so I suspect it's an issue on your end. Any idea why?
Click to expand...
Click to collapse
Thanks for checking out the service. My immediate guess it that this is caused by the absence of a default Play account. Many devices have no account as one of our supported frameworks, calabash, removes accounts upon cleanup after script completion. On the plus-side, if you were to write scripts you should be able to add a temporary account from the test itself.
Highly unlikely you'd hit this bug in a real world situation, but it is a bug nonetheless.
Really awesome service! Can't test it for the moment as it doesn't support root apps, but this is really a great concept :good:
Maybe you could build a superuser permissions manager which would grant root access but makes sure to keep /system mounted as read-only, this way no harm could be done to the devices and us root apps devs could use your awesome service.
I actually got quite a few ideas, you could delete the mount binary in /system/xbin and use it in an internal appthwack app's private data, so that it's the only app able to call this binary and thus to mount /system.
I'd definitely subscribe to AppThwack if it had root support.
If you want help with developing this kind of secure root environment for the testing, I'd gladly contribute.
EDIT : Strangely enough, I just tested it with my app (which asks for root in the launcher activity, so I really didn't expect it to work) and had 0 failures, 75 pass.
How comes ? Have you already added root support ?^^
Either way this is really cool, I'm going to spread the words and most likely subscribe a paid account :good:
Is there somewhere we can see pictures of your device lab? Gotta be one hell of a device museum you got over there^^
Androguide.fr said:
Really awesome service! Can't test it for the moment as it doesn't support root apps, but this is really a great concept :good:
Click to expand...
Click to collapse
Awesome, thanks for the kind words!
EDIT : Strangely enough, I just tested it with my app (which asks for root in the launcher activity, so I really didn't expect it to work) and had 0 failures, 75 pass.
How comes ? Have you already added root support ?^^
Click to expand...
Click to collapse
This is pretty interesting. The only two rooted devices are a couple running CM. I'll look into this further, and if you have any ideas I'd love to hear them as well.
Either way this is really cool, I'm going to spread the words and most likely subscribe a paid account :good:
Is there somewhere we can see pictures of your device lab? Gotta be one hell of a device museum you got over there^^
Click to expand...
Click to collapse
Sweet, I really appreciate it. As soon as I have the number of posts to do so I'll post a pic of the lab.
Some things can not be automated, like scanning a QR code or reading/writing to an NFC tag. Do you plan on adding "manual tests" for a fee?
This would be really great to test apps on specific hardware.
worldtiki said:
Some things can not be automated, like scanning a QR code or reading/writing to an NFC tag. Do you plan on adding "manual tests" for a fee?
This would be really great to test apps on specific hardware.
Click to expand...
Click to collapse
Thanks for the question! Our primary focus is on automation. There are existing test houses and services that will execute manual tests like those you describe, but of course because of the manual component they're slow and expensive.
We often push folks to break their testing down into more granular chunks. For instance, verify you can take a picture and deal with the image, even if it's not the QR code or whatever your app usually consumes. This will find problems with simply using the camera and resulting image location. Now, have a separate test that processes a photo of a QR code, but feed the image in as part of the test. This removes the camera component from the analysis part, meaning it's now possible to benchmark the image analysis algorithm on all devices.
With a combination of a service like ours where you test very, very quickly on tons of devices, you can now do some more UX/end-to-end tests on a handful of devices yourself. This hybrid approach is great for finding the vast majority of issues before release.
nice post
Realy interesting, for us
Awesome tool !
No Developer can test his/her app on many devices. But your tool ... A W E S O M E ! ... I Used it yesterday to test two of my new apps ... Found some error is my app on certain devices which i'd have never found without AppThwack .. :good: :good:
I have a PhoneGap application designed to work on multiple mobile platforms. I'm loading a dynamic HTML content from an external page on the Internet using jQuery Mobile. The problematic system is Windows Phone 7.
This is what I get from the external page, with the URL of the script tag already replaced to load from the phone instead of from the net to save bandwidth:
HTML:
<script type="text/javascript" charset="utf-8" src="x-wmapp1:/app/www/test.js"></script>
This works fine on Android, iPhone and even BlackBerry when I replaced the x-wmapp1: part by a respective counterpart (e.g. file:///android_asset/www/ on Android). However, on Windows Phone 7 it doesn't seem to work at all.
When I try to load the same URL via $.getScript function, it always returns a 404 eror, even if I try and load it with a relative path only.
Any suggestions?
First of all, this type of question may be better suited to the Software Development or Apps and Games sub-forums, as a lot of the people who hang out here are more familiar with homebrew hacks. I'll give it a shot, though.
First of all, what kind of path are you trying to use? I haven't tried loading scripts or images in HTML or JS, but to dynamically load content within the app itself typically requires some care with regard to the path. For example, is the JS file being built into the assembly (as a resource) or included alongside it (as content)? How about the HTML page?
This is a kind of lame approach, but one option that's sure to work is just inlining the scripts in the page, directly. That won't increase the total app size or load time at all, although it might make maintaining the app take a little bit more effort.
Thanks for the reply, I will try to post this into the more appropriate forum.
With regards to paths - you can see the path in the HTML snippet I provided in the original question. It's all a bit specific and we cannot afford to load JS directly from page, since that does increase the size of the resulting HTML, sent from an external PHP page, thus increasing bandwidth. This is the first reason why we chose to have all JS and CSS files directly bundled with the application and load them internally rather than from Internet.
Also, all of JS files are included alongside the application as content. I'm using the same approach for all images, since if they were included as a resource, they would not show in the application.
GoodDayToDie said:
First of all, this type of question may be better suited to the Software Development or Apps and Games sub-forums, as a lot of the people who hang out here are more familiar with homebrew hacks. I'll give it a shot, though.
First of all, what kind of path are you trying to use? I haven't tried loading scripts or images in HTML or JS, but to dynamically load content within the app itself typically requires some care with regard to the path. For example, is the JS file being built into the assembly (as a resource) or included alongside it (as content)? How about the HTML page?
This is a kind of lame approach, but one option that's sure to work is just inlining the scripts in the page, directly. That won't increase the total app size or load time at all, although it might make maintaining the app take a little bit more effort.
Click to expand...
Click to collapse
First question: have you set the IsScriptEnabled proerty on the control to True? It defaults to False, preventing scripting within the control. Also, changing it only takes effect
on navigation, so if you already loaded the page and then set this property, it still won't work.
Anyhow, I missed that your HTML was coming externally, and only the scripts and stylesheets were local. That's... interesting, and seems reasonable enough, and I can't find any info online that exactly matches your use case. The way you're structuring the script src URI looks weird to me, but I haven't messed with the WebBrowserControl very much at all.
One solution, though a bit hacky:
Use the WebBrowserControl's InvokeScript function to dynamically load scripts into your pages. To do this, you would first need to load the script file content into a .NET String object. The GetResourceStream function is probably your best friend here, combined with ReadToEnd(). Then, just invoke the eval() JS function, which should be built-in, and pass it the JS file content. That will load the JS into the web page, creating objects (including functions) and executing instructions as the files are eval()ed.
Of course, you'd need to do this on every page navigation, but you can actually automate it such that the page itself requests that the app load those scripts. In your app, bind the script-loading function to the ScriptNotify event handler, probably with some parameter such as the name of the script to load. Then, on each page served from your server to the app, instead of including standard <script src=...> tags, use <script>window.external.notify('load localscript1.js')</script> and so on; this will trigger the app's ScriptNotify function for you.
I hope that helps. I can see your use case, but somewhat surprisingly, I couldn't find anybody else online who had either run into your problem or written a tutorial on doing it your way.
Thank you for your reply, it was very informative. One question though - why do you think the way I'm structuring the SCRIPT URI is wierd? I tried to mess around with relative URIs and the such, however those would load the JavaScript file from Internet rather than from the application itself.
The problem I'm running into with your proposed solutions, however is that:
1. the project is a PhoneGap/Cordova application, using its own components, so I have no idea where I would look for IsScriptEnabled here (although this all worked on an older PhoneGap release, so I'm guessing they have it set up correctly)
2. injecting a script programmatically on each navigation would require me to rewrite much of the code we already use for other platforms, not to mention those custom Cordova components, which I don't even know if they can handle such thing
As for my user case - I was surprised to be the only guy on the internet with this methodology in place as well. So it either works for everyone else or nobody really thought of doing it my way, since it's basically an Internet application (maybe the don't want to disclose their sources, who knows).
CyberGhost636 said:
1. the project is a PhoneGap/Cordova application, using its own components, so I have no idea where I would look for IsScriptEnabled here (although this all worked on an older PhoneGap release, so I'm guessing they have it set up correctly)
Click to expand...
Click to collapse
In the WebBrowser properties.
CyberGhost636 said:
As for my user case - I was surprised to be the only guy on the internet with this methodology in place as well.
Click to expand...
Click to collapse
Of course you not "the only guy". I've tried to port/run a few HTML java-script based games on WP7 (Digger and couple more) more then year ago; they runs well with one HUGE exception - touch screen events are freezing scripts execution and make games not playable.
The "x-wmapp1:" URI scheme was what I was referring to. Not sure where that comes from, but I haven't done anything really with the WebBrowser control.
I have no knowledge of PhoneGap or Cordova; I assume they're "we write your app for you" frameworks? One would assume that such tools would know to set IsScriptEnabled, but you may have to do so manually. A bit of web searching on that direction may be fruitful - maybe earlier versions enabled scripting by default, and now it's disabled by default so you have to specify an option somewhere?
Injecting the script on navigation really doesn't require any major change to the server-side code. I mean, is sending
<script>window.external.notify('load localscript1.js')</script>
really much different from sending
<script type="text/javascript" charset="utf-8" src="x-wmapp1:/app/www/test.js"></script>
? If that's too different, you could instead send
<script src="http://yourserver.com/LoadLocalScripts.js"></script>
and put "LoadLocalScripts.js" on your server with the following code:
window.external.notify('load localscript1.js');
This has only a trivial increase in server traffic and load time, but lets you continue using external scripts instead of inline ones. Very little server-side change needed at all.
Now, the additional client-side code to support the window.external.notify and call InvokeScript... normally I'd say that's dead easy, because it is if you have any experience with the .NET framework, but in your case I get the feeling that this isn't so? I code to the framework, or to the underlying native code, and I tend to code "raw" (very little auto-generated code), so I'm not going to be able to help you solve the problems with a "make me an app" wizard unless I can see the code it generates for you.
For what it's worth, here's the approximate raw code that I'd use (it's over-simplified, but close enough):
void HandleNotify (String param) {
String[] parts = param.split(" ");
if (parts[0] == "load") LoadScript(parts[1]);
}
void LoadScript (String script) {
String content = Application.GetResourceStream(new Uri(script, UriType.Absolute)).ReadToEnd();
theBrowserControl.InvokeScript("eval", content);
}
void theBrowserControl_Loaded (...event handler args here...) {
theBrowserControl.IsScriptEnabled = true;
theBrowserControl.ScriptNotify += HandleNotify;
theBrowserControl.Navigate("http://yoursite.com");
}
the URI comes from Windows Phone itself, with this code, you can see for yourself:
var a = document.createElement('a');
a.setAttribute('href', '.');
alert(a.href);
also, I've been informed that this works in Cordova 2.0, so it might be a 1.8.1 bug... will try and see how it goes
thanks for your help so far!
Looks like it was a problem with PhoneGap 1.8.1 - after upgading to Cordova 2.0 (PhoneGap got renamed) it all works now... thanks for all the help!