Serve http URI locally - Android Q&A, Help & Troubleshooting

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).

Related

How to Push Information to My App

We've had some people develop and application for us. For now, our application uses static data that requires a manual update each time this data changes. Our plan in the future is to have this data updated automatically the instant this new data is available.
For now, is there a way like through some online cloud that I can link the application to? So, that way when I put the data online in this service thing, the application whenever it has a data connection or Wi-Fi pulls the new data?
For the future, what's the best way to set up this automated updates?
You could just host the update on the server u run the app from ...
Sent from my HTC Sensation using xda premium
Right, what if buying a physical server was really not a preferred option at this point, what else could be done?
You could add the Dropbox SDK or Amazon S3 SDK to your project.
For example with Dropbox you could create a folder for your account dedicated towards this application. With the correct code you can then have the application download / synchronize the files in this project folder with your device.
That may be the easiest solution if you don't want to get down and dirty with your own server.
nraboy said:
You could add the Dropbox SDK or Amazon S3 SDK to your project.
For example with Dropbox you could create a folder for your account dedicated towards this application. With the correct code you can then have the application download / synchronize the files in this project folder with your device.
That may be the easiest solution if you don't want to get down and dirty with your own server.
Click to expand...
Click to collapse
Okay... Thank you. This helps.
In response to the message you sent me.
Yes you can use Excel files. You can use whatever you'd like, but you just have to worry about how you plan to use the data when you receive it.
For example, maybe you've got an Excel file that has 10 rows of data initially and you want to update it to a newer version that has 20 rows of data. Using one of these cloud services SDK you would be able to update this file on your device. This is not the most efficient way to do business, but it is certainly an option.
The cloud SDK approach would be a better solution if for example you wanted to add levels to a game without forcing the user to upload through the marketplace. If you are worried about updating information data you may want to write some sort of script that will transfer information from an SQL database online to a SQLite database on your phone.
Both the SDK options and SQL options are for the most part compatible with all the types of devices so if you plan to make an iOS or RIM application it should be possible.
I hope this helps.

Cloud service for Android app development

Hi,
I want to write an app which can synchronize data (of the app) stored on an Android phone to a web server. Could anyone point me a book/forum/website which tells us about this type of implementation? As far as I know, I found
openmobster (i can not post a link yet)
(but I haven't tried it yet)
and some description about gsync.
Thanks!
look for SampleSyncAdapter example.........
then you'll need to have django installed to do this, and google app engine installed. Launch the webapp from google appengine and then point your browser to the url show in the appengine applicaiton.
installing django
gappengine
Thanks alot,
I'll have a look at these sites.

[Q] Application Development Help

Hi
I'm new to android dev and I'm trying to make an application for internal use among people in the company and partners. Its a very simple app, and I think I can cover most of the coding, but what I can't is connection to a remote mysql database. Its used to verify login credentials and edit certain columns (without it, app is useless).
From what I understand, its suppose to work like this: SQL > PHP > APP where the app pulls info from a php script located on the remote server. My issue with this is Java, which I'm very new to. I'm looking for someone to guide me through making that first bridge (I tend to make more, where I can pull sql data from app to show some stats or whatever)
Thank you
Loldawg said:
Hi
I'm new to android dev and I'm trying to make an application for internal use among people in the company and partners. Its a very simple app, and I think I can cover most of the coding, but what I can't is connection to a remote mysql database. Its used to verify login credentials and edit certain columns (without it, app is useless).
From what I understand, its suppose to work like this: SQL > PHP > APP where the app pulls info from a php script located on the remote server. My issue with this is Java, which I'm very new to. I'm looking for someone to guide me through making that first bridge (I tend to make more, where I can pull sql data from app to show some stats or whatever)
Thank you
Click to expand...
Click to collapse
If you're into web development and performance is not an issue, then you can try the webview instead of coding natively. At that time, you'll be using more html, javascript, jquery in which you may be more familiar with.
wcypierre said:
If you're into web development and performance is not an issue, then you can try the webview instead of coding natively. At that time, you'll be using more html, javascript, jquery in which you may be more familiar with.
Click to expand...
Click to collapse
Hi, thank for the swift reply =) I thought about it, but I'd like to make it right the first time. It would be nice to make the data available so I can do whatever with it. I did find a tutorial including examples and code on how to connect to sql and pull information, I'm just having a hard time actually implementing it into eclipse.. No idea where to type it in and stuff lol

[Q] Launch any app from URL

Hi there,
i got a little problem:
I got a Loxon (loxone.com) home automation system.
In there, there's a function to open app from URLs, as far as i understood it works through the intent service, for example i tested with success the yatse xbmc remote.
I launched the app through yatse:// as defined on the yatse developers web page.
So and now my problem:
as far as i understand the apps developer needs to define a custom intent sheeme in the apps manifest.xml
But there aren't many app developers using the custom intents, so i want to add the feature by myself.
I read about it on many websites but never got it to work. i don't need actions defined, such as open sms app and preinsert the number, just open the apps, for example squeezeplayer:// for the squeeze box apk.
Could anyone please give me a before-after example for an app? That would be awesome.
I know about decompiling apks, editing the manifest so no need for an detailed step-by step.
I know about a negative side effect after editing the manifest if an app update is installed the changes go away, but thats sometihing i can live with. (set aut update off):silly:
Thanks in advance
Edit
: i found this on stack overflow for opening apps through url but never got it to work:
http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser

Is there a way to get another device to access that url without having to type it man

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.

Categories

Resources