Browser can't open sometime on blackberry - blackberry

In my app, when user click a button , a url will open on blackberry browser using default browser session.
Some time browser screen can't open. i check other browser application ,its also can not open.
What is the problem...? browser screen is run after restart the device only..
Pls help me.. what is the problem and how to correct it..

From my point of view the problem is not related to your application. It is related to your BlackBerry device. There is something wrong with the device software and data saved on the device.
Make selective (not full) backup with BlackBerry Desktop Manager. After that wipe the device memory and restore backup file back to the device.

Related

Universal links (Deep linking) not working on iPhone but works on iPad

I am trying to build deep linking feature into my app. I did all the necessary set up for deep linking to work like, enabling associated domains in my app, adding apple-app-site-association to the root directory of my server, and I am serving a valid apple-app-site-association over https, I also validated my apple-app-site-association using this tool Validate your apple-app-site-association.
After doing everything right, I tested the deep linking feature on my iPad and it worked as expected. But when I tried to do the same on my iPhone it doesn't work, it always took me to safari. I tried it on 6s device, I reinstalled the app, I cleared Safari website data & cleared the history. Also updated the iPhone & iPad to iOS 9.3.5. The updating the OS didn't change a thing.
iPad still continue to work with deeplink URLs just like it did while it was on 9.3.4. iPhone still opened the link in safari.
Please give me some pointers on how to workaround this issue, I think this might be an apple bug but again I don't understand how it can work on iPad which is running same software as iPhone. Any help or guidelines is much appreciated.
Thanks.
I was able to fix this issue and this is one of the annoying issue that I have come across, because it doesn't say what is going wrong.
Fix: Whenever the iOS opens your link in safari, you need to pull down the webpage in safari and there you'll see a banner saying that, open it in the app. Once you click on that banner your future links will start opening the app instead of opening it in the safari browser.
There was no error whatsoever and there was no indication why the link was getting opened I am pretty sure that, iOS didn't download the apple-app-site-association whenever I installed the app.
Also note that the banner in the webpage will not be visible whenever your link opens up in safari, you need to pull down the webpage and then the banner will become visible and if you click on open in app banner, it will start opening the links in app.
If in future if you select to view the link in safari by clicking on context menu which appears on right hand side of the status bar, which will be saying "Open in [your app name]" in safari, the links in future will open in safari instead of app, and again if the banner open in app isn't visible, you have to pull down the webpage to see that banner.
HTH.
In iOS 13, similar problem of direct links not opening the app instead it open the safari website directly.
Fixed by updated the below safari setting...
Settings > Safari > Request Desktop Website > All websites > Switch Off
I was facing the same issue in iOS 12, on one device the link redirected to my app and on another device it was always redirecting to Safari and pressing the link on the Notes app was only allowing me to open it on Safari.
What I believe happened was that I pasted the URL in the browser and clicked Go, as I thought it would redirect to my app. No matter what I did ( reinstalling the app, restarting the device, ... ) the results were always the same, redirecting to Safari.
What helped me was deleting the cached data for my domain ( Settings -> Safari -> Advanced -> Website Data -> Swipe and delete the data for your domain ).
After that, everything started working.
I believe this is a bug with iOS Simulator,
In my case it was occurred when I entered an invalid address (with multiple spaces) for example:
Valid One: myApp://order/10003101
Invalid One: myApp://order/1003131
It stopped working even with Valid One and the solution was to clear Safari Website Data:
Go to Settings/Safari -> Clear History and Webstie Data
Device: iPhone 12 Pro Max
iOS: 14.5
Xcode: 12.5

Automatically check for iPad app when downloading specific file type from website?

I think I already know the answer to this ("can't be done"), but I figured I'd see what people think...
On my client's website they're posting files for download that specifically need to be viewed on iPads using the Cadwork Viewer app:
https://itunes.apple.com/us/app/cadwork-viewer/id505161598?mt=8
You can't open the file on an iPad unless you have that app, and I'm wondering if when clicking on the file to initiate download if there's a way to scan the device to see if Cadwork Viewer is already installed. If so, proceed with the download of the file. If not, pop up a notice "This file requires the Cadwork Viewer app, download it here from iTunes." Something like that.
Again, I think this is just not doable, but hey...there's all sorts of things I don't know!
Thoughts?
Check out this link: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
You can add a banner to the mobile site that lets you open the app from Safari.
Explanation from Apple:
If the app is already installed on a user's device, the banner
intelligently changes its action, and tapping the banner will simply
open the app. If the user doesn’t have your app on his device, tapping
on the banner will take him to the app’s entry in the App Store.
This should be a good starting place.

BlackBerry Simulator freezes when navigating through browser

The BlackBerry Device Simulator v6.0.0.706 (9800) freezes every time I attempt to load a page in the browser. I'm able to load the browser and go to www.google.com, but loading any other page freezes the entire simulator. To get back into the simulator, I have to close the window and relaunch.. stopping page load or pressing any of the other buttons in the window does not work.
This is what I have tried:
Tried loading other web pages to see if the problem persists.
Tried installing to C:\BlackBerry instead of the default directory in case spaces were an issue.
Updated to allow full access to all users and my Windows user account.
Tried running as Administrator.
No error messages display, the simulator just freezes and stays stuck on the same page until I relaunch the simulator. I am running this on Windows 7. Thanks for your help.

iOS6 - How to Clear Cache of Homescreen/Standalone Web App?

It would appear that Apple have changed the way homescreen/standalone web apps work in iOS 6. According to various blog posts (example) these apps now get their own dedicated space for storing their cached files, sqllite dbs, local storage etc, rather than sharing with the Safari browser like before.
Before iOS 6 when developing I used to go through the following procedure religiously to clear the cache...
Remove app from homescreen.
Close all pages/tabs in Safari.
Finally "Clear Cookies & Data" or "Clear Data" in "Settings" > "Safari".
Unfortunately now that Apple have moved the goal posts this same procedure doesn't seem to work. After clearing, even though my changes are picked up in Safari, when I add to the homescreen and launch the app the old HTML,JS etc is still picked up.
Does anyone know how to reliably fully clear the cache in iOS 6?
I can't verify the cache being cleared properly but this worked for me :
In order to do this, you need to allow Web Inspector on your iOS device.
Go to Settings > Safari > Advanced > Web Inspector (it has to be active)
And you have to activate the developer menu on your computer's Safari.
Go to Preferences > Advanced > Activate Developer menu
Connect your device to your computer with the USB cable
Go to safari > Developpement > Your Device name > Inspect an App (The app has to be running)
This will open The inspector on your computer for the web app
While the inspector is open Clear the cache (command + alt + E)
With the inspector still open refresh the page on your computer (command + R)
Somehow the Webapp cache got cleared and i got the non-cached code.
I found a a work-around. Just put a link on the web page itself for users who are having trouble seeing new version...
refresh
It works just like the iPhone/iPad refresh button on the address bar!
First plug the phone into the computer then open the web app on the phone and Safari on the computer, then you can open the web inspector in Safari from the menu "Develop>Name of phone>title of app" (if you can't see the develop menu you can turn it on in Safari's preferences).
From there you can see/edit the cookies and local storage just like sites on your computer and pressing command+r while the inspector is focused will reload the app on the phone.
You can connect your device and open Safari's web inspector on your computer and run document.location.reload() in the console tab to reload the page.
Before reloading you can press Option+Command+E to make sure the cache is cleared.
Instead of above you can also press Shift+Command+R to reload the page without cache but sometimes it hasn't worked for me.
Try appending a unique GET tag to the ends of any and all href attributes, for example:
<link rel="stylesheet" type="text/css" href="/css/global.css?
<?php echo(mt_rand(10000000, 99999999)); ?>
" />
This would generate href="/css/global.css?########", with a different number nearly every time. This forces iOS' Safari to pull the "new" page down, as there is no data in its cache originating from the same URI, and there likely never will be (unless you plan on reloading the app millions of times during development :D )
If the iOS6 device has a jailbreak applied, you can use ssh to delete the content of the folder "/private/var/mobile/Library/Caches/com.apple.webapp".
Next time that you start the web app, all files will be re-downloaded from the webserver.
The only way to deal with this currently is to wait, but there is a workaround. If you change the name of the file, it will pull the new code. However, if you change it back to the old name before the cache clears, the old code will be used. The cache refreshes periodically and will update eventually. I just had this happen to me with a CSS file that refused to change. Time will fix it, but if you just need it to update for testing, a name change will work.
This drove me nuts for a while. Tried clearing the cache on device - no luck. Renaming the page did help, but once you rename it back, you still get the same stale version.
Found the solution yesterday. You need to connect your device to Mac and open Web Inspector in Safari Develop menu. Once in Web Inspector, simply press "Reload page" button on the Inspector's toolbar and - voila - you see the fresh version on your device's screen.
Just set the request you pass to the webview to NSURLRequestReloadIgnoringLocalCacheData
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];
[self.webView loadRequest:request];

Do iPhone Offline Web Apps and Safari share the same HTML5 Application Cache?

I have a web app that is intended for use as an iOS offline web app. A key feature of the app is that users can download files with extensions like .doc, .ppt, .pdf, etc. To make these available offline, I am making entries for any such files in a cache manifest.
One other caveat: the most user-friendly way I could get these files to open is to jump out of the offline web app and into Safari to actually open the file. This way, I get the "Open in {{Application}}" options that Safari provides. There seems to be some sort of disconnect during this switch from the offline web app to Safari.
Assuming a clean slate:
I've gone and wiped all the data for this site using Settings->Safari->Advanced.
I launch the offline web app while connected to the server (So we're in online mode.)
The application updates the cache successfully.
I close the web app and disconnect from the server.
I relaunch the app and all of the navigation chrome works, so we know the cache is functioning properly.
I click the link to open a file that needs Safari, so iOS switches to Safari and goes to the file's URL.
Safari says "Safari cannot open the page because the server cannot be found."
So, it seems the this application cache is accessible from the offline web app, but not Safari? Can anyone verify this?
And then going forward, if that is in fact the case: any ideas for a better way to do it? Thanks!
iOS Safari work same as Safari does. But I assumed that your iOS Safari doesn't load successfully, you know, the network of iPhone isn't fast as your PC. You must attach handlers to determine when your offline data is loaded successfully.
Check it out: http://www.html5rocks.com/en/tutorials/appcache/beginner/ and try to use JS to check status of ApplicationCache.

Resources