标签: launching-application

从我的应用程序启动外部应用程序

我想启动用户在我的应用程序中选择的应用程序.但是,我不确定我该怎么做.我试过这个:

Intent intent = new Intent();
intent.setAction(Contacts.Intents.SHOW_OR_CREATE_CONTACT);
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)

但这似乎抛出一个错误并强行关闭我的应用程序.我也尝试过添加:

<action android:name="Contacts.Intents.SHOW_OR_CREATE_CONTACT"/>
Run Code Online (Sandbox Code Playgroud)

在AndroidManifest文件中,但无济于事.

看一下Logcat就会发现它是"IOexception - 没有这样的文件或目录".由此产生了几个问题.我阅读了Android文档并注意到不推荐使用Contact.Intents类.然而,它是继承者,ContactContracts针对API级别5,而我的目标是API级别3.这可能是问题吗?此外,我已将此应用程序硬编码到代码中.有没有办法检索用户选择的任何应用程序的意图,以便它们可以启动?

android launching-application android-intent

5
推荐指数
1
解决办法
1万
查看次数

Android:没有运行设备

我想在我的Android设备上使用模拟器运行我的Android项目iwrote.设备连接在USB端口上.当我启动"Android设备选择器"时没有任何反应."选择正在运行的Android设备" - 表格中没有正在运行的设备.连接时我试图重启系统(PC和智能手机).我尝试了每种USB模式.我尝试了另一种设备(G1和HTC Desire).未知来源始终为真.我尝试了另一个Eclipse-Version(64和32位),尝试了另一个SDK(64位和32位)并重新安装了android sdk.我还是看不到任何设备.在我的旧32位系统上一切正常.现在我必须使用我的64位联想.(两个窗口7)有人有另一个想法吗?谢谢.法比安

android mobile-devices launching-application

5
推荐指数
1
解决办法
2万
查看次数

如何从firefox插件执行Windows命令?

如何执行Windows命令并使用firefox插件显示它的输出?

例如:ping www.stackoverfow.com

我只是试图通过执行打包在一起的二进制文件(或)可执行文件或运行Windows命令来探索firefox插件开发中的更多内容.

executable firefox-addon launching-application

5
推荐指数
1
解决办法
6189
查看次数

使用Phonegap启动图像后,白屏闪烁

加载启动图像后,我的应用程序加载前会出现白屏.我正在使用带xcode的phonegap.我希望我的应用程序加载我的lauch图像,以便它遵循ios开发人员指南并提供平滑的启动.我认为这个白色屏幕是我的应用程序的webview加载.我希望这个webview能够清楚.有关修复此问题或解决方法的任何想法?

我尝试了以下代码,它在我的发布上没有任何区别.此代码位于我的MainViewController.m中

-void (webViewDidFinishLoad:(UIWebView*) theWebView
{
theWebView.backgroundColor = [UIColor clearColor];
theWebView.opaque = NO;
 }
Run Code Online (Sandbox Code Playgroud)

我已经研究了很多,但我还没有找到解决方案.

iphone jquery xcode launching-application cordova

5
推荐指数
1
解决办法
4309
查看次数

从 Notepad Plus Plus 和当前目录运行文件

网上有许多关于如何从 Notepad Plus Plus (NPP) 运行文件的示例。但是它们都没有考虑到当前工作目录是 NPP 可执行文件的位置,而不是文件的位置这一事实。
通常他们会这样:

cmd /K "$(FULL_CURRENT_PATH)" 
Run Code Online (Sandbox Code Playgroud)

考虑以下 Python 脚本:

with open('somefile.txt', 'a') as file:
    file.write('Hello there.\n')
Run Code Online (Sandbox Code Playgroud)

该文件将在 NPP 文件夹中创建,这完全不是大多数人所期望的。大多数人希望它与 Python 文件位于同一位置。

你也可以做这样的事情,它按预期工作,但这仅限于 Python 文件:

<Command name="Run This Python File" Ctrl="no" Alt="no" Shift="yes" Key="116">cmd /K python &quot;$(FULL_CURRENT_PATH)&quot;</Command>
Run Code Online (Sandbox Code Playgroud)

我不想在 Python 脚本中添加额外的代码来更改当前工作目录,因为通常不需要这样做。

我一直在努力解决这个问题,并提出了以下建议。此行位于NPP 文件夹中的“ shortcuts.xml ”中。

<Command name="Run This File" Ctrl="yes" Alt="no" Shift="no" Key="116">cmd /K &quot;cd &quot;$(CURRENT_DIRECTORY)&quot; &amp;&amp; &quot;$(FULL_CURRENT_PATH)&quot;&quot;</Command>
Run Code Online (Sandbox Code Playgroud)

所以你关闭 NPP,通过添加这一行来编辑“ shortcuts.xml ”,使用另一个编辑器,然后启动 NPP。要运行该文件,请使用Ctrl+F5组合键。

这在 Windows 10 中有效,但在 Windows XP 中失败。

如何调整它以在 Windows XP 中工作?

shell windows-xp notepad++ working-directory launching-application

5
推荐指数
2
解决办法
6504
查看次数

INSTALL_FAILED_USER_RESTRICTED 通过 USB 安装被禁用

09/18 11:00:20:在小米红米6上启动'app'。安装失败。无法安装应用程序:INSTALL_FAILED_USER_RESTRICTED 通过 USB 安装被禁用。

android launching-application android-studio

5
推荐指数
1
解决办法
6902
查看次数

从电子邮件链接启动基于PhoneGap的iPhone应用程序

我刚从Titanium切换到PhoneGap.一切正常,但我无法通过电子邮件链接启动应用程序.iPad/iPod动画启动应用程序,然后应用程序崩溃.

在此帖子中,真实应用名称已更改为"myapp".我在电子邮件中使用的链接myapp://(即真正的应用程序名称)通常带有参数(例如myapp://?argument=value),并且${PRODUCT_NAME}与字符串相同myapp.

有人有主意吗?谢谢.


PLIST

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>UIApplicationExitsOnSuspend</key>    <true/>
        <key>LSRequiresIPhoneOS</key>             <true/>
        <key>CFBundleSignature</key>              <string>????</string>
        <key>CFBundleDisplayName</key>            <string>My App</string>
        <key>CFBundleIdentifier</key>             <string>com.mydomain.myapp</string>
        <key>CFBundleName</key>                   <string>${PRODUCT_NAME}</string>
        <key>CFBundlePackageType</key>            <string>APPL</string>
        <key>CFBundleVersion</key>                <string>1.0</string>
        <key>CFBundleExecutable</key>             <string>${EXECUTABLE_NAME}</string>
        <key>CFBundleIconFiles</key>
            <array>
                <string>icon.png</string>
                <string>icon_large.png</string>
            </array>
        <key>CFBundleInfoDictionaryVersion</key>  <string>6.0</string>
        <key>UILaunchImageFile~ipad</key>         <string>Default-ipad</string>
        <key>UILaunchImageFile~iphone</key>       <string>Default</string>
        <key>CFBundleDevelopmentRegion</key>      <string>English</string>
        <key>NSMainNibFile</key>                  <string></string>
        <key>UIStatusBarHidden</key>              <true/>
        <key>UISupportedInterfaceOrientations~iphone</key>
            <array>
                <string>UIInterfaceOrientationPortrait</string>
            </array>
        <key>UISupportedInterfaceOrientations~ipad</key>
            <array>
                <string>UIInterfaceOrientationPortrait</string>
            </array>
        <key>CFBundleURLTypes</key>
            <array>
                <dict>
                    <key>CFBundleURLName</key> <string>com.mydomain.myapp</string>
                    <key>CFBundleURLSchemes</key>
                        <array>
                            <string>myapp</string>
                        </array>
                </dict>
            </array> …
Run Code Online (Sandbox Code Playgroud)

iphone hyperlink launching-application cordova

4
推荐指数
1
解决办法
1208
查看次数

模拟启动选项

在我的appDelegate,我有一些规格当应用程序启动与来自ie邮件应用程序的文件.

当我启动我的应用程序时,一切正常.当我通过Mail中的文件启动应用程序时,应用程序崩溃了.不幸的是,我无法调试它,因为我无法模拟launchingOptions.此刻,我建立并运行,然后断开iPad,关闭我的应用程序,然后去邮件等...有没有办法调试?

Appdelegate.m

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];

IntroViewController *introViewController = (IntroViewController *)self.window.rootViewController;

if (url !=nil) {
    if ([url isFileURL]) {
        introViewController.fileUrl = url;
    }


}

NSLog(@"%@",[url path]);

return YES;
}
Run Code Online (Sandbox Code Playgroud)

IntroViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    NSLog(@"Hello");
    if (fileUrl != nil) {
        IntroTableViewController* introTable = (IntroTableViewController *)segue.destinationViewController;            
        introTable.openedByURL = [fileUrl path];

        TabBarController* tabBarController = (TabBarController *)segue.destinationViewController;
        UINavigationController* navigationController = (UINavigationController *)[[tabBarController viewControllers] objectAtIndex:0];
        TargetLSController* targetViewController = (TargetLSController *)[[navigationController …
Run Code Online (Sandbox Code Playgroud)

debugging xcode launching-application ipad ios

4
推荐指数
1
解决办法
4441
查看次数

使用正确的转义路径执行命令

请参阅此超级用户问题.我需要运行命令

explorer.exe /select,"C:\Program Files\foobar"
Run Code Online (Sandbox Code Playgroud)

来自Java.以下Java代码不像上面的命令行调用那样工作(Explorer选择一个完全不同的目录):

Runtime.getRuntime().exec(new String[] {
    "explorer.exe",
    "/select,\"C:\\Program Files\\foobar\""
});
Run Code Online (Sandbox Code Playgroud)

我从纯Java方面有什么其他选择(没有本机代码)?

java launching-application

4
推荐指数
1
解决办法
230
查看次数

Android通过意图播放视频

我创建了自己的媒体播放器应用程序并安装在设备中.我创建了一个只有一个按钮的其他应用程序,只要我点击按钮.我应该选择播放视频的播放器.

我的媒体播放器应用程序的清单文件:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/NoActionBar" >
    <activity
        android:name="com.example.player.MainPlayerActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="rtsp" />
         </intent-filter>
         <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="http" />
            <data android:scheme="https" />
            <data android:scheme="content" />
            <data android:scheme="file" />
            <data android:mimeType="video/mpeg4" />
            <data android:mimeType="video/mp4" />
            <data android:mimeType="video/3gp" />
            <data android:mimeType="video/3gpp" />
            <data android:mimeType="video/3gpp2" />
            <data android:mimeType="video/webm" />
            <data android:mimeType="video/avi" />
            <data android:mimeType="application/sdp" /> …
Run Code Online (Sandbox Code Playgroud)

android launching-application android-intent android-videoview

4
推荐指数
1
解决办法
9515
查看次数