android


How I can send a file from my server to an Android app?


I need to send a file to an Android application from my server. I have the user's IP address saved in a database from the last time he was online.
Does Android have something like listener over the internet so I can send a request (from myserver with the IP) to check if is it the user I am looking for or if the IP has changed?
You may want to look into the Android Cloud to Device Messaging Framework. You could use this to tell your app on the Android device that there's new content to fetch from the server, for example.
IP Addresses on mobile devices are pretty ephemeral. In addition, to save on battery power, a lot of phones turn off the wifi antenna when it isn't being used. And of course, internet connections are always spotty on mobile devices.
Because of this, it's usually a lot simpler for the device to ask the server "is there a file for me?". A good way to do this on Android is to use the AlarmManager and have the device periodically check to see if there is a file that it should download - maybe once or twice a day.

Related Links

Get list view item info through context menu
Android 9-patch scaling affected by the density folder that it resides in
connecting to socket using asynctask android
Use Plugin in PhoneGap/Cordova 2.9.0 for mDNS/ZeroConf/Bonjour
HttpResponse is not getting the JSON returned by the server
Casting a Menu Item in XML to a Spinner (Actionbar appcompat)
Updating an existing Android app in Eclipse?
How to check an app is installed on a specific phone
What's “msgid” and “xliff” in strings.xml file?
How can I create a YuvImage in android
NDK can't load library
Eclipse import SVN project as Android project
Null pointer exception when using layout inflate in android
Value <br of type java.lang.String cannot be converted to JSONObject on android
Connecting to existing Google Chromecast Session from Android (for generic remote control)
Create shortcut with data

Categories

HOME
jax-rs
object
package
devise
grafana
google-cloud-functions
soa
hpc
polling
mvc5
lanczos
32bit-64bit
enthought
github-enterprise
pega
startup
mod-security
radgridview
linear-algebra
package.json
powershell-v5.0
standards
solrcloud
event-store
expressionengine3
interbase
has-and-belongs-to-many
linked-data
quantlib
jaws
finagle
postback
mockjax
left-join
laravel-eloquent
keras-layer
fossil
jwplayer6
navigator
odroid
verifiable-c
demo
stringtokenizer
install.packages
microsoft-metro
x++
magento-2.0.7
linter
twilio-click-to-call
java-bytecode-asm
bbpress
janus
monkey
cubism.js
omxplayer
builtins
actor-platform
jodd
drawstring
scaffolding
shopping
cassia
kango-framework
sklearn-pandas
np-spring
atan2
character-replacement
dynamics-nav-2016
dynatree
xenomai
oracle-spatial
forwarding
rate-limiting
include-guards
page.js
ember-cli-rails
nsurlsessiondatatask
kubuntu
osc
infosphere-spl
big-ip
metatrader5
jama
grails-domain-class
xml-dsig
memset
high-resolution
sphinxql
mysql-error-1044
cardreader
swfobject
resource-management
mkv
cakephp-1.2
saleslogix
listitem
infobright
agility.js
webdev.webserver
entitydatasource
jqote
drawtobitmap
timertask
non-clustered-index
zen
alsb
information-management

Resources

Encrypt Message