carsten-klaffke / send-intent

Repository for send-intent Capacitor plugin
MIT License
110 stars 12 forks source link

Setup instructions are missing something #1

Closed spatinolang-vtr closed 3 years ago

spatinolang-vtr commented 4 years ago

Hi Carsten,

I tried to check out your plugin but Android Studio throws me this error:

/Users/perelin/code/projx/docma-app/src-capacitor/android/app/src/main/java/org/cordova/MAYAPP/app/MainActivity.java:20: error: cannot find symbol
        add(SendIntent.class);
            ^
  symbol: class SendIntent

This is my current MainActivity.java

package org.cordova.docma.app;

import android.os.Bundle;

import com.getcapacitor.BridgeActivity;
import com.getcapacitor.Plugin;

import java.util.ArrayList;

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {
      {
        // Additional plugins you've installed go here
        // Ex: add(TotallyAwesomePlugin.class);
        add(SendIntent.class);
      }
    });
  }
}

I tried to import the package with import de.mindlib.sendIntent.sendintent; but then

/Users/perelin/code/projx/docma-app/src-capacitor/android/app/src/main/java/org/cordova/MYAPP/app/MainActivity.java:8: error: cannot find symbol
import de.mindlib.sendIntent.sendintent;
                            ^
  symbol:   class sendintent
  location: package de.mindlib.sendIntent

Any ideas how to proceed?

carsten-klaffke commented 4 years ago

I think you have to look for right capitalization. My import is: import de.mindlib.sendIntent.SendIntent; So write SendIntent with capitalized "S". I also updated the readme for the project recently and described how to configure a listener (the standard way is to actively poll the send request).

makinox commented 4 years ago

This works for me

import de.mindlib.sendIntent.SendIntent;
carsten-klaffke commented 3 years ago

Solved