How do I use Chrome's Developer Tools to catch the end destination for a click-event? - google-chrome-devtools

As a policy for security I want to stay logged-in by default to my social media networks, but I do not want external desktop links to open in my browser that is logged in. So my default browser-mode is --incognito. I have an issue with Chromium's Signal App crashing when my browser is set to default in incognito mode. This much I've figured out.
I want to have a bookmark that I can manually run in my logged in browser to run the Signal app.
The Chrome web store provides one such link. I can run signal by running Chromium outside of incognito mode and clicking in the webstore LAUCNH APP. I would like to use the Developer Tools to catch that even and know what the end-url is that triggers the Signal App.
How do I go about introspecting that?

I don't really understand the specifics of your use case, but going off of the title of your question, perhaps this will help:
Set an event listener breakpoint for Mouse > click.
Click on the element to trigger the listener(s).
Step through the code.

Related

Enable location detection in TestRigor

could you please explain how I can enable location detection in the TestRigor browser? For user it looks like browser pop-up, but rigor skip this pop-up and I receive only errors which caused by unavailable location (important for my project). I mean this pop-up
testRigor automatically accepts location popups and other browser-based permission requests. There is no need to add an action in your custom steps to handle them.
Update: testRigor has updated this to allow you to click on these browser pop-ups. You can click these by using OCR only if you have screenshots enabled at the OS level.
To do this, you can check it in Settings->Advanced, then scroll down to Desktop Web Fine Tuning and select Use OS (more features) from the How to take screenshots: dropdown.
Once that is done, you can use a command to click on the browser pop-up. For the one in the picture, you can say the following:
click "Allow" using OCR only using the mouse

Fire Chrome Alarms from background service when using cca Google Chrome apps

Experimenting with Mobile Chrome apps API: ( https://github.com/MobileChromeApps/mobile-chrome-apps )
What I'm trying to achieve is the registering of my chrome alarms without having to crudely start the apps' main activity as this causes a bad user experience.
The challenge:
I have specified a chome.alarm which gets successfully registered when I open the app ('cca run android ' for example). These alarms are specified in a background.js file, which is declared as a background script in the manifest.json file.
I wanted these to be registered automatically on boot, therefore I implemented a background service and thought I could simply call the app to register the alarms specified in the background.js file. However, the only way I can find thus far to achieve this, is via a call to launch the apps main activity via an Intent from within the background service as explained in more detail below.
On boot, my background service simply invokes:
//Launch main activity..
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.company.appname");
startActivity(LaunchIntent);
The above launches the app into its main activity and the aforementioned chrome.alarms are registered as desired. Happy days! A massive downside to this, of course, is that no user wants the full blown main activity window to open on boot.
Please advise if there is a less clunky way to have the chrome.alarm specified in background.js registered at boot by a background thread. I do not wish to open the mainActivity of the app, yet this is currently the only way thus far I can see to get them to be registered. It is preferable not to register these alarms from within the Android SDK as I intend to stay as close to using web APIs and want to use background.js as the hook to do this keeping things in-line with chrome web apps as-well-as the android platform.
What I have done:
A cca (chrome mobile web app) app which registers a background service natively (I extend BackgroundService) as a plugin and register this to run at boot time. This is the only 'native android code' in order to load the app at boot-time.
Upon booting android, this background service then simply issues a startActivity(LaunchIntent) in order to open the app. In doing so, my chrome.alarm specified in my background.js file get registered successfully. If I don't do this, my chrome alarm specified in background.js do not get registered until I manually open the apps main activity. Therefore I use the backgroundService to open the apps main activity.
This is not at all ideal, I would simply like to somehow have my chrome.alarms registered without crudely having to launch the apps main activity window.
Is there a call which I can place in my BackgroundService to have only the chrome.alarms contained in my background.js file read and registered to fire?
Thank you for your time.
First, thanks for using Chrome Apps for Mobile! (Note: I work on the project)
Sorry that our current bootstrap is "crude" and "clunky", and we agree that it is. You can track this issue for progress on our effort to replace our current Background-scripts-embedded-in-main-Activity-webview strategy with a real background service and multiple window support. Basically you've summarized exactly our plan and existing limitations.
This work is actually scheduled for the near term, and will certainly be done before the end of the year.
As well as chrome.alarms, this feature is quite important for chrome.gcm and chrome.tcpServer (among other reasons).

iPhone - detecting crashes, prompting user to send crash log

Are there any libraries out there that would allow end users to send crash reports to developers?
For example, a user is using my app. It crashes. On boot up, a library loads before everything else and notices there is a crash report and prompts the user to send the crash log to me.
Is this possible? I think the Facebook app does something like this.
Thanks!
You actually have access to crash logs in iTunes Connect. Log in, go to Manage your Applications, pick an app, "View Details", and you should see a "Crash Reports" link to the right of the details pane.
That said, Apple only refreshes these daily, and will only give you access to reports of the most common crashes. If you want finer control, or need the user to submit reports directly, try plcrashreporter. You could ask the user for a submission this way, or just go ahead and automatically send all reports to your server. From the plcrashreporter site:
Introduction
Plausile CrashReporter implements
in-process crash reporting on the
iPhone and Mac OS X. The following
features are supported:
Implemented as an in-process signal
handler. Does not interfer with
debugging in gdb.. Handles both
uncaught Objective-C exceptions and
fatal signals (SIGSEGV, SIGBUS, etc).
Full thread state for all active
threads (backtraces, register dumps)
is provided. If your application
crashes, a crash report will be
written. When the application is next
run, you may check for a pending crash
report, and submit the report to your
own HTTP server, send an e-mail, or
even introspect the report locally.
Another alternative is HopToad - they host the site that will accept the crash reports and notify you.
iOS 5 and later
Tapping Settings > General > About > Diagnostics & Usage will allow you to choose between Automatically Send and Don't Send.
iOS 4 and earlier
By default, opting in is a one-time decision. If you'd like to change your decision, you can reset warnings for your iOS 4 or earlier device so that you will be asked again.
How to reset warnings within iTunes
Connect your iPad, iPhone, or iPod touch to your PC or Mac.
Wait until your device has appeared on the left side of the iTunes window under Devices.
Right-click (Mac or PC) or Control-click (Mac) the icon for your device.
From the shortcut menu, choose Reset Warnings:
The next time you sync after resetting warnings, you should see:
To disagree and stop sending Apple diagnostic and usage information, click No Thanks.
If you don't see the window above
Disconnect your device from your computer.
Open an application on your device.
Press and hold the Sleep/Wake button until the red slider appears, and then press and hold the Home button until the application quits. If you're using iOS 2.x or earlier, press and hold the Home button until the application quits.
Connect your device and sync it with iTunes.
The option to agree or disagree to diagnostics collection should appear again.
Chearz;)
Another alternative that we have been using at my company is Crittercism - http://www.crittercism.com/. They have been very responsive to feature requests and have really helped us prioritize which issues to address.
Their SDK also has the functionality I set out to look for so long ago! :)

iOS 4 Location Service Prompt Dialog Doesn't Show Up

I'm experiencing an issue with how iOS 4 manage Location Service. Previously, when the location service is disabled, any application that uses location service will prompt the user to turn it on. However, in iOS 4, it didn't prompt that dialog box and just stays quiet. Is there a way to call the default dialog box which ask the user to turn on the location service, or did they remove that and requires the developers to create their own dialog box?
If the user doesn't want any apps to know their location, you shouldn't nag them. The user can also disable location services for specific apps.
There is a way to detect this behavior with Javascript in the browser - the error returned has a different code and message - so I imagine that there's a way to do this with an actual app as well.
Not an Obj-C coder, though, so can't actually help out with details. :)

Possible to alert server to iphone settings change?

I'm working on giving our users context-specific PUSH notification settings, similar to what Facebook has in their settings menu.
As far as I can tell though, there's no way to actually notify our server of these changes until the user actually launches the app.
Is this correct? Is there any mechanism provided for immediately alerting our servers to a settings change?
That's correct: you can't detect changes made in the settings app until the next time your app launches.
The closest option to what you're describing would be to put the settings in your app somewhere and notify the server from there.