ACTION_SEND - поделиться чем тоэто я понимаю, что я только не перепробовал
ACTION_VIEW - показать что то
зачем ты делаешь этот сет если туда все равно всегда засовываешь null? Если метод должен только uri формировать, нахрена там происходит запуск активити?не смотря на то что там возвращает null в приложении этот метод появляется а на часах нет, даже если я просто пытаюсь отправить что то.
New Intent(Intent.ACTION_SEND)
.setData(Uri.parse("http://link.com"))
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="myapp" />
</intent-filter>
Intent intent = new Intent(
Intent.ACTION_SEND
);
intent.setType("text/plain");
String Body = "Download this App";
String Sub = apkURL;
intent.putExtra(Intent.EXTRA_TEXT, Body);
intent.putExtra("url", "myapp://" + apkURL);
intent.putExtra(Intent.EXTRA_TEXT, Sub);
startActivity(Intent.createChooser(intent, "Share using"));
public class MainActivity extends AppCompatActivity {
private static final int REQUEST_CODE = 100;
public static final String apkURL = "http://test.wear-store.ru/";
String apkName = "wearOs.apk";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView image = findViewById(R.id.image);
// storage runtime permission
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CODE);
}
}
image.setOnClickListener(view -> launchPlayStoreOnWear());
getContentDownload();
}
private Node getConnectedNode() {
Node returnNode = null;
Task<List<Node>> wearableList = Wearable.getNodeClient(this).getConnectedNodes();
try {
List<Node> nodes = Tasks.await(wearableList);
for (Node node : nodes) {
if (node.isNearby()) {
returnNode = node;
}
}
} catch (ExecutionException | InterruptedException e) {
e.printStackTrace();
}
return returnNode;
}
private void launchPlayStoreOnWear() {
new Thread(() -> {
Looper.prepare();
if (getConnectedNode() != null) {
RemoteActivityHelper remoteActivityHelper = new RemoteActivityHelper(this, Executors.newSingleThreadExecutor());
remoteActivityHelper.startRemoteActivity(getContentDownload());
window.location = 'https://www.youtube.com/';
window.document.getElementById('container').innerHtml = 'Your text here';
$stmt = pdo()->prepare("SELECT * FROM `get_package_name` WHERE `name` = :name");
[16-Nov-2022 10:14:44 UTC] PHP Fatal error: Uncaught Error: Call to undefined function pdo() in /home/patedfrb/public_html/faucet/api/v1/index.php:31
Stack trace:
#0 {main}
thrown in /home/patedfrb/public_html/faucet/api/v1/index.php on line 31
[16-Nov-2022 10:14:46 UTC] PHP Fatal error: Uncaught Error: Call to undefined function pdo() in /home/patedfrb/public_html/faucet/api/v1/index.php:31
Stack trace:
#0 {main}
thrown in /home/patedfrb/public_html/faucet/api/v1/index.php on line 31
idselected
array(2) { [0]=> string(9) "1selected" [1]=> string(9) "2selected" }