Blackberry download failure [closed] - blackberry

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm developing for Blackberry OS 5.
When I tried to use Browser to download a file from the internet through my app, the loading takes too long and failed. Anyone know why?
int clearConfirm = Dialog.ask(Dialog.D_YES_NO,
"Do you want to download?",
Dialog.NO);
if (clearConfirm == Dialog.YES) {
try {
Browser.getDefaultSession().displayPage("http://mysite/blackberry/file.cod");
} catch (Exception e) {
e.printStackTrace();
}
}
this is my code ... what's wrong?

Deployment/Installation steps in device (Simulating the blackberry Appworld environment):
Create a blackberry folder in your server and paste the xxx.cod and xxx.jad in server. extract the .cod file using zip extractor. (To do this, first rename the .cod to .zip, and then extract at the same folder).
Make sure your server is accessible from the mobile.
Note: If the server is deployed in a private IP (LAN) then, Wi-Fi connection is required in mobile to access the server. If it is deployed over a public IP, then we can access using any of the network Wi-Fi, 2G or 2G or other network operators APN settings connections.
In your above code change the url to
Browser.getDefaultSession().displayPage("http://mysite/blackberry/file.jad");
Browser will download and install the jad file and then internally all other files. Restart the device, if required.
This works for me. It should work for you too.
Edit-1
The above issue may be due to size of the cod file. But my solution will be best fit for it.

Related

How to set wifi to Android Things without an ethernet cable or adb [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I'm interested in knowing how to set the first wifi on android things (not android phone) without access to a network cable, for a fresh install.
There certainly must be a way to put the information in the SD card right after copying the OS image. If that can't be done directly, worst case scenario I would expect it should be possible to write a script and copy it somewhere into some of the partitions and have it automatically run at boot (which can be handy for other things). Unless the image is signed?
I would also be ok by writing an app that could be copied to SD card before first boot that would be auto-installed and do that thing for me. I would know how to write the app, but so far I don't know how to do the copy/autoinstall/autorun thing.
I would also be ok having one device connect to network and configure wifi, then clone its SD card into another one.
What really gets in my way is having to get a network cable every time I prepare a new SD card.
You should be able to add your wifi configuration at the end of /data/misc/wifi/wpa_supplicant.conf.
network={
ssid="SSID"
key_mgmt=WPA-PSK
psk="PASSPHRASE"
}
This should be located on the data (ext4) partition of the sdcard (for me /dev/sdb15)
You can use:
adb connect Android.local
to connect to Android Things PC (Raspberry PI3) and then just set up your WiFi like described in Android Things tutorial:
$ adb shell am startservice \
-n com.google.wifisetup/.WifiSetupService \
-a WifiSetupService.Connect \
-e ssid <Network_SSID> \
-e passphrase <Network_Passcode>
https://developer.android.com/things/hardware/raspberrypi.html

UDP packets sent from Rails on Heroku to HostedGraphite aren't accepted [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I have a Rails app on Heroku with code to send a UDP packet (on certain user actions) to HostedGraphite (I'm just trying out the free version).
I have pointed the "socket.send" call at my own UDP server hosted elsewhere, so I know that the UDP packets are being sent from Heroku.
I know that the API key from HostedGraphite is correct (checked this countless times).
I have also modified the format of the data being sent - including and excluding the "\n" at the end of the line (the docs specify to include the "\n").
I've also tried to send the packets from my development environment.
And then finally I've tried this:
echo "YOUR-API-KEY.test 1" | nc carbon.hostedgraphite.com 2003
My ruby code to send the packet is:
sock.send(data, 0, 'carbon.hostedgraphite.com', 2003)
Clearly from the docs Ruby's UDPSocket can handle a hostname instead of an IP address, so that surely is not an issue.
Ok it's possible that none of the UDP packets actually arrive...seems highly unlikely though.
Other than that I'm at a dead end and I don't know what else to try. Has anyone else used this service successfully (especially with a Rails app hosted on Heroku)? I'm starting to suspect that maybe I need to pay them money...
Next I'm going to rewrite it to POST to HostedGraphite (but I'm still putting up this question because it's UDP specific).
I also tried POSTing with a curl request (can't add any more links so you'll have to find the doc for that yourselves), and again, nothing appears on the HostedGraphite side of things (where you can do a search for your metrics).
We (Hosted Graphite) just fixed an issue affecting authentication for new users created in the last couple of days, and I think you were caught by this.
Sorry you had a poor first experience. We're adding alerting for that condition so it won't happen again.
I'm not sure how OK it is to provide commercial support in a forum like this, but we're pretty responsive to support requests over email and twitter, so give that a shot next time. :)

CITRIX and disabled "Copy/Paste" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I must use several Citrix desktops, where "COPY/PASTE" from the local machine to the server is disabled. Are there workarounds or tricks to bypass this limitation?
I've encountered the same problem and have a partial somewhat contrived solution. It allows me to get a little more than 1kb of text from sandboxed Internet Explorer instance.
I use http://goqr.me/ to create a QR-code from the text. Create it in greatest possible resolution and open it. Take a screenshot of the window on the clipboard by pressing Alt-PrtScr. Then I use a small utility (see https://github.com/thoraage/qrscanner) to extract text from the picture on the clipboard.
It is a sick world!
The earlier suggestions and "work-arounds" were useful, but in 2020, there is a better way :)
Microsoft developed a "Relay Service" called Azure Relay. This same service is what's used behind the scenes to power what Microsoft refers to as "Live Code Sharing".
This service runs as an extension with several products, but for developers, this would likely be their IDE and code editor: Visual Studio and VS Code.
The extension is Live Share and it works flawlessly (at least on my machine 😉)
Like other suggestions, this isn't going to let you copy/paste from one machine to another, but in a way, it allows for much more. Instead, this alternative will let you host a project/workspace/notes...etc on your local machine, start a live-share session, then join that live share session from the remote.
Whether you work from the local or the remote, the changes persist and are shared on each machine.
Thanks the other commenters for their suggestions. I may not have thought of this as an option without the prior suggestions to spark this idea.
Best solution for this, I used just open one note app in local machine.
Open citrix and Restore (resize the window []).
Snip the entire text as image and paste it in one note.
Right click on the image and copy the text.
Paste it in TXT doc you got that.
I just open two gmails and sent the info through chat.
Example:
Local computer open GMAIL 1
Remote Citrix Computer open GMAIL 2
Copy from local computer and paste into google hangout with Gmail 2
Send
Done! it will be ready to be copy on Gmail 2 in remote citrix computer!
Cheers
I was running on a similar situation but in my case I was trying to copy files from remote (Windows) to local.
To solve that issue I killed the rdpclip.exe on remote and started it again.
You would need to defined it in the Citrix policy to only restricted or not restrict based on certain conditions.
The answer would also depend on the direction you are coming from? As a user trying to circumvent the system, or a tech trying to have a select group of users approved to do so.
I'm not aware of any tricks, to circumvent.
jezr
If it is just about a picture/ screenshot I suggest the following workaround:
1. open the picture/ file in citrix
2. change to your local machine, open Snipping Tool (Windows)
3. make a screenshot of the citrix content
Solution for this problem:
Open IE explorer and open internet options and open security tab then open trusted sites add your Citrix website which you want to access.
Restore advanced settings in in advanced tab.
Clear your temporary files.
Download Citrix receiver then check for copy paste

Windows Service can't access network share [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have a windows service running on my local machine. It's configured to run under NT AUTHORITY\NETWORK SERVICE. The program access a network shared drive on a computer in the same subnet. That shared directory has Everyone set to Full control.
I'm getting False on File.Exists, but the file exists. I'm certain this is a permission issue. Am I forgetting anything? Note, the computer with the shared drive is not on a domain.
Solution was found here:
https://serverfault.com/questions/177139/windows-service-cant-access-network-share
The fact that the machine with the shared drive is not on a domain is where your main problem is. In order to get this to work you will have to configure the Windows Service to run as a specific user, and then you'll have to create an identical user on the remote system with the same password. It might work then.
The problem stems from the fact that in order to log in to a machine not in a domain, you have to log into that machine using an account that exists on that machine. The machine account for something else definitely won't exist on that local machine. By creating an identical user with an identical password, you might be able get the login to work."
-sysadmin1138
I created identical accounts on both machines and the service account was able to access the shared drive. Having the servers on the same domain is a better solution, so I'm working towards that, but this will work in the mean time.
Brian T was correct. But I would like to add something. We had this problem even though the service was running on the same DOMAIN\User. Our service was trying to write a file to a shared folder/drive and it was configured in the config.xml like so:
I:/path/to/the/file/to/write.
But when we changed the config to use IP-address of the network instead of drive letter, we managed to fix the issue. However the syntax changed a bit:
\\xxx.xxx.xx.xx\path\to\the\folder\to\write
Hope this helps anyone who still haven't solved the problem
Setting the share permissions is not enough. Also set the NTFS permissions adequately, then it'll work. Everyone Full Control on the share means, everyone can get through the network to the root of the share but from then on NTFS rights are used to determine what is allowed and what not.

Best practice for writing a self-updating windows service [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
We need to create a windows service that has the ability to self update.
Three options spring to mind,
a second service that manages the retrieval, uninstallation and installation of the first service.
Use of some third party framework (suggestions welcome. I believe .NET supports automatic updating for windows forms apps, but not windows services)
Use of a plugin model, whereby the service is merely a shell containing the updating and running logic, and the business logic of the service is contained in a DLL that can be swapped out.
Can anyone shed some light on the solution to this problem?
Thanks
Google have an open-source framework called Omaha which does exactly what your point 1. describes. It runs as a scheduled Windows task in the background, outside the applications it manages. Google use Omaha to auto-update their Windows applications, including Chrome. Because it comes from Google, and because it is installed on every Windows machine that runs Chrome, Omaha is extremely powerful.
There is an article online that explains in more detail how Omaha can be used to update Windows Services. It argues that Omaha is an especially good fit for Services (vs., say, GUI applications) because of its asynchronous nature.
So you could do your points 2. and 1. by using Omaha. I'm afraid I don't know how you would do 3.
Just some thoughts I had.
1 seems problematic because you end up dealing with the situation you're trying to resolve because at some point the updater will need updating.
3 sounds good but if by "swapped out" you mean using some fancy reflection to load the dll during run time I'm not sure if performance will become an issue.
There is a fourth option where the service can spawn an update process which would allow it to update the update executable if necessary before running it. From there it's a simple matter of writing an installation app which the service will spawn just before shutting down.
I use option 1. The updater process gets updated very rarely these days. It uses an XML file containing the details of where to get the files from (currently supports SVN, working on adding NuGet support) and where to put them. It also specifies which ones are services and which ones are websites and specifies the name of the service to use for each project.
The process polls the source, if there is a new version available it copies it down to a fresh version numbered directory and then updates the service. It also keeps 5 copies of each update making it easy to roll-back if there is a problem.
Here's the core piece of code for the updater which stops the existing service, copies the files over, and then restarts it.
if (isService)
{
log.Debug("Stopping service " + project.ServiceName);
var service = GetService(project);
if (service != null &&
service.Status != System.ServiceProcess.ServiceControllerStatus.Stopped && service.Status != System.ServiceProcess.ServiceControllerStatus.StopPending)
{
service.Stop();
}
service.WaitForStatus(System.ServiceProcess.ServiceControllerStatus.Stopped, new TimeSpan(0, 1, 0));
if (service.Status == System.ServiceProcess.ServiceControllerStatus.Stopped)
log.Debug("Service stopped");
else
log.Error("ERROR: Expected Stopped by Service is " + service.Status);
}
log.Debug("Copying files over");
CopyFolder(checkoutDirectory, destinationDirectory);
if (isService)
{
log.Debug("Starting service");
var service = GetService(project);
// Currently it doesn't create services, you need to do that manually
if (service != null)
{
service.Start();
service.WaitForStatus(System.ServiceProcess.ServiceControllerStatus.Running, new TimeSpan(0, 1, 0));
if (service.Status == System.ServiceProcess.ServiceControllerStatus.Running)
log.Debug("Service running");
else
log.Error("Service " + service.Status);
}
}

Resources