Hi all
I have this issue at the moment:
I have a procedure JAVA
there I put all I need to receive an image, file, etc. from another app
on the Compile section it launch an error of Intent intent = getIntent();
I don't know why is this happening, I import all the things I need to get it work.
I even add some code on the manifest.xml of windev mobile just to make sure on the Share Menu Android my app appear tos to share and image or text to my app.
Then because I can't code on OnCreate I can't put the getIntent(); and then get all I need to work with the text or image. but on Windev I can't work on OnCreate method of android.
So I create a procedure but then again I can't compile thep roject because Windev (Java) can't find the symbol of getIntent();
I search everywhere and I can't find a solution. I really need to get the image or text shared from another app to my app.
anyone have an idea?
Here is the source someone give it to me on this forum to get the app on the share Menu of Android and also the code I need to put in java to process the shared element:
https://developer.android.com/training/sharing/receive
In every website I search it's always talk about the OnCreate method of Android Studio, and also this method on his class needs to be extended from the Activity just to get it work, and I can't access to those methods.
Heres my java code:
import android.content.Intent;
import android.app.Activity;
import android.content.Context;
import android.app.Fragment;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
PUBLIC static void Test()
{
Intent intent = getIntent();
string action = intent.getAction();
string type = intent.getType();
IF (Intent.ACTION_SEND.equals(action) && type != Null) {
IF ("text/plain".equals(type)) {
} ELSE IF (type.startsWith("image/")) {
}
} ELSE IF (Intent.ACTION_SEND_MULTIPLE.equals(action) && type != Null) {
IF (type.startsWith("image/")) {
}
} ELSE {
}
}
--
Best Regards
ARVMensagem modificada, fevereiro, 07 2019 - 10:31 PM