Hello,
I'm trying to make an application that uses a webview to load a page containing a swf which should be populate with data loaded from a localfile.
The main idea, is that if I want to open that html from my computer directly, I should go to :
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
... and add the swf as a trusted file. If I copy the files inside tomcat, and start the tomcat, I can view thee swf with all data loaded
Now, in android I can't open that page to change the Global Security Settings, so I can't load the data. Do you have any idea how to do this? Or a workaround to this?
Ok, I see that no one has any idea.. But what about creating a tiny web server that returns that page? I think it should do the trick, but I can't find any tutorial about creating web servers in Android.. basically I need to open a port and return the html from @assets relative to what's after localhost : port. Do you know, or have a sample that I could use it as an example?
Related
Hi,
I need auto update functionality for my application. I.e., the new exe/dll shall be downloaded by GPRS and existing program files shall be replaced. Now I wonder, how this could be done in an easy way.
The problem is, that the application is continuously running and updates shall be done more or less "on the fly". Currently, the application is automatically started on boot through registry settings in HKLM/init
So my idea was the following: Creating a "starter programme" for the application: When the device (HTC ARTEMIS) is booted, the starter programme is first launched (through HKLM/init), looks into a pre-defined directory if there are any files. If there are, these files are copied into the directory of the application. Afterwards, the starter programme launches the main application. Do you think that could work? Or are there any better ways (maybe even supported by the OS) to perform SW-updates?
Günther
I have auto update functionality in my commercial application.
1) When data is replicated to server, main appliation also check availability of new version. If new version is available a and upgrade is mandatory, application launch new process - updater.exe.
2) Updater waiting to main application correct exit (saving data on dirty forms etc.)
3) After main application exit updater download new version descriptor (list of files with targer location, install scripts (dll with well known special interface which can be used for many special tasks - create shortcuts, delete file, modify registry, install new certificate). Updater downloads all files, process install scripts and then launch main application again. New install CAB file is usually stored to extended ROM (autoinstall after HARD Reset).
As a server component is used web service with some methods (GetDescriptor, DownloadFile).
ma_gu said:
Hi,
I need auto update functionality for my application. I.e., the new exe/dll shall be downloaded by GPRS and existing program files shall be replaced. Now I wonder, how this could be done in an easy way.
The problem is, that the application is continuously running and updates shall be done more or less "on the fly". Currently, the application is automatically started on boot through registry settings in HKLM/init
So my idea was the following: Creating a "starter programme" for the application: When the device (HTC ARTEMIS) is booted, the starter programme is first launched (through HKLM/init), looks into a pre-defined directory if there are any files. If there are, these files are copied into the directory of the application. Afterwards, the starter programme launches the main application. Do you think that could work? Or are there any better ways (maybe even supported by the OS) to perform SW-updates?
Günther
Click to expand...
Click to collapse
Seems to be a good idea. This way, you can update the application while it's running and changes become active when the device is rebooted or the application is exited and started again. It's just excellent.
My needings were more simple, so the update feature I designed works as following:
1. The program is divided into a launcher, an updater library and the true application.
2. When the program is started, the launcher copy the update library call such a copy (just call it updlibcpy).
3. updlibcpy uses http to check if an update is available. The check is performed by downloading an "update manifest" containing the MD5 hash of each file of the updated application and checking it against the MD5 hashes of the current program files.
4. If one or more files need to be updated, updlibcpy does the task. Since only updated files are downloaded, no bandwidth is wasted. The only file that cannot be updated is the launcher, but it is so simple that it should never need an update.
5. When updlibcpy has ended, the control is passed back to the launcher, which invokes the true application executable.
The main difficulty was handling the high packet loss that the HTC devices I used has shown. This caused frequent application hang-ups during start-up, unless the GPRS connection was terminated and started again. Once I solved this problem by giving a timeout to the update (using threads), all worked perfectly.
The only improvement I'm thinking about is some sort of "transactionality" of the update, so that if one file updates correctly while another doesn't, the succesfully updated files roll back to the not updated version.
Hi Guys,
i wrote a small C#-Application for updating SpbWeather (maybe it should work also with other Weather-Applications) despite Proxy-Restrictions (like Vodafone, o2 etc.). This program emulates a normal Wap-Browser (with an exact User-Agent) and downloads a Weather-html-File of your choice to your PDA. In combination with Pico-WebServer and some little tweaks , SpbWeather updates with this local file.
First of all, it is a beta program. Use this program at your own risk. I will take no responsibilities for malfunctions or/and unintentional data traffic (and costs). It should be working fine, but nobody is perfect.
--------------------------------------------------------------------------------------
Ok, here is the Step-by-Step guide what you have to do:
1. Install the lastest Microsoft Compact .Net-Framework on your PDA (http://www.microsoft.com/downloads/...FamilyID=9655156b-356b-4a2c-857c-e62f50ae9a55)
2. SpbWeather
You need a actual version of SpbWeather (it should be with working with other Weather-Programs too, e.g. HTC Weather or PocketWeather)
3. Download the SpbWeather-Template from Spb-Weather-Forum (or somethere else) you want to use. I attached a working template for www.wetter.com
4. Edit the Template-File and search the line "open_url(.......)" . Edit the value in the brackets to open_url("http://localhost/wetter.htm", "GET"); (the name of the .htm - file its your choice).
5. Copy the .tpl - File in the templates - Folder of SpbWeather and add a new City with this edited Template.
6. Install Pico Webserver on your PDA ( http://http://www.tucows.com/preview/200784)
7. Start Picowebserver, goto Settings and edit the Alias Settings. You can choose the default path of the webserver or you can choose another path. But remember this path, we'll need it. Now start the Server.
8. Ok, now you need the WeatherUpdater. Just copy it to a location of your choice and start it. Go to "Settings" and configure the Programm. There are five entrys you can edit.
a. WebServer:
Enter the complete url of the weather site and your town: (wich matched to the template you use for Spb Weather). In my case the Url is: http://www.wetter.com/mobile/wetter.php?id=43367&type=WORLD (enter wetter.com/mobile and you can search your town)
b. Local Web-Server
Enter the Path to the Root-Directory of your Picowebserver (see 6.)
c. Name html-File:
Enter the Name of the htm(l)-file to download...it must matched with the name you edited in the template-File (see 3.)
d. Update on Start:
Downloads the html-Weather-File on Programstart
e. Update-Interval:
Choose an interval for updating the Weather-html-File. You can chosse values between 1 and 1440 minutes. (1min - 24h). Remember, it produces data traffic you have to pay for (or you have a flatrate etc., that's your own risk)) In my example, one update produces 15kb of data traffic. Check various templates with less traffic (maybe less weather info).
With runnig Picowebserver and WeatherUpdater in the background, you can now Update SpbWeather every hour.
What do do next:
-----------------
a. It would be fantastic to integrate the webserver functionality into WeatherDownloader. But i've to check out how to make a Webserver in C#. Maybe someone can help me
Please report any bugs or wishes for further versions.
b. automatic installation with a cab-file and AutoStart functionality
c. HowTo for other Weather Programs like HTC Weather and PocketWeather
d. and many many more features
Pfischi
P.S: Sorry for my English
------
Screenshots in Progress
Nice release Pfischi, something I was looking for quite some ti...........well, forever
Hi,
I'm developing simple app that display images in WebView.
While coding i get problem with load data in WebView. When i try to load some data like:
Code:
String data = "<html><body><img src="http://xxxxxxxxxxx"/></body></html>"
WebView.loadData(data, "text/html", "utf-8");
the image can't be loaded because the link in src="" is redericting me to another page that contains not only image but full web page.
The example is: http://i1.kwejk.pl/site_media/obrazki/02491-77d715da62fe976.jpg
When i try to load this image it redirect me to that page: http://kwejk.pl/obrazek/02491
It's even working like that in Desktop Browser, Phone etc.
Is there any solution to disable redirecting to another page when loading image??
Please help.
I am required to use an application for hospital communication - it is a messaging app that takes the place of pagers. It is called Vocera -- it is available on the Playstore.
The problem that I'm having is that the app installs fine on both Sammy based and CM10 or AOSP ROMs but then you have to enter a server ip address and a registration key. The keys are one time use apparently so every time I try a new install our Sys Admin gets frustrated (they don;t care for rooted devices anyway).
On the CM10 or AOSP based ROMs the IP address for the server and Registration key seem to be accepted but don't "take" in that after they are entered and I press OK then the screen flashes and goes right back to the Registration page.
I have attached the log that was recorded during install of Vocera or VMP app and then the subsequent entry of the Registration.
Can anyone help with troubleshooting this app for use on AOSP based ROM's (or point me in the right direction)??
Also the other interesting thing is that if I do a Titanium Backup of the app then restore to a different ROM it doesn't maintain the Registration information -- I have to get a new key from the Sys Admin and re register the device. Does anyone know how to copy that registration information? Is there a hidden registry for Android OS's?
I have attached log and the files that are in the Titanium Backup folder for this app
[TRICK] How to download from Mega website**Especially for those who doesn't have Admin privileges**
Hi All,
If you have admin privileges you can manually change DNS Server number and access Mega. But unfortunately many may not have Admin rights to modify Network Settings. This guide/trick will provide you necessary tips to download from otherwise unavailable Mega site.
Usually, If you click on download link which is hosted on Mega (Many countries block it!) your browser will greet you with the message "The webpage unavailable" (See first image).
Let's solve this without editing network settings (DNS/VPN etc.).
Requirements:-
1. You need Chrome webbrowser for this. Install Chrome from here.
2. Now Open Chrome--> Goto Chrome Store--> Search for Unlimied Free VPN - Hola & Install this extention app. (Link Here)
Now the trick begins:-
1. Open Chrome and click on the download link. Still you will get the Page not available message. Now You will see some thing like this https://mega.co.nz/#!zBBESCxY!ulXdnKB9_2bvPyRr3aH7WNOP6orm_zkLgJow_1fKK8s in your address bar. (1st Image)
2. Select & Cut from back slash [ / ] after mega.co.nz to the end (like this example:- /#!zBBESCxY!ulXdnKB9_2bvPyRr3aH7WNOP6orm_zkLgJow_1fKK8s)
( Tip:- Use Ctrl+X). (2nd Image)
3. The address bar should have only this https://mega.co.nz (3rd Image)
4. Now Click on Hola extention and Select US or New Zealand or UK server.
(Note:- You may have to try selecting / changing servers few times, be patient, don't give up as it really works) See the Magic,
The mega site opens up.
5. Now paste the actual file address (which you cut in step no. 4) at the end of opened mega web page address and Press Enter. (4th Image)
6. Your download will be ready, now download the file. (See last/5th image)
Happy downloading.
Screen Shots:-
Or you could use Google DNS/VPN to bypass blocked sites
rishabh56 said:
Or you could use Google DNS/VPN to bypass blocked sites
Click to expand...
Click to collapse
We cannot change DNS manually if we are General user without admin rights.
Thanks brother it worked fine
use this tool for mega.com download
use this tool for downloading from mega.com
run it with admin rights, and then open the website
it works
Android plzz...
How to open mega in android
You have to use Mega App... Install it from Play Store.
Never use Hola. They don't have their own servers ! They exchange our internet for others ! Eg. If you are using a USA VPN, then your IP will used by someone else at the same time !