Intro

Besides interactions on a single device, ProtoPie makes it possible to easily prototype interactions that involve multiple devices communicating with each other. Examples that you could prototype are chatting or transferring money.

Get Started

Send responses and Receive triggers make interactions among devices possible. A response is activated when a device with the Receive trigger accepts a message sent from a different device using a Send response. The message received on one device should match the one sent from another device.

Send Response

Channel
Select ProtoPie Studio as a channel to allow interactions among devices. Android Broadcasting allows prototypes on Android devices to communicate with external hardware
Message
A message is a string that is transmitted. When the message in the Receive trigger on one device matches the message in the Send response, interactions among devices can take place
Assign to Variable
It is possible to send a value together with a message. This value would have to be assigned to a variable upon receiving

Receive Trigger

Channel
Select ProtoPie Studio as a channel to allow interactions among devices. Android Broadcasting allows prototypes on Android devices to communicate with external hardware
Message
A message is a string that is transmitted. When the message in the Receive trigger on one device matches the message in the Send response, interactions among devices can take place
Assign to Variable
It is possible to send a value together with a message. This value would have to be assigned to a variable upon receiving

Example

Connect Devices

ProtoPie Studio on Windows or macOS needs to serve as a hub to connect multiple devices with each other. You could connect smart devices with ProtoPie Player with each other as well as smart devices with a computer running ProtoPie Studio. They all need to be connected to the same network for this to work. Alternatively, you could connect smart devices to a computer via USB. Learn more about connecting smart devices to ProtoPie Studio.

Interacting with other Android apps

You can have your prototype interact with other Android apps by using Android Broadcasts by selecting Android Broadcast as a channel in the Send responses and Receive triggers.

To send a message to your prototype from your Android app, send a broadcast using Intent with the io.protopie.action.ONE_TIME_TRIGGER action.

val intent = Intent("io.protopie.action.ONE_TIME_TRIGGER")
intent.putExtra("messageId", "YOUR_MESSAGE_ID")
intent.putExtra("value", "123") // Optional
context.sendBroadcast(intent)

To receive messages from your prototype, register a BroadcastReceiver with an IntentFilter for the io.protopie.action.ONE_TIME_RESPONSE action.

val receiver = object : BroadcastReceiver() {
  override fun onReceive(context: Context, intent: Intent) {
    val messageId = intent.getStringExtra("messageId")
    val value = intent.getStringExtra("value")
    println("Message from ProtoPie. messageId=$messageId value=$value")
  }
}

val filter = IntentFilter("io.protopie.action.ONE_TIME_RESPONSE")
context.registerReceiver(receiver, filter)

FAQ

Language selector
TOP