Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (webview)
Viewing all 680 articles
Browse latest View live

WebView.toImage() not saving HTML Canvas image

$
0
0

So, i have a problem with toImage() method. In the WebView i load an HTML with Canvas code to write something with your finger, you can watch the code here: https://github.com/Solitaryo/figerPaint

The first problem is when i put the toImage.media file inside a ImageView it saves the file but not what i write with my finger, only the "screenshot" or something like that.

//WebView
var firma=$.webview.toImage().media;
//ImageView
$.imagenFirma.setImage(firma);
The second problem is when i try to write the file in the gallery it doesn't work either... This is my function:
function guardarFirma(){
    //Here i put the image inside "firma"
    var firma=$.webview.toImage().media;
    //I set the image to a ImageView but can't save what i wrote with my finger
    $.imagenFirma.setImage(firma);
    //The file name
    var firmaName="firma.jpg";
    //Creating the place for the image
    var imageFile=Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, firmaName);
 
    if(imageFile.exists()){
        //Trying to write the image
        imageFile.write(firma);
        alert("image saved");
    } else{
        alert("error");
    }
}
I'm developing with:
Macbook Pro OS X 10.9.2
Titanium SDK 3.2.2 GA
Titanium Studio, build: 3.2.1.201402041146
Device: Motorola XT910

fireEvent not working on webView

$
0
0

Hi,

I encounter a small problem with FireEvent and addEventListener. I'm trying to give informations to my webView but isn't working... Actually, one event is working but not the other one...

index.html : http://www.sharpik.com/535f9cb78b695/Capture%20d’écran%202014-04-29%20à%2015.32.59.png

app.js : http://www.sharpik.com/535f9d2bc749a/Capture%20d’écran%202014-04-29%20à%2015.32.36.png

Maybe it's because the document isn't fully loaded ? If yes, how to do it (like $(document).ready) ?

I'm trying on iOS 7 real device and iPhone 5 simulator. Both aren't working.

Thank you in advance

Pass variable from WebView to a Controller

$
0
0

Hi, i just have a problem, i have a WebView with some events, the event "save" saves an entire canvas like this:

WebView

var dataURL = canvas.toDataURL();
I use this canvas to write with my finger, the method toDataURL() makes an image from the canvas, so now i need to save that value dataURL in my File System, so any ideas?

So, the main idea, is to pass the variable dataURL, who is inside a WebView to my controller, thanks for your time.

I know this code is for saving the file in the file system.

var imageFile=Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, "filename");

Webview disassepar after scrolling pages in a ScrollableView

$
0
0

I am developing an application using SDK 3.2.2 and Alloy Framework for Android , i have a scrollableView, each view of the scrollableView is structured like the following :

<view id='currentScrollableView'>
    <ScrollView id="scrollView" layout="vertical" scrollType = "vertical">
        <ImageView top="0" id="imageOffre"/>
        <WebView top="5" id="detailsWebView" width='100%' enableZoomControls="false" onLoad="loadWebView" backgroundColor="green" />
    /ScrollView>
</view>
Starting from the first view , when i scroll three pages forward and then comme back to the first page ,the webview disappear. but the ImageView is kept .

I tried to reload the webview using the event (ScrollEnd) of the ScrollableView and as you can see in the code above, i added a green background to the webview to see if it appear without content. As a result the webview didn't show up but when i try to log the (html) property of the webview i do get the html correctly ! .

in a previous post the same problem is reported , it mentioned that the problem was fixed by an update pf the Titanium SDK (2.1.0.GA) i am using the (3.2.2.GA) and stil have this problem.

Any idea ?

Application Type : Mobile | Titanium SDK version 3.2.2.GA | Platforms : Android 4.3 / 4.4 | Device : Android Device / Android Emulator | Host Operating System: OSX 10.9.2 | Titanium Studio, build: 3.2.1.201402041146

error loading pdf into webview

$
0
0

Hi,

I get

[ERROR] Couldn't determine the proper encoding. Make sure this file: The_iPad_App_Wave.pdf is UTF-8 encoded.

when loading a pdf into a webview. I think the message doesn't tell the real problem, since it also appears when using the pdf used in KitchenSink. Any hints?

Android: I/TiWebChromeClient.console: (main) [251,53645] Uncaught ReferenceError: TiApp is not defined

$
0
0
can anyone tell me what the heck this error is?? I/TiWebChromeClient.console: (main) [251,53645] Uncaught ReferenceError: TiApp is not defined i am opening google doubleclick jump url https://pubads.g.doubleclick.net/gampad/jump?mob=js&u_w=540&u_h960&iu=/38930203/mobile_db_restaurant&sz=640x960&c=1388485112675 it works well on the browser and iOS but when i run it on android (device and emulator) it gives me the below errors and never stops. tested on sdk 3.2 and 3.1.3 [INFO] : I/TiWebChromeClient.console: (main) [17525,17525] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [227,17752] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [249,18001] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [251,18252] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [249,18501] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [250,18751] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [250,19001] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [257,19258] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [243,19501] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [255,19756] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [248,20004] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [252,20256] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [249,20505] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [250,20755] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [250,21005] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [252,21257] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [260,21517] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [239,21756] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [251,22007] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [250,22257] Uncaught ReferenceError: TiApp is not defined (1:null) [INFO] : I/TiWebChromeClient.console: (main) [250,22507] Uncaught ReferenceError: TiApp is not defined (1:null) ........

Android mp3 url is not playing in webview

$
0
0

Hi, i am trying to play mp3 url in webview but webview is not playing mp3 url. I am using below code for playing mp3

$.webview.setUrl(sampleurl.mp3);

Error Log: [WARN] : AwContents: nativeOnDraw failed; clearing to background color. [ERROR] : MediaResourceGetter: Invalid url: java.lang.NumberFormatException: Invalid int: "null"

if any one know solution please share.

Resizing an Appcelerator WebView accordingly to it's content (YOC / smartadserver Ads)

$
0
0

We are currently in the process of adding ads from YOC and smartadserver.com to an iPhone and Android App we develop with Appcelerator Titanium.

Now we would like to embed the JavaScript calls from the YOC/smartadserver JS SDK in a Webview, here I'm looking for the best approach.Until now I do this with the help of jQuery and some kind of listener, which is called every 100 ms. It look at all children (tags) of the body, what the highest and broadest values are and after that it calls a Titanium function which tries to adjust (accordingly to the changes of the ad html) the WebView in the app. It works actually quite good, but maybe there are other more elegant solutions. I had seen that there are several JS variables that I could possibly also check whether there were changes in size or a click event. And i may not get a feedback of some Ads which open up a new window and also get a new height and width because of that. So that's why I'm looking for the ideal variant. Any help or suggestions would be highly appreciated.

Here are 2 links to the functions that I use:

Here is the function which creates the WebView and the close button: http://pastie.org/3428595

That's the content of the WebView: http://pastie.org/3428600

Thanks, Marco


Determine all resource urls during a page load

$
0
0

I'm new to titanium and I'm using a webview in order to load a webpage.

My code to do that so far looks like this:

$.webview.setUrl('http://m.example.com');
$.webview.addEventListener('load', function(){
    Titanium.API.log('loading: ' + $.webview.getUrl());
});
$.index.open();
When starting this app, I get only get one address as an output on the console namely:
[INFO] :   loading: http://m.example.com/#Home
However, i checked in Google chrome that this page loads several other resources like images, css, js files etc. But none of those urls are displayed in the console.

So what I want is to get the url of the resource currently being loaded. Something like this:

[INFO] :   loading: http://m.example.com/#Home
[INFO] :   logging: http://m.example.com/js/min.js 
[INFO] :   logging: http://m.example.com/css/queries.css
[INFO] :   logging: http://m.example.com/js/jquery.js
[INFO] :   logging: http://m.example.com/img/alarmclock.png
and so on.

How do I do that?

Web workers and multithreading

$
0
0

I need to render some parts of an HTML page in a WebView with asynchronous task. Each task need to call some functions defined in the app using the API Ti.App.FireEvent. Reading on forum I found that the right way to manage multithreading is to use WebWorkers and I found a lot of examples. The question is: Can I use the API Ti.App.FireEvent inside the WebWorkers?

Android Module

$
0
0

I am new to Android module development and am trying to develop a WebView module which will extend the android.webkit.WebView by adding customised context menu, etc.

I am now at the pretty early stage that I can successfully create the proxy and can invoke it from JS.

But whenever the WebView is created, it switch me to the device's native web browser App but not open the webview within my App.

Here's the snippet in my proxy:

private class ExtendedWebView etends TiUIView
{
    public ExtendedWebView(TiViewProxy proxy){
        super(proxy);
        ....        
        WebView webview = new WebView(proxy.getActivity());
        webview.loadUrl("http://google.com");
        setNativeView(webview);
    }
 
    public TiUIView createView(Activity activity)
    {
        TiUIView view = new ExtendedWebView(this);
        view.getLayoutParams().autoFillsHeight = true;
        view.getLayoutParams().autoFillsWidth = true;
        return view;
    }
 
    ....
}
How can I fix this?

getting a fire event from inside a webview

$
0
0

Hi, I am trying to create a wysiwyg text editor using a script from nicEdit. My problem is figuring out how to get the text back from the text area. I have tried the following, but the fire event is not firing.

view file:

<WebView willHandleTouches="false" id="editor" top="40"></WebView>
and in my controller I have:
$.editor.html='<html><head><script src="nicEdit.js" type="text/javascript"></script><script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas); function getHtml(str){Ti.App.fireEvent("getText",{msg:str});}</script><style>.nicEdit-panelContain{padding-bottom:40px;}</style></head><body> <Textarea onblur="getHtml(document.getElementById(\"editArea\").value);" style="width:100%; height:25%" id="editArea" ></Textarea></body></html>';
 
Ti.App.addEventListener('getText',function(e) {
    Ti.API.info('here is a message from the webview : '+e.msg);
});
FYI, this is a tab based app for iOS, using Titanium 3.2.1

Zoom in webview onload

$
0
0

Hi.

Is it possible to have a remote url that i dont have any control over to zoom in to initial-scale 2.0 on load.

The content on the page i want to display is just 50% and when i double click and zoom it is perfect.

How do i make it fill the whole screen on load?

Thanx

//R

Android - Avoid keyboard opened by default on a webview on SDK 3.2.3 GA

$
0
0

Hi, I updated my Android app for SDK 3.2.3 GA. The problem is relative the "auto" open of the keyboard on every webview. I would like open the keyboard only when the user focus it; and not at the load of the webview. How can I fix this problem?

This event happen when i try the app on the device.

wrap a game builded with phaser.js in a webview appcelerator.

$
0
0

Hey guys, anyone try use phaser js in a webview in appcelerator?

I try but I recived a build error when titanium try encript phaser.js

[ERROR] : Failed to encrypt JavaScript files [ERROR] Application Installer abnormal process termination. Process exit value was 1


contextual action bar

$
0
0

Hi...

i need to use the contexual action bar in my android application but currently the titanium sdk not suppoting those feature.

so I found that we can extends the function of Titanium SDK by creating external Titanium Module and import those module in to requred application. but i dont have any idea how to implement those things. or is this any community which can help me to build the module

Webview crash on android with Ti SDK 3.2.3.GA

$
0
0

It seems that the webview crashes on android when the app it's compiled with 3.2.3.GA. This happens on a HTC One V with android 4.0.3.

However I wasn't able to replicate it in a Genymotion emulator 4.3

Compiled with 3.2.2.GA works ok.

I opened a JIRA ticket too

Thank you.

This is the app.js

<Alloy>
    <Window id="tosWindow" platform="android">
        <WebView id="browser" url="http://artistboxapp.com"/>
    </Window>
</Alloy>
and this is the crash log:
05-12 12:47:50.729: D/Window(30932): Checkpoint: postWindowCreated()
05-12 12:47:50.759: D/SqliteDatabaseCpp(31090): DB info: open db, path = /data/data/com.android.providers.media/databases , key = eptevjYl, flag = 6, file size = 8570880
05-12 12:47:50.759: D/MediaProvider(31090): [MediaProvider][onCreate]-
05-12 12:47:50.929: W/ContentService(489): binderDied() at ObserverNode
05-12 12:47:50.929: I/ActivityManager(489): Process com.android.vending (pid 30996) has died.
05-12 12:47:51.179: D/WifiStateMachine(489): fetchRssiAndLinkSpeedNative RSSI = -49
05-12 12:47:51.249: D/SqliteDatabaseCpp(31090): DB info: path = /data/data/com.android.providers.media/databases , key = eptevjYl, handle: 0xa51518, type: w, r/w: (0,1), mode: truncate, disk free size: 389 M
05-12 12:47:51.259: W/CpuWake(489): >>releaseCpuPerfWakeLock
05-12 12:47:51.259: W/CpuWake(489): <<releaseCpuPerfWakeLock
05-12 12:47:51.520: I/Icing(30808): Internal init done: storage state 0
05-12 12:47:51.560: V/chromium(30932): external/chromium/net/host_resolver_helper/host_resolver_helper.cc:66: [0512/124751:INFO:host_resolver_helper.cc(66)] DNSPreResolver::Init got hostprovider:0x51ae0220
05-12 12:47:51.560: V/chromium(30932): external/chromium/net/base/host_resolver_impl.cc:1515: [0512/124751:INFO:host_resolver_impl.cc(1515)] HostResolverImpl::SetPreresolver preresolver:0x00b332c0
05-12 12:47:51.600: E/libEGL(30932): call to OpenGL ES API with no current context (logged once per thread)
05-12 12:47:51.610: V/WebRequest(30932): WebRequest::WebRequest, setPriority = 0
05-12 12:47:51.610: I/InputManagerService(489): [unbindCurrentClientLocked] Disable input method client.
05-12 12:47:51.610: I/InputManagerService(489): [startInputLocked] Enable input method client.
05-12 12:47:51.660: W/SubtypeSwitcher(670): Current subtype: en_US, keyboard
05-12 12:47:51.660: W/SubtypeSwitcher(670): Last subtype was disabled. Update to the current one.
05-12 12:47:51.660: W/AbstractCompatWrapper(670): Invalid input to AbstructCompatWrapper
05-12 12:47:51.660: W/CompatUtils(670): Exception in invoke: NullPointerException
05-12 12:47:51.660: W/SubtypeSwitcher(670): Update subtype to:en_US,keyboard, from: en_US, keyboard
05-12 12:47:51.660: D/SubtypeSwitcher(670): Update shortcut IME from : com.google.android.voicesearch/.ime.VoiceInputMethodService, , voice
05-12 12:47:51.680: I/Icing(30808): Post-init done
05-12 12:47:51.680: D/SubtypeSwitcher(670): Update shortcut IME to : com.google.android.voicesearch/.ime.VoiceInputMethodService, , voice
05-12 12:47:51.690: I/HTCIMEService(670): fetch result: 9.0
05-12 12:47:51.690: I/HTCIMEService(670): fetch result: 9.0
05-12 12:47:51.700: V/chromium(30932): external/chromium/net/disk_cache/hostres_plugin_bridge.cc:52: [0512/124751:INFO:hostres_plugin_bridge.cc(52)] StatHubCreateHostResPlugin initializing...
05-12 12:47:51.700: V/chromium(30932): external/chromium/net/disk_cache/hostres_plugin_bridge.cc:57: [0512/124751:INFO:hostres_plugin_bridge.cc(57)] StatHubCreateHostResPlugin lib loaded
05-12 12:47:51.700: V/chromium(30932): external/chromium/net/disk_cache/hostres_plugin_bridge.cc:63: [0512/124751:INFO:hostres_plugin_bridge.cc(63)] StatHubCreateHostResPlugin plugin connected
05-12 12:47:51.700: V/chromium(30932): external/chromium/net/http/http_cache.cc:1166: [0512/124751:INFO:http_cache.cc(1166)] HttpCache::OnBackendCreated HostStat created
05-12 12:47:51.700: E/chromium(30932): external/chromium/net/disk_cache/stat_hub.cc:190: [0512/124751:ERROR:stat_hub.cc(190)] StatHub::Init - App info.rborn.tst isn't supported.
05-12 12:47:51.700: E/chromium(30932): external/chromium/net/disk_cache/stat_hub.cc:190: [0512/124751:ERROR:stat_hub.cc(190)] StatHub::Init - App info.rborn.tst isn't supported.
05-12 12:47:51.740: I/XT9IME(670): [handleLdbChange] handle LDBs change.
05-12 12:47:51.760: I/XT9_C(670): [registerXT9LDB] Memory allocation of LDB#0 done.
05-12 12:47:51.780: I/XT9_JNI(670): [loadFile] size=304198 (loaded)
05-12 12:47:51.780: I/XT9_C(670): [registerXT9LDB] LDB(0409) loading [done]
05-12 12:47:51.780: I/ActivityManager(489): Displayed info.rborn.tst/org.appcelerator.titanium.TiActivity: +1s958ms (total +7s417ms)
05-12 12:47:51.800: D/XT9_C(670): [registerXT9LDB] current LdbNum=109, First LdbNum=109, Second LdbNum=0
05-12 12:47:51.800: I/Adreno200-EGLSUB(1444): <CreateImage:893>: Android Image
05-12 12:47:51.800: I/Adreno200-EGLSUB(1444): <GetImageAttributes:1102>: RGBA_8888
05-12 12:47:51.820: D/memalloc(489): /dev/pmem: Unmapping buffer base:0x5c77f000 size:7352320 offset:5816320
05-12 12:47:51.830: I/XT9_C(670): [loadDefaultDB] xt9_raw/kbd_0d09.kbd size=20811 (loaded)
05-12 12:47:51.840: D/AndroidRuntime(30932): Shutting down VM
05-12 12:47:51.840: W/dalvikvm(30932): threadid=1: thread exiting with uncaught exception (group=0x40aa1228)
05-12 12:47:51.850: I/HTCIMMView(670): [FixedWCL] adjustWCLHeight height:65
05-12 12:47:51.860: I/CVW(670): Dismiss CandidateViewWindow WCLID:0
05-12 12:47:51.860: I/CVW(670): Dismiss CandidateViewWindow WCLID:1
05-12 12:47:51.860: I/CVW(670): Dismiss CandidateViewWindow WCLID:2
05-12 12:47:51.860: I/CVW(670): Dismiss CandidateViewWindow WCLID:3
05-12 12:47:51.860: E/TiApplication(30932): (main) [2000,2000] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.2.3,2014/04/22 10:17,b958a70
05-12 12:47:51.860: E/TiApplication(30932): java.lang.NullPointerException
05-12 12:47:51.860: E/TiApplication(30932):     at android.webkit.WebView$PrivateHandler.handleMessage(WebView.java:9972)
05-12 12:47:51.860: E/TiApplication(30932):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-12 12:47:51.860: E/TiApplication(30932):     at android.os.Looper.loop(Looper.java:156)
05-12 12:47:51.860: E/TiApplication(30932):     at android.app.ActivityThread.main(ActivityThread.java:4977)
05-12 12:47:51.860: E/TiApplication(30932):     at java.lang.reflect.Method.invokeNative(Native Method)
05-12 12:47:51.860: E/TiApplication(30932):     at java.lang.reflect.Method.invoke(Method.java:511)
05-12 12:47:51.860: E/TiApplication(30932):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-12 12:47:51.860: E/TiApplication(30932):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-12 12:47:51.860: E/TiApplication(30932):     at dalvik.system.NativeStart.main(Native Method)
05-12 12:47:51.880: E/AndroidRuntime(30932): FATAL EXCEPTION: main
05-12 12:47:51.880: E/AndroidRuntime(30932): java.lang.NullPointerException
05-12 12:47:51.880: E/AndroidRuntime(30932):    at android.webkit.WebView$PrivateHandler.handleMessage(WebView.java:9972)
05-12 12:47:51.880: E/AndroidRuntime(30932):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-12 12:47:51.880: E/AndroidRuntime(30932):    at android.os.Looper.loop(Looper.java:156)
05-12 12:47:51.880: E/AndroidRuntime(30932):    at android.app.ActivityThread.main(ActivityThread.java:4977)
05-12 12:47:51.880: E/AndroidRuntime(30932):    at java.lang.reflect.Method.invokeNative(Native Method)
05-12 12:47:51.880: E/AndroidRuntime(30932):    at java.lang.reflect.Method.invoke(Method.java:511)
05-12 12:47:51.880: E/AndroidRuntime(30932):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-12 12:47:51.880: E/AndroidRuntime(30932):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-12 12:47:51.880: E/AndroidRuntime(30932):    at dalvik.system.NativeStart.main(Native Method)
05-12 12:47:51.910: E/EmbeddedLogger(489): App crashed! Process: info.rborn.tst
05-12 12:47:51.910: E/EmbeddedLogger(489): App crashed! Package: info.rborn.tst v1 (1.0)
05-12 12:47:51.910: E/EmbeddedLogger(489): App crashed! Application Label: tst
05-12 12:47:51.910: W/ActivityManager(489):   Force finishing activity info.rborn.tst/org.appcelerator.titanium.TiActivity
05-12 12:47:51.970: W/ActivityManager(489):   Force finishing activity info.rborn.tst/.TstActivity
05-12 12:47:52.030: D/ViewRootImpl(489): @@@- disable SystemServer HW acceleration

Webview SSL Certificate Error - No way to accept expired server certificate - IPad app

$
0
0
Titanium 1.6.2 - OSX Environment - IPad Application --------------------------------------------------- I attempted to load a server url that has an expired ssl certificate into a webview. In the Titanium Developer debug window I received the error listed below. I have been unable to find a workaround for it. In the Safari browser, a dialog window pops up giving me the option of being able to accept it. However, the same window does not popup in a webview. *** Any help would be much appreciated *** ERROR MESSAGE FOLLOWS: ---------------------- [ERROR] Error loading: , Error: Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xxxxx.xxxxxx.com” which could put your confidential information at risk." UserInfo=0x6c474e0 {NSErrorFailingURLStringKey=https://xxxxx.xxxxxx.com/IronMountain/Common/Shared/Logon.aspx, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSErrorFailingURLKey=https://xxxxx.xxxxxx.com.com/IronMountain/Common/Shared/Logon.aspx, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xxxxx.xxxxxx.com” which could put your confidential information at risk., NSUnderlyingError=0x6c523b0 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xxxxx.xxxxxx.com” which could put your confidential information at risk.", NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x6c49d80>}

Error building simple app in Blackberry 10.2.1

$
0
0

Hello,

I'm trying to build a simple mobile application in Blackberry using Titanium SDK 3.2.2GA.

The following error occures when the app launches on device (Blackberry 10.2.1):

![app error on Blackberry device 10.2.1] (file:///home/irina/Developer/blackberryerror.jpg "blackberryerror")

I asume that Titanium doesn't create the js file(ApplicationWindowPlatform.js) for blackberry too, as it does for the other platforms. This is the directory's content which titanium creates for blackberry

![blackberry directory content] (file:///home/irina/Developer/blacberrydirectory1.png "blackberryerror")

and the code provided in ApplicationWindow.js

// Load the platform specific UI.
    var ApplicationWindowPlatform;
    if (Ti.Platform.osname == 'mobileweb') {
        // Work around missing platform-specific require feature in Mobile Web.
        ApplicationWindowPlatform = require('mobileweb/ui/ApplicationWindowPlatform');
    } else {
        ApplicationWindowPlatform = require('ui/ApplicationWindowPlatform');
    }
    ApplicationWindowPlatform(self, webView, titleBarOn, drawerOn);
 
    return self;
The Titanium 3.2.1's default HTML5's based application contains a simple webview within a window.

So, I added a js file in blackberry's directory with a simple function. The error was gone but the webview doesn't show up and the document's title is undefined.

function ApplicationWindowPlatform(/*TiUIWindow*/self, /*TiUIView*/webView, /*boolean*/titleBarOn, /*boolean*/drawerOn) {
 
     if (titleBarOn) {
        // When the webview loads, set the title
        webView.addEventListener('load', function(e) {
            self.title = webView.evalJS('document.title');
        });
 
    }
}
 
module.exports = ApplicationWindowPlatform;
Any idea why all this is happening? Thank you.

BlackBerry SDK installed for titanium is 10.0.10.822

Error building simple HTML based app in Blackberry 10.2.1

$
0
0

Hello, I'm trying to build a simple mobile application in Blackberry using Titanium SDK 3.2.2GA. The following error occures when the app launches on device(Blackberry 10.2.1):

JavaScript Exception

local:///assets/HTML/index.html

app/native/assets/ui/ApplicationWindow.js:1

(function () {var require = function (id) { return globalRequire(id, 'app/nati

No such native module app/native/assets/ui/ui/ApplicationWindowPlatform

I asume that Titanium doesn't create the js file(ApplicationWindowPlatform.js) for blackberry too, as it does for the other platforms. The blackberry directory only contains the map directory, Ti.Manifest and the icons.

The code provided in ui/ApplicationWindow.js

/ /Load the platform specific UI.
   var ApplicationWindowPlatform;
    if (Ti.Platform.osname == 'mobileweb') {
         // Work around missing platform-specific require feature in Mobile Web.
         ApplicationWindowPlatform = require('mobileweb/ui/ApplicationWindowPlatform');
     } else {
        ApplicationWindowPlatform = require('ui/ApplicationWindowPlatform');
     }
     ApplicationWindowPlatform(self, webView, titleBarOn, drawerOn);
 
     return self;
The Titanium default's HTML5-based application contains a simple webview within a window.

So, to fix this, i tried to add a js file in blackberry's directory containing a simple function. The error is gone but the webview doesn't load and the document's title is undefined.

function ApplicationWindowPlatform(/*TiUIWindow*/self, /*TiUIView*/webView, /*boolean*/titleBarOn, /*boolean*/drawerOn) {
 
      if (titleBarOn) {
         // When the webview loads, set the title
         webView.addEventListener('load', function(e) {
             self.title = webView.evalJS('document.title');
         });
 
     }
 }
 module.exports = ApplicationWindowPlatform;
Any idea why all this is happening? Thank you.

Blackberry SDK installed for Titanium :10.0.10.822

Titanium runs on Windows 7

Viewing all 680 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>