I am developing an app in which I am implementing google text recognition.
This is the link that I am following :
https://developers.google.com/ml-kit/vision/text-recognition/android
I have done everything described there but still I am getting error.
This is what I have in my gradle file:
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.1.0'
I have these lines too in my manifest file:
<uses-permission android:name="android.permission.INTERNET"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="ocr" />
I am performing a click on a button OCR and then I am calling below lines of code:
InputImage inputImage = InputImage.fromBitmap(bitmap, 0);
TextRecognition.getClient().process(inputImage).addOnSuccessListener(new OnSuccessListener<Text>() {
#Override
public void onSuccess(Text text) {
string = text.getText();
success = true;
}
}).addOnFailureListener(new OnFailureListener() {
#Override
public void onFailure(#NonNull Exception e) {
e.printStackTrace();
success = false;
}
});
Error is thrown as soon as I Click on OCR button.
Following is the stack trace:
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite.ocr not found.
E/LibraryVersion: Failed to get app version for libraryName: text-recognition
I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite.ocr:0 and remote module com.google.android.gms.vision.dynamite.ocr:0
D/TextNativeHandle: Cannot load feature, fall back to load dynamite module.
W/scanner.camsca: Unsupported class loader
W/scanner.camsca: Skipping duplicate class check due to unsupported classloader
I/DynamiteModule: Considering local module com.google.android.gms.vision.ocr:0 and remote module com.google.android.gms.vision.ocr:1
Selected remote version of com.google.android.gms.vision.ocr, version >= 1
V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
I/DynamiteLoaderV2: [71] VisionOcr.optional
W/scanner.camsca: Unsupported class loader
I/native: start_ocr_856638336_langid.cc:33 StartOcr with label: latin_script_gmvapi_android
jni_helper.cc:115 Loading model config /data/user/0/com.scanner.camscan/cache/vision/ocr/data/models/semanticlift_rpn_lstm_engine_tfmini.bincfg
I/native: region_proposal_text_detector.cc:1976 Compute manager Max in flight region detector: 1
common_util.h:39 Removing Thread Pool: ocr_region
tensor_detector_client.cc:1643 Compute manager Max in flight detector: 1
I/native: common_util.h:35 Resizing Thread Pool: ocr_det to 4
I/native: tfmini_model_interface.cc:124 Loaded weights from /data/user/0/com.scanner.camscan/cache/vision/ocr/data/models/tfmini_rpn_detector_space_to_depth_gray_quantized_v2_model.data
timer.cc:71 PhotoOcrEngine::Init (detector): 3.72583 ms (elapsed)
assist_recognizer.cc:94 Initializing nugget matcher with /data/user/0/com.scanner.camscan/cache/vision/ocr/data/models/nugget_stats_1.0.dat
I/native: timer.cc:71 PhotoOcrEngine::Init (assist recognizer): 0.262136 ms (elapsed)
I/native: timer.cc:71 LanguageIdMutator: 4.42141 ms (elapsed)
timer.cc:71 BeamSearch::Init (mutator): 4.58203 ms (elapsed)
I/native: common_util.h:35 Resizing Thread Pool: ocr_segm to 4
I/native: tfmini_model_interface.cc:102 Loaded fp16 weights from /data/user/0/com.scanner.camscan/cache/vision/ocr/data/models/tfmini_latin_conv_model.data_fp16
I/native: tfmini_model_interface.cc:102 Loaded fp16 weights from /data/user/0/com.scanner.camscan/cache/vision/ocr/data/models/tfmini_latin_lstm_model.data_fp16
timer.cc:71 PhotoOcrEngine::Init (recognizer): 8.83693 ms (elapsed)
timer.cc:71 Init: 13.0749 ms (elapsed)
I/native: start_ocr_856638336_langid.cc:42 StartOcr success
How can I rectify this error.
Thank you
I have faced a similar problem before.
These are not actual errors. They are just warnings and messages. You can ignore them.
What I guess is, you are putting true in the boolean variable success on onSuccess and false on onFailure and performing further actions based on its value.
Just directly call further methods from onSuccess after string = text.getText();
My application is showing very strange behavior for a tablet device, it crashes as it launches (Lollipop - 5.1.1 Tablet device, without any meaningful logs) though it runs fine on mobile devices even including Lollipop - 5.0 phone device with almost same log report
minSdkVersion 19
targetSdkVersion 28
Log report
E/com.samsung.app: [AccuTab_Magagine]>>> UIMK:1376 [0:0] time : 17:31
E/Watchdog: !#Sync 2614 [07-31 17:31:00.264]
? E/AffinityControl: AffinityControl: registerfunction enter
? E/AffinityControl: AffinityControl: registerfunction enter
E/WindowState: getStack: Window{2bd3ac2f u0 d0 com.project.debug/com.screens.account_login.AccountLoginActivity} couldn't find taskId=500 Callers=com.android.server.wm.WindowState.getDisplayContent:1059 com.android.server.wm.WindowState.isDefaultDisplay:1778 com.android.server.wm.WindowState.getMultiWindowStyleLw:2363 com.android.internal.policy.impl.multiwindow.MultiPhoneWindowManager.shouldEnableLayoutInsetsBySoftInput:1505
E/Zygote: MountEmulatedStorage()
E/Zygote: v2
E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
com.switchsolutions.agricultureapplication.mobilink.debug E/StudioProfiler: Studio Profilers encountered an unexpected error. Consider reporting a bug, including logcat output below.
See also: https://developer.android.com/studio/report-bugs.html#studio-bugs
Failed to capture application
E/WindowState: getStack: Window{2bd3ac2f u0 d0 com.project.debug/com.screens.account_login.AccountLoginActivity} couldn't find taskId=500 Callers=com.android.server.wm.WindowState.getDisplayContent:1059 com.android.server.wm.WindowState.isDefaultDisplay:1778 com.android.server.wm.WindowState.getMultiWindowStyleLw:2363 com.android.internal.policy.impl.multiwindow.MultiPhoneWindowManager.shouldEnableLayoutInsetsBySoftInput:1505
E/android.os.Debug: ro.product_ship = true
E/android.os.Debug: ro.debug_level = 0x4f4c
I am developing an Android Application and was looking into Google Places for some functionality within the application. Google has recently released the PlacePicker feature which is what I am using. I have followed the Google guidelines and quick start guides to the "T". The functionality was working amazing as of three hours ago and now when I go to test it, it launches and then immediately closes with no errors thrown in the stack trace. Here is how I am using the code:
This is within a fragment.
// The Location Selection from Google Place Picker
where.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
try {
launchPlace();
} catch (GooglePlayServicesNotAvailableException | GooglePlayServicesRepairableException e) {
e.printStackTrace();
}
}
});
This is within the fragments onCreateView.
The method launchPlace() is defined as follows.
// Start Google Place Picker Code **************************************************************
public void launchPlace() throws GooglePlayServicesNotAvailableException,
GooglePlayServicesRepairableException {
PLACE_PICKER_REQUEST = 1;
PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
Context context = getActivity().getApplicationContext();
startActivityForResult(builder.build(context), PLACE_PICKER_REQUEST);
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
String badLocation = "That location is not valid for this app, please select a valid location";
if (requestCode == PLACE_PICKER_REQUEST) {
if (resultCode == Activity.RESULT_OK) {
place = PlacePicker.getPlace(data, getActivity().getApplicationContext());
if (place.getPlaceTypes().contains(34)) {
if (place.getPlaceTypes().contains(9) || place.getPlaceTypes().contains(15) ||
place.getPlaceTypes().contains(38) ||
place.getPlaceTypes().contains(67) ||
place.getPlaceTypes().contains(79)) {
where.setText(place.getName());
loc = true;
} else {
Toast.makeText(getActivity().getApplicationContext(),
badLocation, Toast.LENGTH_LONG).show();
try {
launchPlace();
} catch (GooglePlayServicesNotAvailableException | GooglePlayServicesRepairableException e) {
e.printStackTrace();
}
}
}
}
}
}
This code worked previously (3 hours ago) and now does not. Here is what LogCat says: (Android Studio)
04-21 15:48:02.320 5045-5045/com.siliconmindtech.trofi D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
04-21 15:48:02.680 5045-5124/com.siliconmindtech.trofi D/OpenGLRenderer﹕ endAllStagingAnimators on 0xa1a55600 (InsetDrawable) with handle 0xa185dff0
04-21 15:48:05.000 5045-5121/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
04-21 15:48:05.060 5045-5045/com.siliconmindtech.trofi I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#215c768a time:9757022
If anyone knows of a way to help with this that would be amazing, I know that Google PlacePicker is quite new but I am a novice Android Developer and feel like someone has a better understanding than I. Any and all help would be appreciated. If more information is required please let me know. We use GitHub so I have reverted all the way back to when it once worked, yet nothing changed, it still closes (the picker, not the app). I have enabled the Google Places API and Google Places API for Android in the developer console, no help there either. It gets to the "Updating your location" screen then stops.
EDIT: This is the entire LogCat, from launch (On a Samsung Galaxy S5) to the PlacePicker starting (One navigation prior to that action) then closing and returning to the app. Is this what you meant?
04-21 16:56:26.740 27318-27318/com.siliconmindtech.trofi D/ResourcesManager﹕ creating new AssetManager and set to /data/app/com.siliconmindtech.trofi-1/base.apk
04-21 16:56:26.910 27318-27318/com.siliconmindtech.trofi D/AbsListView﹕ Get MotionRecognitionManager
04-21 16:56:26.910 27318-27340/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
04-21 16:56:26.910 27318-27340/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Static: isShipBuild true
04-21 16:56:26.910 27318-27340/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Thread-13137-1066627414: SmartBonding Enabling is false, SHIP_BUILD is true, log to file is false, DBG is false
04-21 16:56:26.910 27318-27340/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
04-21 16:56:26.910 27318-27318/com.siliconmindtech.trofi D/AbsListView﹕ Get MotionRecognitionManager
04-21 16:56:26.940 27318-27318/com.siliconmindtech.trofi D/Activity﹕ performCreate Call secproduct feature valuefalse
04-21 16:56:26.940 27318-27318/com.siliconmindtech.trofi D/Activity﹕ performCreate Call debug elastic valuetrue
04-21 16:56:26.950 27318-27318/com.siliconmindtech.trofi D/AbsListView﹕ Get MotionRecognitionManager
04-21 16:56:26.970 27318-27350/com.siliconmindtech.trofi D/OpenGLRenderer﹕ Render dirty regions requested: true
04-21 16:56:27.030 27318-27350/com.siliconmindtech.trofi I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: ()
OpenGL ES Shader Compiler Version: E031.25.01.03
Build Date: 10/28/14 Tue
Local Branch: LA.BF.1.1_RB1_20141028_021_patches2
Remote Branch:
Local Patches:
Reconstruct Branch:
04-21 16:56:27.030 27318-27350/com.siliconmindtech.trofi I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-21 16:56:27.050 27318-27350/com.siliconmindtech.trofi I/OpenGLRenderer﹕ HWUI protection enabled for context , &this =0xa23090d8 ,&mEglDisplay = 1 , &mEglConfig = 8
04-21 16:56:27.050 27318-27350/com.siliconmindtech.trofi D/OpenGLRenderer﹕ Enabling debug mode 0
04-21 16:56:27.050 27318-27340/com.siliconmindtech.trofi I/System.out﹕ KnoxVpnUidStorageknoxVpnSupported API value returned is false
04-21 16:56:27.240 27318-27350/com.siliconmindtech.trofi V/RenderScript﹕ Application requested CPU execution
04-21 16:56:27.260 27318-27350/com.siliconmindtech.trofi V/RenderScript﹕ 0xa2377a00 Launching thread(s), CPUs 4
04-21 16:56:27.310 27318-27318/com.siliconmindtech.trofi I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#344b9848 time:13859270
04-21 16:56:29.700 27318-27318/com.siliconmindtech.trofi D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
04-21 16:56:31.850 27318-27318/com.siliconmindtech.trofi D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
04-21 16:56:31.970 27318-27318/com.siliconmindtech.trofi I/Places﹕ Got here!
04-21 16:56:32.300 27318-27350/com.siliconmindtech.trofi D/OpenGLRenderer﹕ endAllStagingAnimators on 0xa196d600 (InsetDrawable) with handle 0xaf7fc350
04-21 16:56:32.740 27318-27318/com.siliconmindtech.trofi I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#344b9848 time:13864703
The above LogCat is Verbose.
Solution: Don't be a newbie like me, I had forgotten to add my Google API Key to my android_manifest.xml... I apologize.
Just enable Google Places API for Android in your Google Developer Console.
Don't forget to specify your API key at AndroidManifest:
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="ADD_YOUR_API_KEY_HERE" />
I believe that when Google made changes to their API's on 04/20/2015 they modified the places API that the PlacePicker inherently uses. The solution that worked for me is as follows:
Go to your Google Developer Console (https://console.developers.google.com/project)
Navigate to your project if you have made one. If not go here: https://developers.google.com/console/help/
Navigate to "APIs & auth" then to "Credentials" on the left side of the console. I don't have enough rep to post a picture for guidance...
Create a new Key, this appears under Public API access in your Credentials window. You will need your SHA1 Fingerprint to receive the key. Directions that I used are here: How to get the SHA-1 fingerprint certificate in Android Studio for debug mode?
The location that you input your SHA1 Fingerprint should be in this format:
(Your Key, 20 Hex values separated by ":");com.yourpackage.yourapp
Copy your API Key that is generated. You will need to add the fingerprint of each developer in the same format above for it to work for other developers.
Add your key to your AndroidManifest.xml
<application ...
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_api_key" />
... </application>
Where the "#string/google_api_key" /> is the key that you just generated. Place it in your strings.xml file as such:
<string name="google_api_key">yourkeyhere</string>
Clean and Rebuild your project. Should be working now. I don't think I left any steps out... Please comment if I have.
I have the same issue. I add Google map key
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key"/>` in manifest file.
The Place Picker closes immediately. Then, i also add
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_api_key" />
The Place Picker shows, but when i open map, my app was force close, and log like below.
RuntimeException: The API key can only be specified once. It is recommended that you use the meta-data tag with the name: com.google.android.maps.v2.API_KEY in the <application> element of AndroidManifest.xml
at com.google.maps.api.android.lib6.d.fb.a(Unknown Source)
at com.google.maps.api.android.lib6.a.g.a(Unknown Source)
at com.google.android.gms.maps.internal.CreatorImpl.b(Unknown Source)
at com.google.android.gms.maps.internal.CreatorImpl.b(Unknown Source)
at com.google.android.gms.maps.internal.i.onTransact(SourceFile:62)
at android.os.Binder.transact(Binder.java:364)
at com.google.android.gms.maps.internal.zzc$zza$zza.zzj(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zzb.zzqs(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zzb.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onCreate(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreate(Unknown Source)
at android.support.v4.app.Fragment.performCreate(Fragment.java:1763)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:915)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1136)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1499)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:456)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
I try to remove
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key"/>`
but keep
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_api_key" />
And It's working well, now, and I don't know why.
replace your meta data tag in the mainfeast .. it works for me ..
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="YOUR ANDROID KEY" />
with
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR ANDROID KEY" />
good luck
I had the same problems using the Places API. At the end, I figured out that there are different Google Places APIs especially for Android. Consequently, the API-Key that I was using was simply for the non-Android version.
Generate your key using this link:
https://developers.google.com/places/android-api/signup
in my case GO to Google COnsole then Enabled API for Android Google Places, then Go to Manifest.xml and put this code under
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
and dont forget to put Google API key
How i fixed this error was when getting an API key (On Google Developers Page) , the location where you enter your package name enter your complete package name. This is available in your android manifest!
I am trying to run the NetworkUsage sample project app on Android Studio. I downloaded the project from NetworkUsage.zip and imported it into Android Studio. The project builds without a problem, but when it runs on the emulator, but ends up with a message in the UI: "Lost Connection" followed by "Unable to Load Content. Check Your Network Connection".
When tracing through the execution, I see that when onStart() is called, it calls updateConnectedFlags(). Within this method,
activeInfo != null && activeInfo.isConnected()
is a true statement, but execution of:
wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI;
mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE;
results in wifiConnected = false and mobileConnected being true. That seems a bit odd that the mobileConnected would be true since this is an emulator running. Afterwords, the method onReceive() in the class NetworkReceiver is called, but the following statement fails:
if (WIFI.equals(sPref) && networkInfo != null
&& networkInfo.getType() == ConnectivityManager.TYPE_WIFI) {
because networkInfo.getType() = 0 and ConnectivityManager.TYPE_WIFI = 1 (networkInfo is not null and sPref = WIFI). This results in "Lost Connection".
The only runtime errors I see when I run the project are:
03-14 11:28:36.078 2918-2918/com.example.android.networkusage W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
03-14 11:28:36.227 2918-2939/com.example.android.networkusage W/AudioManagerAndroid﹕ Requires BLUETOOTH permission
03-14 11:28:36.211 2918-2918/com.example.android.networkusage W/chromium﹕ [WARNING:resource_bundle.cc(315)] locale_file_path.empty()
03-14 11:28:36.267 2918-2918/com.example.android.networkusage I/chromium﹕ [INFO:aw_browser_main_parts.cc(63)] Load from apk succesful, fd=32 off=46092 len=2953
03-14 11:28:36.269 2918-2918/com.example.android.networkusage I/chromium﹕ [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.pak from, fd:33 off:228796 len:643667
03-14 11:28:36.404 2918-2918/com.example.android.networkusage E/chromium﹕ [ERROR:gl_surface_egl.cc(150)] No suitable EGL configs found.
03-14 11:28:36.404 2918-2918/com.example.android.networkusage E/chromium﹕ [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
03-14 11:28:36.404 2918-2918/com.example.android.networkusage E/chromium﹕ [ERROR:browser_main_loop.cc(940)] GLSurface::InitializeOneOff failed
03-14 11:28:36.714 2918-2945/com.example.android.networkusage W/chromium﹕ [WARNING:proxy_service.cc(901)] PAC support disabled because there is no system implementation
03-14 11:28:36.750 2918-2918/com.example.android.networkusage W/chromium﹕ [WARNING:data_reduction_proxy_settings.cc(403)] SPDY proxy OFF at startup
03-14 11:28:36.910 2918-2918/com.example.android.networkusage W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
03-14 11:28:36.948 2918-2918/com.example.android.networkusage W/AwContents﹕ onDetachedFromWindow called when already detached. Ignoring
I am running Android Studio on a Mac. What might be the reason that this sample is failing? Does anyone have experience with the ConnectivityManager that says that wifi does not work with an emulator? I would like to take advantage of this sample software.
I am working on an Android + Phonegap + jQuery-Mobile app and i am planning on using Pusher for implementing push notifications. I was testing the Pusher service using the getting started project from this link : http://blog.pusher.com/pusher-on-phonegap-for-android/
Project details :
Android API target 15
Cordova 2.3.0
Pusher JavaScript Library v1.12.7
jQuery Mobile 1.3.0 (final release)
I copied all the necessary .java files and .js files to my project. Here is how i instantiate the pusher connection :
var CONFIG = {
PUSHER: {
APP_KEY: 'my-key'
}
};
// Connect
var pusher = new Pusher(CONFIG.PUSHER.APP_KEY);
pusher.connection.bind('state_change', connectionStateChange);
function connectionStateChange(state) {
$('#connectionStatus').html(state.current);
}
// Subscribe
var channel = pusher.subscribe('my-channel');
channel.bind('pusher:subscription_succeeded', subscriptionSucceeded);
function subscriptionSucceeded() {
$('#subscriptionStatus').html('succeeded');
}
channel.bind('my-event', handleMyEvent);
function handleMyEvent( data ) {
// window.plugins.statusBarNotification.notify("You have a notification", data.message);
$('#pusher-data').append('<pre>'+data.message+'</pre>');
}
But once i run my project, i am unable to see any log entries regarding the Pusher connection but rather i see something like this in Logcat :
03-01 23:11:23.997: E/Web Console(3631): Uncaught TypeError: Object function (url) {
03-01 23:11:23.997: E/Web Console(3631): // get a new websocket object from factory (check com.strumsoft.websocket.WebSocketFactory.java)
03-01 23:11:23.997: E/Web Console(3631): this.socket = WebSocketFactory.getInstance(url);
03-01 23:11:23.997: E/Web Console(3631): // store in registry
03-01 23:11:23.997: E/Web Console(3631): if(this.socket) {
03-01 23:11:23.997: E/Web Console(3631): WebSocket.store[this.socket.getId()] = this;
03-01 23:11:23.997: E/Web Console(3631): } else {
03-01 23:11:23.997: E/Web Console(3631): throw new Error('Websocket instantiation failed! Address might be wrong.');
03-01 23:11:23.997: E/Web Console(3631): }
03-01 23:11:23.997: E/Web Console(3631): } has no method '__addTask' at file:///android_asset/www/pusher.js:1288
I am really stuck up at this point. Any help would be greatly appreciated.
The preferred solution here would be to drop the use of the WebSocket Java wrapper and instead use our HTTP fallback.
The new beta version of the Pusher JavaScript library is available via http://js.pusher.com/2.0.0-pre/pusher.min.js
Over HTTPs:
https://d3dy5gmtp8yhk7.cloudfront.net/2.0.0-pre/pusher.min.js
We need to do additional testing in PhoneGap but the HTTP fallback should be a much better solution.