Communication between Android app and Raspberry (Win 10 IOT) - Raspberry Pi Development

Hello,
I would like to ask what is the ideal type of communication between Android app and Raspberry Pi 2 (running Win 10) for my application. These devices could be on the same network.
The application is for detecting of manufacturing defects in small industrial production process.
1. Raspberry Pi using a camera obtains the image of a product.
2. Raspberry Pi using OpenCV and neural networks evaluate if the product is good, bad or cannot decide. Number of good or bad products is sent to database.
3. If Raspberry cannot decide if the product is good or bad, the image is sent to Android application (on smartphone) - it can be sent also to SQL database / uploaded to webserver and Android app could show it from here.
4. Now the user can classify the product (image) himself using Android app. This information is sent back to Raspberry and the product is classified as good or bad according to user's choice.
5. The next product is evaluated - so we go again to 1.
The application on Raspberry would be probably C++ (Windows Universal App) as I would like to use OpenCV.
On Android application I would like to see data in database (number of good and bad products).
I was thinking about using of Azure (I have free student account) or simple SQL database.

Simplest way to Send/Receive message from/to Rpi just by opening on a link
The hopmsg.com allows you the make a free message channel by creating a random key for free (no registration,login,etc) which can be used to get status / send command to your rpi:
1, Simplest way to Send/Receive message from any kind of OS/browser/platform just by clicking on a link, only need to know the ID of your msg!
Example: set your message by opening a link : hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY&value=message
get your message from any device by opening: hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY
or use the Android App to get/set it.
2, Control your device inside Nat/Lan
Example: set your command by opening a link : hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY&value=command
get your command from any device by opening: hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY
or use the Android App to get/set it.
3, Basic monitoring system
Bash script checking uptime:
UP=`uptime | sed -e 's/ /_/g'`; curl "hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY&value=`echo ${UP}`"
and use the Android App or a browser to check the status of the device.
4, Get your IP address, the message source, poor man's dyndns
If you set some values, with src=1 parameter your IP and the UTC time also added to your message
Example:
hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY&value=VALUE&src=1
wget -qO- hopmsg.com/ctl.php?id=YOUR_UNIQUE_KEY > result.txt
to use with some script.

Related

[Q] Need help in creating an Android App

My aim:
There is a webpage to view my company's bus schedule and I wanna make an android app for that portal.
About the portal:
authentication: used 'live http headers' firefox addon and saw this 'WWW-Authenticate: Basic realm=*******' . Googling came to know it is just basic HTTP access authentication
webpage technology: i guess asp.net ( homepage URL is /Default.aspx)
for searching for bus routes i guess just a webform is used.
NOTE: i have zero experience and zero knowledge in asp.net...by zero i mean literally zero...dont even know what it is.
Now about my android experience:
Have been using android mobiles for around 3 yrs.Tried the'hello world' program.There ends my knowledge with android.
Softwares Installed:
Eclipse IDE- Configured for android development
Android SDK installed and configured
Have used Virtual Device(AVD Manager) for that hello world program
Visual Studio 2008 Professional Edition ( i guess not needed for this project.Mentioning it just in case if it is needed)
So i am expecting some tutorials or materials which can help me in kick starting this project.
keertikumar_ws said:
My aim:
There is a webpage to view my company's bus schedule and I wanna make an android app for that portal.
About the portal:
authentication: used 'live http headers' firefox addon and saw this 'WWW-Authenticate: Basic realm=*******' . Googling came to know it is just basic HTTP access authentication
webpage technology: i guess asp.net ( homepage URL is /Default.aspx)
for searching for bus routes i guess just a webform is used.
NOTE: i have zero experience and zero knowledge in asp.net...by zero i mean literally zero...dont even know what it is.
Now about my android experience:
Have been using android mobiles for around 3 yrs.Tried the'hello world' program.There ends my knowledge with android.
Softwares Installed:
Eclipse IDE- Configured for android development
Android SDK installed and configured
Have used Virtual Device(AVD Manager) for that hello world program
Visual Studio 2008 Professional Edition ( i guess not needed for this project.Mentioning it just in case if it is needed)
So i am expecting some tutorials or materials which can help me in kick starting this project.
Click to expand...
Click to collapse
With this website (http://www.appsgeyser.com/) you can actually make an android app of any website, with 0% coding experience needed.
keertikumar_ws said:
My aim:
There is a webpage to view my company's bus schedule and I wanna make an android app for that portal.
)
Click to expand...
Click to collapse
create an app in Java to send you to your webpage.
Creating the life cycle of your app here:
http://developer.android.com/training/basics/activity-lifecycle/starting.html
Creating buttons here
http://developer.android.com/guide/topics/ui/controls/button.html
Dont forget to read.
Add this to a button in your code or in onCreate():
------------------------------------------------------------
Uri uri = Uri.parse("our url here");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
-------------------------------------------------------------
@coolsandie : Thanks..I wil look into that link
@Jrcon : Thanks for those links... wil help me really in coding a android app.but i guess i was not clear enough..I dont want a redirecting app... I need to create a complete new GUI app that can replace that web portal. take for example XDA Android app itself..its a completely standalone App for this website..I wanna code such an app

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

SDK for monetization of android installs - monkeysocks.net

SDK for monetization of android installs - monkeysocks.net
Our team can provide an alternative way of monetization instead of advertisement or app subscription!
How does it work:
1. Integrate our sdk into you app.
2. Add screen with selection of application running modes
3. Get profit!
Using your app as Peer, user accepts licence agreement and is able to choose alternative running mode any time he wants.
We do not allow any illegal activity via Peers. So it is completly safe for user to become a Peer of our network.
Our SDK doesn't prevent normal usage of mobile device because it is active only when:
1. Device is not in use
2. Battery charge is above 70%
3. There is an internet connection
As you can see, we offer a good option to get profit for you and opportunity for your app to become more user-friendly!
Please contact us for details:
Telegram: @monkeysocks
Jabber: [email protected]
Skype: monkeysocks.net
e-mail: [email protected]

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.

Games logs? New to Android Software and Hacking

Hi,
I'm learning about Android development and hacking, so don't be too hard on me
I'm trying to create a bot to play a game (just for research purposes), and I need to get information about the match in realtime. I thought that maybe using logcat I would get some info, but it looks like nothing is logged. I'm using MEmu emulator by the way.
The command I'm using is:
Code:
adb logcat com.example.game:v *:S
And the only thing I'm getting is:
Code:
--------- beginning of main
--------- beginning of system
Is it normal that games don't log any message at all? Or am I doing something wrong here?
As I said, I'm new to this world, so please understand my newbie-ness.
Feel free to move this thread if it is in the wrong category.
@igonro
If an app / game doesn't produce system-wide log messages ( what are stored in a series of circular buffers ), then you of course can't retrieve any log messages via LogCat tool with regards to that app / game. Note that by default only raised runtime exceptions and errors while running an app / game are logged.

Categories

Resources