I installed ARC_Welder to test run my android apps. App runs , but I was trying to get logs. I read this article : https://developer.chrome.com/apps/getstarted_arc .
Tried running -- plugin.shell('adbd') in JavaScript console (chrome://inspect/#apps) .
But i'm getting this error :
Uncaught ReferenceError: plugin is not defined
Same thing happened when tried running : plugin.shell('logcat');
I'm not a chrome javascript developer. please help me understand where i am wrong..
I just had the same issue, the instructions on the page you mentioned are correct, but not very clear.
You should:
Open your debug APK in ARC Welder and run it
Open logcat in Android Studio, (or what ever tool you normally use to view logcat).
Open Chrome and type "chrome://inspect/#apps" in the address bar
Hopefully you see your App name listed, click the 'inspect' link for your app.
In the Javascript Console that appears type "plugin.shell('adbd')" and press enter.
Now go back to Android Studio and you should see a load of log messages in the logcat, filter by your app name and hopefully you are good to go.
Are you sure you opened your apps page by clicking the "inspect" link from the "chrome://inspect/#apps" page?
The error you see suggests that you are typing it into some javascript console that isn't for an app view. The "plugin" name is only defined for use by Chrome apps and extensions, and not arbitrary web pages.
Related
I followed all the steps from both the articles mentioned below
https://hackernoon.com/react-native-deep-linking-for-ios-and-android-d33abfba7ef3
https://medium.com/react-native-training/deep-linking-your-react-native-app-d87c39a1ad5e
After the app gets installed on my phone, I tried opening the app from the browser by giving the URL as peopleapp://people/1 format. Instead of opening the app, the browser opens Google search to search for the above.
Any idea, how to solve this issue ?
Please note that I am using Android
Your issue is caused by the fact the deeplinks work differently on iOS and Android.
It is true that on iOS you can open a deeplink by typing the link into the browser and it will cause the app to open.
However, for Android to open a deeplink you need to one of three things as it will not open from typing the link into the browser.
Edit Configurations
The first method is picked exactly from the second tutorial that you mentioned. This is to use the Edit Configurations options in Android Studio.
That is all we need as far as configuration goes. To test this out, open Android Studio. Open Run -> Edit Configurations and change the launch options to URL, passing in the following url: peopleapp://people/1
Use a Weblink
The second option is to it from a URL that is embeded in a webpage. The URL should be embeded in an a tag using a href in the following way
click me
You then browse to the webpage and click the link. That should open the deeplink.
Deeplink Application
You can use a third party application from the play store that will allow you to open the deeplink. There are many to choose from. You can always give https://play.google.com/store/apps/details?id=com.manoj.dlt&hl=en_US a try it seems to have good reviews.
I've encountered that links like:
intent://#Intent;scheme=somescheme;package=com.some.package;S.browser_fallback_url=market%3A%2F%2Fdetails?id=com.some.package;
do not work correctly in Android 7 (7.1.1) systems, while in previous versions they work as intended. By "do not work correctly" I mean that if we have a required app installed to open this link, then everything goes as it should and this app opens when we click this link. But when we don't have the required app, a correct redirect on the fallback url is not processed: we're getting on a search results page or a blank page with a message about an incorrect redirect in a web browser.
Trying to find out how to solve this problem (maybe just by modifying the deep link), any suggestions will be appreciated.
I am trying to get our Android app to run under Chrome using ARC Welder on a Mac. The app is crashing soon after startup and I'm trying to look at the Logcat to see what is going on. I have found the following instructions in another thread that discusses how to do this.
Open your debug APK in ARC Welder and run it
Open logcat in Android Studio, (or what ever tool you normally use to view logcat).
Open Chrome and type "chrome://inspect/#apps" in the address bar
Hopefully you see your App name listed, click the 'inspect' link for your app.
In the Javascript Console that appears type "plugin.shell('adbd')" and press enter.
Now go back to Android Studio and you should see a load of log messages in the logcat, filter by your app name and hopefully you are good to go.
My problem is after step #3 I don't see my app listed when going to "chrome://inspect/#apps". I only see the ARC Welder app listed (and sometimes even that is not there). Hence there is no "inspect" link to click.
Any idea what I'm doing wrong? How can I view the app's Logcat when running under ARC Welder?
I did finally get this figured out. The app appears on the chrome://extensions page and it is there that I can "inspect" it. It also appears that you can only do a plugin.shell('logcat') while the app is actually running. So if the app is crashing at startup, you need to put a delay in so you can enter this command before the crash actually happens.
We recently add Google Deep Linking to our Web and our Android App.
In our Web page and in the Android App, we work with Collections of Post (quotes).
This is the Android App
We are having a lot of Crawl errors in the WebMaster page. The kind of "Content mismatch" error.
This is an example of Web Content and Android App content of one error:
This is the link of the Web page (a post inside the 'Postales Navideñas' Collection)
And this is the link for the deep linking to our Android App (to the same 'Post')
android-app://com.frenys.appexpress/frenys/?c=1012828&p=6063811
We believe that the content is the same, when the 'deep link' starts the Android App, the same 'Post' that shows in the Web Page is showed in the Android App.
No other content is showed first (no dialogs, no other screen, no splash screen)
The WebMaster Site shows that the detail of the error is that we are bloking resources on the App page, and the the one url that shows as blocked by the Android App is:
https://graph.facebook.com/v2.1/xxxxxxxxxxx?format=json&sdk=android&fields=supports_attribution%2Csupports_implicit_sdk_logging%2Cgdpv4_nux_content%2Cgdpv4_nux_enabled%2Candroid_dialog_configs
(the "xxxxxxxxxxx" in the Url is our Facebook App Id)
That is an Url used by the Facebook SDK for Android (we have a Share via Facebook in the Android Screen of the 'Post'),
We don't block this resource, is an internal resource of an SDK outside our App.
How can we remove this error?
Thanks,
Valeria
Edit: (12/12/2014)
Hi,
We'll still have these errors of 'Content Mismatch', but there are some things we discovered and they can be helpful.
One:
We carried many tests, and we realized that in our URI link for the 'deep link' to the Android App we use 2 parameters (android-app://com.frenys.appexpress/frenys/?c=1012828&p=6063811), and there seems to be a bug in the adb (using the "adb shell am start -a" command). We initially test this link with the 'Qr Code tool', and with that tool we enter to the same content. Thus, both parameters were taken into account. BUT, with the 'adb' tool, we found out that the adb only took ONE parameter of the URI. Content thereof was different.
Our errors of 'mismatch content' were less after changing our Uri.
Two:
With other errors (Example: "Your apps back button does not send users back to search results") we discovered that Android documentation about deep linking sometimes not reflect the functionality that the WebMaster expects. That caused us to have other errors detected by Webmaster.
Maybe this information can be helpful. For us with this 'deep linking' errors is to try and see in the next days if it works.
Let me start by saying StackOverflow has been a great tool for me as I learn Android development.
What I am trying to figure out is how to click on the ‘OK’ button when I am using the default Android web browser and the following message appears: (Sorry, I can’t post pics yet)
“You are using an unsupported version of Mozilla.
Please upgrade your browser to the latest version before logging in.”
I can’t use Chrome Debug because the “unsupported version” message doesn’t appear when I use the new version of Chrome. I don’t want the users of my app to have to download Chrome to be able to use my app.
I know I can use “document.getElementsByTagName('OK Button Element Tag Name').click();” but how would I find the Element Tag Name without the use of Chrome Debug?
Thanks in advance,
Ken