Is there a way to get another device to access that url without having to type it man - Android Q&A, Help & Troubleshooting

Hello developers, best regards from Venezuela.
This question will be long because I am providing a lot of detail, so this question is as clear as possible.
Brief introduction.
I have created an app that runs on Android devices, this app allows you to share files between devices that are connected to the same WI-FI network. but with a different methodology to that used by apps that are intended to fulfill this same purpose.
On the device where my app is running (which we will named device one), a url similar to http://192.168.1.102:7898 is generated, and said url must be entered in a web browser installed on the device with which you want to share the files (which we will named device two).
The main purpose is to offer a way to share files between devices, using WI-FI. without the need for device two, my app has to be installed.
You can find more information in https://labs.xda-developers.com/store/app/com.tecnoelias.ipfiles
...
So far everything works fine. But, it is annoying that every time someone wants to share files using my app, on device two, they have to enter the url described above. keeping in mind that said url will change as the WI-FI router decides, and therefore, you should not use shortcuts to the url (bookmarks or navigation history).
Having said all this, the following question arises.
Is there a way to get device two to access that url without having to type it manually by the user?
To accomplish this, three ideas occurred to me.
1: Generate a QR code in the app. but this requires that on device two, an additional app is installed that can read QR codes. which violates my purpose.
2: Implement in the app, a mechanism that allows you to find other devices that my app is working on, and in this way, interact with those devices (through my app, similar to how other file transfer apps do). This is a good idea, but it nevertheless requires that my app be installed on both devices.
3: My third idea and the one I would like to implement is the following:
On device one, it will open my app and then activate it.
When the app is activated, the app will search for other devices that are connected to the same WI-FI network, until it finds device two.
If successful, a SOMEWHAT will be sent programmatically to the device two, that SOMEWHAT can be, a message, a bit, a data packet, or anything else that helps to realize this idea .
After device two receives that SOMEWHAT, it will show a notification or a pop-up window, which will allow access to the url generated in my app (on device one).
Consider two things. 1: Additional app MUST NOT be installed on device two. and 2: Because device two can be running any operating system, the SOMEWHAT will be a different mechanism for each operating system, (operating systems can be, Android, IOS, BlackBerry, Symbian, Windows Phone, Windows, Linux, Mac, among others).
If for example, device two, runs Android 10 (not rooted), and has the most common applications installed, which can be: WhatsApp, Facebook Messeinger, Google Play Services, other Google apps, and system applications.
My thought is that you should be able to use one of those apps, to receive the url, and after clicking on that url, the web browser will open, and then it will load the corresponding webpage (which in this case, is to access the files shared by device one, through my app).
Any idea?
You can give me your opinion, or you can just tell me that this can't be accomplished.
Any response or suggestion are appreciated.

Related

[Q] Can app inventor apps write or read text to /from sd card?

I have been writing an app with app inventor, for my own use but I think it could be of use to others. It is very simple, you type in a cosmetic or a food ingredient name and it tells you all about it (for example if the ingredient has any negative health effects or contraindications).
Currently the app takes an input and essentially does an IF the user typed in "this text" then show them "this text" but that means a lot of IF THEN commands.
I only ever tried BASIC programming and I see that app inventor seems to have no equivalent to a file or write command whereby I could store the database of ingredients on the sd card and search that for information to display to the user.
As it stands the app is nearly five megabytes in size already due to having to store its data internally within the program, is there a way a newb like me could use app inventor to simply search from and display from a text file?
Dave
why don't you use a database (TinyDB) instead of all those IF.
Try looking at this tutorial
Code:
http://appinventor.googlelabs.com/learn/tutorials/textgroup2/textgroup2.html
Thank you
I looked into tinydb, I understood it had a limited entry limit and didn't see the page you linked to when searching before so will study that as it looks like what I may need.
I have one question though, I am a newb so excuse me if this is obvious.
I am writing the app using the emulator to test it. As I understand it the tinydb database is only accessible by the app that creates it and so my app will need a routine in it where I can manually enter the data, but then surely each time I test run it I shall have to re enter all that data as apparently the emulator would wipe the database on each re run?
If tinydb cannot store data unless entered from within the program accessing it doesn't that also mean that when packaged the database would be empty until someone typed in data which would defeat the object of it being a searchable database of pre stored data?
Dave
EDIT: According to google developers at googles forum "TinyDB is persistent ONLY when you've packaged and downloaded your app.
When you are developing with the phone connected, and you quit the appinventors app -- or disconnect the phone and restart -- the phone treats that as a completely new application. " which means that the only way to get my data into tinydb file is enter it when packaged and on my phone. But then every user who installed it would have an empty database, so seems canonly use those if then statements after all
I've never used app inventor, so I'm not talking from experience here, but couldn't you package an XML file with the data in it? That way, future updates to the data could simply include an enhance XML file.
Like I said - I don't know app inventor. It's just a thought.
Thanks to the replies here, along with some help and examples at the google groups coffee shop forum, I found the information I need that should enable me to set up a custom tinywebdb database and on first run of the app populate this data from there into a local tinydb database for subsequent use
Dave
If you have a link, Dave, then share it. I need some info on the tinydb too.
I'm in the same boat hear, do you happen to still have a link for any info you obtained on this Dave?
This explains everything:
http://appinventorapi.com/program-an-api-python/

[Q] How to configure and deploy a large scale android installation (2.3.3.)

Hi,
I am about to assist in deploying a large amount of android device. The requirement is, that the devices (700+) need to be charged, configured and provisioned with the relevant applications for the end-users before delivery.
Device info:
Android 2.3.3
Samsung Galaxy SII
This is not windows mobile, so I am unsure if I can code/design a solution to avoid this enormous manual task.
Is it possible to code something for an sd-card that will be automatically triggered on insertion (as on WM)? This would then provision the device etc.
Is it possible to bypass the initial prompts - To my knowledge you will be prompted for entering the info for your google accounts?
If above is not possible, do I then need to create 700+ google accounts?
Hope someone can help
Brgds
It can also be via an active sync (ish) connection using a computer du provision the device?
A suggestion I received from another forum, was that I could: Make an update.zip for apps .Copy on SD card .Boot in recovery . Apply update.zip.
Would this be a feasible way to go?
odaugaard said:
A suggestion I received from another forum, was that I could: Make an update.zip for apps .Copy on SD card .Boot in recovery . Apply update.zip.
Would this be a feasible way to go?
Click to expand...
Click to collapse
We just deployed 100 EVO 4G's prior to the deployment we sent a mass email requesting the users create their own Google account and email us the info so we could setup their new phone with email and corporate email access. It took awhile to setup 100 android devices but it went smooth.
Sent from my PC36100 using Tapatalk
You can use SureMDM from 42Gears for mass provisioning, application deployment and password policy enforcement on Android devices, including smartphones and tablets.
It does not require Google accounts. Install the agent directly on the devices and then use the web-based console to perform all of the above actions from one place. For e.g. you can push an apk on hundreds of devices with a single click.
On non-rooted phones installation of .apks will prompt the user to continue the action.
Free trial is available on the website 42Gears dot com
Similar situation here and am fielding any suggestions or ideas if things have changed in the last several months regarding deployment.
Scenerio:
Deploying approx 200 Asus Transformers in an educational setting
Wish List:
Setup all units using the same Google account, populate static name on the lockscreen, install 3 specific apps on each and the ability to identify each one individually on the market for individual app install by an "administrator".
Currently we are doing each unit manually and then having to wait a few minutes for the Market to populate the new unit and then changing the nickname to the bldg/room number. If we don't wait for the Market to refresh for the new device they will all show as Asus Transformer TF101 and obviously we will not know which device to send specific apps to when they are requested.
There just has to be a better way! I checked out SureMDM and it has a lot of features that we really don't need and it doesn't appear to accomplish what we do need.
Any suggestions or comments would be greatly appreciated!
I know this is an old thread, but what about rooting and building a custom ROM for each unique device to let it do what you want? I'm thinking of doing something similar at the moment.
stephendt0 said:
I know this is an old thread, but what about rooting and building a custom ROM for each unique device to let it do what you want? I'm thinking of doing something similar at the moment.
Click to expand...
Click to collapse
Probably would work although Google now has a way to streamline deployment:
unfortunately I cannot post the direct link but goto developer dot android dot com/edu

[Q] Phone Audit with desktop application

If anyone is familiar with Speccy for the PC they know more or less what I am looking for.
I am looking for an app that does a thorough audit of a phone (Android platform) but not only displays it on the phone (plenty of apps do that). Id want it to export the audit to a file that can then be opened on a desktop application with a easier to navigate and study interface.
Currently like I said there is a number of applications that can do part of this as an added feature, but I have not seen any dedicated app to do an audit of the phone, things from programs, spaced used, network, hardware, permissions for particular programs, etc. Id like it to be as thorough as possible, but to be viewable in a reasonably ok interface on a desktop.
Browser maybe preferably for the linux and iOS users so that it isn't tied down to one Operating system.
Any ideas of something like this, or anyone working on something similar?
sorry for reviving this thread but I'm interested as well.

Serve http URI locally

I have an idea to integrate the S-Note app with the rest of my Note 3 (Android 5.0 rooted) file system using its undocumented feature of auto-converting URL-like text into clickable links. In a nutshell, I want to click such a link (it recognizes http:// and ftp://) pointing to a local file on my device and have that file displayed in one of the apps supporting it. The obvious way to do that is installing a local http server.
That worked to some extent as expected. However, the webserver app I've found on the Play is in java, have a lot of advanced features I don't need, and thus consuming too much of resources to keep online 24/7...
My question is: what would be the best modern way to achieve what I want? E.g. a small native code single threaded daemon I can autostart on the system's restart to serve my files?
I saw the Native Android Web Server 1.1 but it's not working anymore (see that thread for details).

How to find Info/Errs from an Android App Crash to steer toward App's bad Settings?

I'm a long time developer but brand new to Android, with my having past experience developing in Unix systems as well as a lot using Cygwin in Windows. I have a newly-installed App that seems popular called 'C Locker'. So far, I've just got the Free version because I'm trying it out to see if it does what I need. Unfortunately, it's now crashing with the Settings that I've enabled, and as a general developer, I'm interested in seeing if I can glean information from the Bugreport (or whatever else I can use...perhaps even gdb on the device itself?) to help me know what specific Settings might be the problem being that there are so many of them and I would prefer to gain some type of help from my phone in figuring out what the bad settings might be that I've enabled that are causing the problem rather than to spend all day flipping them around. I've already scanned through the Bugreport after uploading it to my computer, examining all of the references it makes in there to "com.ccs.lockscreen" with this apparently being the process name for the C-Locker program. I've seen indications in there where it indeed shows that it has crashed, but I couldn't yet discern if it is able to give me pointers as to what the cause of the crashes might have been. Is that possible to gain such information out of these Bugreport files? Or is there a way to run it directly in gdb on my device to perhaps see the stack at the time that it crashes, for which the names provided might help to discern what specifically it was trying but failing to do at the time? If it helps, as an intended future Android developer, I've already gotten Android SDK set up on my computer, although I haven't yet really used it much to speak of for anything. I also have adb working from my computer to the smartphone and even have rooted it using a rare method being that I have an older phone purchased years ago via Amazon that I didn't activate until about a month ago. (It's an LG G4 VS986 version 13B so I couldn't use the popular rooting method for version 11A but instead had to use the "Injection" method which took me FOREVER although I finally got it to work!) And just in case it helps perhaps even to bypass a direct answer to this question (although it will still of course be appreciated), my Settings within C Locker involve having set it to be a Device Admin and to bring it up as the first App upon Reboot as well as I've selected within the Root category to make it a System App as well as my then having Disabled ALL things that typically show on the screen (such as 9-1-1, camera, Etc). I had left it set to the default "Gesture" Unlock method, but whenever I bring up the App again and go into "Unlock Methods", it now immediately crashes each time (as well as upon Restarting the phone!). So this covers the majority of the most significant of the Settings that I've made on it so far to the best of my recollection. And I feel that if I could get some indications from the system as to what the specific errors may be when its crashing (or from a stack trace or whatever else), then it might help me to discern what specific Settings are creating the problem being that perhaps I just have an odd (rare) combination of Settings on it that I can tweak to get it working. My goal is to ultimately get a lockscreen App that I can use a Pattern type Unlock with that allows an UNLIMITED number of Failed Attempts (so that it won't ever Factory Reset my phone after the 10th or ANY number of failures!!!). I also--as mentioned above--don't want ANY shortcuts whatsoever being accessible BEFORE the phone is unlocked...not even 9-1-1. Anyway, so if there's a way to glean information from the Bugreport (or from whatever other methods available) to find the specific cause (involved errors) of this or any other App that's crashing that I do NOT have the source code for (being that I of course am not its developer) then it will be greatly appreciated to know how to best find this information. (And I promise that I've already searched extensively on Google but couldn't filter out its replies all being based on the idea that I'm the developer of the App that's crashing, with my even trying adding phrases such as "not my app" and "not the developer of" Etc to no avail...lol). Thanks.
By the way, if I shouldn't have combined the 'C Locker' Settings details into this post, then please just let me know because I'm new to posting here. Also, unfortunately, if I don't receive any help with this right away, then I'll be forced to start testing different Setting combinations anyway, which would then of course solve this problem but without knowing truly what exactly was causing the issue. Even if so, it will still be helpful in the long run with other potential App crashes to get the answer to this general question.
Unless not disabled by user, all runtime activities in Android are logged, so app crashes and their reason also. You can view this log by means of Android's logcat command-line tool or by means of a LogCat Viewer app. My POV: logcat is essential for determining what an app and the Android OS are doing while the app is running on a device.
BTW: Android's log can be filtered per package, too.
Thanks!
jwoegerbauer said:
Unless not disabled by user, all runtime activities in Android are logged, so app crashes and their reason also. You can view this log by means of Android's logcat command-line tool or by means of a LogCat Viewer app. My POV: logcat is essential for determining what an app and the Android OS are doing while the app is running on a device.
BTW: Android's log can be filtered per package, too.
Click to expand...
Click to collapse
Thank you, and since posting this, I've been learning more about Android Studio and have used it to actually see the stack trace within the "Android Monitor" pane there in order to find the instant reason why the/ANY (meaning 3rd party as well) App is crashing at the time! Thanks again for the help!

Categories

Resources