Python Forum
How to best communicate with android phone from PC running Python script?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to best communicate with android phone from PC running Python script?
#1
I'm currently new to Python (have been learning it for a month or two now, with some previous experience with bash scripting), I want to create a script crawls a website and sends info about the website to my android phone. My PC is running Linux (which I'm pretty good with), I also own a raspberry PI so I could also use that. I want a way to send the information that's free and reliable when my Phone is not connected to my network. I have thought of a couple of ways to do this:

Over SMS: You can get something for the raspberry pi that allows you to use a sim card with it, meaning I could run the script on the raspberry pi and send the information over SMS. However this means I will have to pay for the credit required to send SMSs.

Over the internet: This is free, but this relies on my PC being connected to the internet. My phone won't always be connected to the internet making this way more unreliable.

Script being run locally on phone: This way the web scraper won't have to communicate over a network. However this requires me to learn about using Python on android phones and still doesn't remove the fact that my phone must be connected to the internet.

Is there any other way I could achieve this? Am I just stuck with one of these options or are there any others you can think of? The information is likely only going to be some text or at most a low-res image. The speed of the connection doesn't matter. If I must pay, I would prefer a one time cost vs a subscription. (BTW, I likely won't be able to reply to anybody until either tomorrow or the day after).
Reply
#2
your phone can be connected to the "outside" world by some communication protocol e.g. mobile network, Internet, Bluetooth, NFC, USB/wire. The last 3 suggest short range, which leave you to choose between mobile network (sms) and Internet.
There are plenty of free options that can allow you to communicate with your phone via messengers or other apps/services (e.g. Pushbullet)

Eventually you can have your script running in the cloud (if you don't want or cannot have your PC constantly connected to Internet).

You can have a look at kivy to develop Android apps (i.e. running scripts locally on your phone). There are some other options for this, e.g. python-for-android
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TCP Communicate... ATARI_LIVE 3 2,873 Dec-15-2020, 08:50 AM
Last Post: ATARI_LIVE
  how virtual and host can communicate? looney99 0 2,079 Nov-28-2019, 09:08 PM
Last Post: looney99
  virtual host and real network communicate looney99 3 2,873 Nov-20-2019, 12:27 PM
Last Post: ChislaineWijdeven
  How I can communicate Virutal GNS3 topology and real network ? looney99 0 1,772 Nov-13-2019, 08:11 PM
Last Post: looney99
  how can i write programs that communicate between different computers? yasientrabih23 2 2,776 Jan-14-2019, 03:06 PM
Last Post: yasientrabih23

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020