I´ve set up a clone of this repo, and got it up and running at heroku:
https://github.com/dondido/webrtc-video-room
.. after trying about 15 others that I had various problems with. It works great under Windows in chrome and firefox, but when trying to access it with a webview on android in the app I´m developing (in B4A), I see only a grey screen. I do however manage to succesfully use https://appr.tc which is a very similar demo from google in the webview, so something should be amended in the android code. I think it relates to navigator.mediaDevices.getUserMedia, but I really don´t know what needs to be changed for this to function. I´ve been sitting and comparing the git repo for mentioned appr.tc but can´t nail the part that I have to amend. I am aware that I can just clone the appr.tc repo instead, but this one also needs GAE, which I want to avoid.
Any help?
Thanks!
I am looking for a way to inspect an running Android application layout (preferably, by dp/sp), like something as you can see in those Google Chrome/Firefox/Safari live HTML inspector feature.
I have an Android app which needs to follow a strict design guideline and comparing between the guideline and the application itself is quite cumbersome and taking a lot of time to jump around multiple source codes and layout .xml(s) to check a design conformity, so it'd be very efficient to have such debugger.
I should also mention that the app needs specific Android devices to run (unable to run on an simulator or unapproved devices).
Your ideas would be greatly appreciated.
Thank you.
You can test this built-in feature in android studio run the app and after click on the layout inspector "
I'd like to run a Javascript snippet at the point where a specific page (e.g. facebook.com) has finished loading to click buttons automatically (e.g. submit form automatically).
So I'm looking for a 'Hello World' Addon for Firefox mobile, that will display 'Hello world' using javascript (alert('Hello World');) when a page has finished loading everything (something using addEventListener('load', ...) probably)
More Info:
I have tried Fennec guides and dissected a few Fennec addons from the market, but I'm at the absolute beginning when it comes to addon development and am wasting a lot of time on this.
Any (straightforward and easy) resource on this would be really helpful as well, I know there are some Greasemonkeyscript-to-Fennec (e.g. http://geo.inge.org.uk/grease-vervet.php) compilers out there, but they're outdated as far as I can tell.
this is solved by newer versions of Firefox on Android where tampermonkey can simply be installed:
https://addons.mozilla.org/en-US/android/addon/tampermonkey/
for anyone that is getting to this question looking for answers.
I need to do some menial batch tasks on my phone, and I don't want to jump through all the hoops of making an "app" with a GUI and all that just to do them (the tasks are of the type you'd hack together in BASH in five minutes on a sane system). I can't seem to find any place on the net that explains how to simply make an ordinary program (in any language, but Java is OK if that eases interaction with Android) with access to the Android API that can simply be run by SSHing into the phone and running it as a normal process. No need for an APK package, no need for a GUI, no nothing. This should be the simplest thing in the world, but every example out there seems to be first and foremost concerned with making a GUI and working with Eclipse and the SDK instead of doing the basics first.
Any tips?
(I know this is probably borderline SuperUser, but then again, there's a programming question at the bottom: How do you make an ordinary (Java) program that can be run from the terminal on an Android phone and still use the API?)
Here : Running a shell script on android device using adb
and : https://play.google.com/store/apps/details?id=stericson.busybox&hl=en
and : http://forum.xda-developers.com/showthread.php?t=537827
and : http://strawp.net/archive/recipe-for-a-decent-bash-shell-in-android/
and : http://digitaldumptruck.jotabout.com/?p=938
I can't seem to find any place on the net that explains how to simply make an ordinary program (in any language, but Java is OK if that eases interaction with Android) with access to the Android API that can simply be run by SSHing into the phone and running it as a normal process.
That's because it's not especially important to the bulk of Android users or developers.
How do you make an ordinary (Java) program that can be run from the terminal on an Android phone and still use the API?
You are welcome to use the Scripting Layer for Android to write some scripts, but you have limited access to the Android SDK, and they cannot "simply be run by SSHing into the phone". This is supported by the SL4A team.
You are welcome to experiment with the dalvikvm command, though off the top of my head I do not recall whether or not it is available on production devices, and I do not know if it can "simply be run by SSHing into the phone". And, bear in mind that using this is completely unsupported.
You are welcome to write your own C/C++ code for ARM (or whatever CPU architecture your device runs). This "simply be run by SSHing into the phone" but has no access to the Android SDK.
I still cannot believe that that kind of stuff isn't on the first page of every Android development introduction out there.
There are over 200 million users of Android devices. What percentage of those users do you think want to
"make an ordinary program... with access to the Android API that can simply be run by SSHing into the phone and running it as a normal process"? 0.01%? 0.001%? My money is on 0.0001%.
The "first page of every Android development introduction out there" should be focused on stuff that matters to closer to 100% of the user base. You, of course, are welcome to build up your own site focused on this sort of thing, to cater to those users who are interested in creating these sorts of programs.
From http://git-annex.branchable.com/design/assistant/blog/day_184__just_wanna_run_something/:
While I already have Android "hello world" executables to try, I have
not yet been able to run them. Can't seem to find a directory I can
write to on the Asus Transformer, with a filesystem that supports the
+x bit. Do you really have to root Android just to run simple binaries? I'm crying inside.
It seems that the blessed Android NDK way would involve making a Java
app, that pulls in a shared library that contains the native code. For
haskell, the library will need to contain a C shim that, probably,
calls an entry point to the Haskell runtime system. Once running, it
can use the FFI to communicate back to the Java side, probably. The
good news is that CJ van den Berg, who already saved my bacon once by
developing ghc-android, tells me he's hard at work on that very thing.
and some specific advices in the comments below:
See http://kevinboone.net/android_nonroot.html for info on where in
the android filesystem you have write, exec ability.
Basically you have these abilities in /data/local from adb shell (and
in debuggable app's folders using run-as with adb shell), and in
/data/data// for each app (for example the terminal emulator's
data dir when using the terminal emulator).
...
http://git-annex.branchable.com/design/assistant/blog/day_185__android_liftoff/:
Thanks to hhm, who pointed me at KBOX, I have verified that I can
build haskell programs that work on Android.
http://kevinboone.net/kbox.html:
KBOX [...] gives you the terminal emulator, a
decent set of Linux utilities (supplied by busybox), ssh and rsync
clients and servers, and a few other things. In addition, there are a
number of add-on packages for expanded functionality.
Well, it's just about running an executable on Android, and not about writing an executable that would access Android API...
I can't seem to find any place on the net that explains how to simply make an ordinary program [...] with access to the Android API that can simply be run by SSHing into the phone and running it as a normal process.
An answer, translated from a note by vitus-wagner:
Termux is an advanced terminal emulator plus lots of Unix-like software with command-line interface (in packages managed by APT). Actually, not only CLI (command-line), but also GUI as well (though the GUI software not tried yet).
Unlike the way of the various popular "linux deploy" (which make something like a container, at least a chroot, with things installed into directories according to the traditional filesystem hierarchy), Termux seems to aim at integrating into the host system. For this purpose, it has a plugin, Termux:api which is able to do a lot of interaction with the system: open a file in a native Android app, send an sms, take a picture with the camera, or even say something by means of the system TTS engine.
There are many more addons -- see wiki.
(A side note. An integration like that could be expected--if not from MSYS--from GnuWin32, but there is nothing close to Termux under Windows w.r.t. the degree of integration.
However, for some strange reason, people are asking much more about how to make it more "Linux-like" on the forum, rather than how to use it effectively to solve smartphone-specific tasks...)
A toolkit for cross-compilation is available, so that one can try to package his favorite software.
Actually, it is able to do compilation locally on the device, but it seems not to be able to make a package locally.
Some things to know:
One needs Hacker's keyboard or something similar. One can't live here without Esc, Tab, Control. Or one could try to learn the Touch Keyboard.
vim ran with an encoding different from utf-8, and the Russian letters were displayed incorrectly. So, set encoding=utf-8 had to be written in .vimrc.
ssh to another computer at home couldn't login. The reason was simple: it used the username u0_a95 instead of one's usual username. (One can write User your_username in .ssh/config to permanently "fix" it.)
I'd recommend doing a research on XDA-Developers board
I have a basic flex mobile 4.6 app and it works fully fine in the flash builder built-in emulator using an android device profile like aria...
It also launches fine in the android emulator but one particular view shows blank (and this view works fine in flash builder).
Before I get in to many details of the view are there any categorical gotchas that can be causing this?
I can't seem to get the trace statements from the app to show in 'adb logcat'. It seems I need to compile a debug version of the apk but I don't know how to do this. I use the 'Export Release Build' from the Project menu in flash builder and it doesn't seem to have an option for debug=true.
The problematic/blank view basically uses the stagewebview and iotashan's oauth library to call linkedin rest apis... A different (and working) view can make restful web service calls in the emulator fine, so it doesn't seem to be an internet permission.
The source code contained in the problematic/blank view is almost identical to the tutorial found at: http://www.riagora.com/2011/01/air-and-linkedin/
The differences are:
a) The root tag is a View
b) I use StageWebView instead of HtmlContainer
c) I use my own linkedin key and tokens.
I would appreciate it if someone can provide me with some pointers on how to troubleshoot this situation. Perhaps someone can tell me how to debug the app while running in the emulator (I think I need the correct adt command arguments for this which matches the 'Export Release Build' menu but adds the debug param?)
Thanks for your help in advance.
========================================
Comment added after some more debugging:
OK - through some Fiddler profiling I am observing that the http tunnel created to api.linkedin.com:443 when debugging inside of FlashBuilder vs inside of the Android emulator is different. Specifically, the following two lines of code create different HTTP headers:
var request:OAuthRequest = new OAuthRequest("GET", requestTokenUrl, {oauth_callback:'http://www.xyz123.com'} , consumer, null);
loader.load(urlRequest);
While in Flashbuilder the URLLoader seems to create the request with proper headers like Host:api.linkedin.com:443,Content-Length:0,Connection:Keep-Alive, etc..., inside the Android Emulator there is only one header Host: 216.52.242.83:443.
Why on earth would this happen?