Skip to content

deib-polimi/SPF2

Repository files navigation

License LGPL 3 Build Status

Issue Stats Issue Stats

SPF2

alt tag


Informations

A social smart space is a physical space where members, both humans and smart objects, can exploit services provided by the others in a technology-mediated way. Social Proximity Framework (SPF) is a software solution for the creation of this spaces, where social identity and proximity is taken into account to offer personalized services and support real-life interactions with digital ones. SPF2 is a new major release of THIS SOFTWARE that fully support Wi-Fi Direct protocol.

SPF2 requires Android 4.2 JellyBean MR1 (API 17) or higher. But I tested this new version only on 4.4.x KilKat, 5.x.x Lollipop and 6.0 Marshmallow. This choice is related to to the fact that in previous versions, Wi-Fi Direct was unstable and unreliable.

This repository contains SPFApp, SPFFramework and SPFWFDMiddleware as local projects. Also, there are the two local modules called SPFLib and SPFShared. To be able to create apps based on SPF2, you should add these two latest modules as remote dependencies into your build.gradle.

SPFShared and SPFLib are available on JCenter and Maven Central. If you need examples of how to create SPF's applications look these 3 repositories:

If you want to modify SPFLib and SPFShared, I suggest to run Sonatype Nexus OSS on your local machine and upload the compiled AAR's into this Maven server. Also, remember to update the version of these libraries, because Gradle caches dependencies automatically into ~/.gradle/caches/modules-2/files-2.1 directory.

Releases

Changelog

Changelog is available HERE

Known issues to fix

  • If discovery phase fails, create a temporized system to restart it automatically.
  • When SPF enters in onConnectionInfoAvailable(), start a timer on the client. At the end of the countdown, if this device isn’t connected to the GO it should restart the discovery phase.
  • Refactor MainActivity.java to reduce codelines.
  • Updates the proximity switch in the GUI accordingly to the service status. For example, when Eternal Connect is working, you should update the switch. I suggest to use Broadcast receivers (not Local, but Remote declared into the AndroidManifest.xml). Use GroupInfosFragment as an example.
  • Remove all ListViews and replace they with RecyclerView. Use GroupInfosFragment as an example.
  • Fix Tab positioning for tablets/smartphones. You should find a way to display centered tabs that fill the entire screen width, but with text on a single line. Your solution should work also during screen rotation.
  • Improve the standard mode into the Wi-Fi Direct Middleware.

If you want to do something, create a Pull Request! XD

Images



























Official documentations

The official doc is composed by these files:

How to publish dependencies?

Change the information inside "private_bintray.properties" to be able to push dependencies on JFrog Bintray.

bintrayUser=your_username 
bintrayApiKey=your_apikey
bintrayGpgPassword=your_chosen_gpg_password

After that, follow this procedure:

  • Remember to update the versions inside "build.gradle" of spflib and spfshared
  • Sync and build the project
  • In Android Studio Terminal type these commands into the SPF's root folder:
gradlew install
gradlew bintrayUpload
  • Done!!!

How to create SPF's applications?

Add these dependencies into your local module's build.gradle:

dependencies {
compile 'it.polimi.spf:spflib:2.0.0.1@aar'
compile 'it.polimi.spf:spfshared:2.0.0.1@aar'
}

Examples:

License

Copyright 2014 Jacopo Aliprandi, Dario Archetti
Copyright 2015 Stefano Cappa

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.