- 浏览: 247845 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
江恂泽:
楼主 这家伙会把data 拆分开来 转换成day year形 ...
JsonUtil -
mdsp25xhm:
为何没有列表查询功能?
myBatis DAO封装
/**
* 根据包名 打开本地应用程序
*
* @param String packageName
* @return void
* @throws
* @since TianTian
*/
public void openApp(String packageName)
{
try
{
PackageManager manager = getPackageManager();
PackageInfo pi = manager.getPackageInfo(packageName, 0);
Intent resolveIntent = new Intent(Intent.ACTION_MAIN, null);
resolveIntent.addCategory(Intent.CATEGORY_LAUNCHER);
resolveIntent.setPackage(pi.packageName);
List<ResolveInfo> apps = manager.queryIntentActivities(resolveIntent, 0);
if (CommonUtil.isNotEmpty(apps))
{
ResolveInfo info = apps.iterator().next();
if (null != info)
{
packageName = info.activityInfo.packageName;
String className = info.activityInfo.name;
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
ComponentName component = new ComponentName(packageName, className);
intent.setComponent(component);
startActivity(intent);
}
}
}catch (NameNotFoundException e){
e.printStackTrace();
}
}
2: PackageManager packageManager = Start_RemoveSoftActivity.this.getPackageManager();
Intent intent=new Intent();
try {
intent =packageManager.getLaunchIntentForPackage("要调用应用的包名");
} catch (NameNotFoundException e) {
Log.i(TAG, e.toString());
}
startActivity(intent);
* 根据包名 打开本地应用程序
*
* @param String packageName
* @return void
* @throws
* @since TianTian
*/
public void openApp(String packageName)
{
try
{
PackageManager manager = getPackageManager();
PackageInfo pi = manager.getPackageInfo(packageName, 0);
Intent resolveIntent = new Intent(Intent.ACTION_MAIN, null);
resolveIntent.addCategory(Intent.CATEGORY_LAUNCHER);
resolveIntent.setPackage(pi.packageName);
List<ResolveInfo> apps = manager.queryIntentActivities(resolveIntent, 0);
if (CommonUtil.isNotEmpty(apps))
{
ResolveInfo info = apps.iterator().next();
if (null != info)
{
packageName = info.activityInfo.packageName;
String className = info.activityInfo.name;
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
ComponentName component = new ComponentName(packageName, className);
intent.setComponent(component);
startActivity(intent);
}
}
}catch (NameNotFoundException e){
e.printStackTrace();
}
}
2: PackageManager packageManager = Start_RemoveSoftActivity.this.getPackageManager();
Intent intent=new Intent();
try {
intent =packageManager.getLaunchIntentForPackage("要调用应用的包名");
} catch (NameNotFoundException e) {
Log.i(TAG, e.toString());
}
startActivity(intent);
发表评论
-
IMF简介-2
2013-07-09 17:56 903InputManager 由UI控件(View,TextVie ... -
IMF简介-1
2013-07-09 17:51 821Input Method Framework 目录 ... -
输入法 总结-3
2013-07-08 15:02 857public class MainActivity exten ... -
输入法 总结-4
2013-07-04 17:29 940public class InputActivity exte ... -
输入法 总结-3
2013-07-04 17:28 863public class InputApplication e ... -
输入法 总结-2
2013-07-04 17:23 781openwnn_pref_ja.xml <?xml v ... -
输入法 总结-2
2013-07-04 17:21 13openwnn_pref_ja.xml <?xml v ... -
输入法 总结-1
2013-07-04 17:19 801<application android ... -
Android快捷键
2013-03-15 14:39 841Home键(小房子键) 在 ... -
如何通过wifi调试android程序
2013-02-27 15:48 778android手机居然可以通过wifi进行程序的调试,太好了, ... -
Please ensure that adb is correctly located at 'D:\android-sdk-windows\platform-
2013-02-27 14:27 1668adt 出现ADB server didn't ACK, fa ... -
Android AsyncTask
2013-02-19 09:35 1136AsyncTask是抽象类,子类 ... -
Android ViewPager 左右滑动2-1
2013-01-29 10:12 1516public class PagerActivity exte ... -
Android ViewPager 左右滑动-3
2013-01-29 10:10 1108<?xml version="1.0" ... -
Android ViewPager 左右滑动-2
2013-01-29 10:10 1481/*** * 选中效果 */ pu ... -
Android ViewPager 左右滑动-1
2013-01-29 10:09 1389Store extends ActivityGroup imp ... -
Android 下载
2013-01-27 00:59 920下载apk程序代码 protected File downLo ... -
Android SDCard操作-3
2013-01-26 18:31 890public static Intent getVid ... -
Android SDCard操作-2
2013-01-26 18:30 1126/** * 判断该应用在手机中的安装情况 ... -
Android SDCard操作-1
2013-01-26 18:27 1056private static int INSTALLED = ...
相关推荐
#r'C:\Users\Administrator\AppData\Local\115Chrome\Application\115chrome.exe', #r'C:\Program Files (x86)\Internet Explorer\iexplore.exe', #r'D:\Program Files(x86)\SouExplorer\SogouExplorer\...
##### 版本控制与本地历史 (VCS/Local History) - **Commit project to VCS**: 提交项目到版本控制系统。快捷键:`K`。 - **Update project from VCS**: 从版本控制系统更新项目。快捷键:`T`。 - **View recent ...
VirtualApp is an open platform for Android that allows you to create a Virtual Space, you can install and run apk inside. Beyond that, VirtualApp is also a Plugin Framework, the plugins running on ...
android:icon="@drawable/app_icon" android:label="@string/app_name" android:sharedUserId="android.uid.system" android:supportsRtl="true" android:theme="@style/AppTheme"> ... ... ``` 3. **...
在Visual Basic (VB) 程序设计中,动态设置ODBC (Open Database Connectivity) 数据源是一种常见且重要的技术。这种方法允许开发者在程序运行时动态配置ODBC数据源,从而避免了手动配置带来的不便。本文将详细介绍...
app_key = winreg.OpenKey(uninstall_key, app_name) app_info = {} for i in range(0, winreg.QueryInfoKey(app_key)[1]): key_name, value, value_type = winreg.EnumValue(app_key, i) app_info[key_name] =...
处理函数通常是一个包含多个`switch`语句的大函数,用来处理各种消息,例如`MSG_OPEN_WINDOW`、`MSG_FULL_PAINT`、`MSG_APP_OK`等。例如: ```c LOCAL MMI_RESULT_E HandleHelloSprdWinMsg(MMI_WIN_ID_T win_id, ...
Int li_sysdir,li_dir1,li_dir2,li_dir3,li_dir4,li_dir5,li_app; String ls_driver,ls_start,ls_location,ls_apppath,ls_dbpath,ls_odbcstr; //获取操作系统的system目录,并保存到ls_location变量 li_sysdir = ...
ls_driver = app_path + '\DBODBC9.DLL'; Ls_trans = app_path + '\DBODTR9.DLL'; // 检查是否存在AdaptiveServerAnywhere9.0驱动 tag1 = RegistryGet('HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\...
该应用程序托管在Vercel中,为跑步创建.env.local并从项目设置页面添加以下.env.local凭据REACT_APP_FIREBASE_API_KEY=APIKEYREACT_APP_FIREBASE_AUTH_DOMAIN=AUTHDOMAINREACT_APP_FIREBASE_PROJECT_ID=...
./ovsdb/ovsdb-tool create /usr/local/etc/openvswitch/conf.db ./vswitchd/vswitch.ovsschema ``` - 启动OVS数据库服务: ```bash ./ovsdb/ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db....
复制app_local.php.example-> app_local.php并粘贴您的凭据->请参阅##配置->您需要数据库和电子邮件(smtp)提供程序 位于 )或为cakephp或使用内置的Web服务器准备您的apache 启动 准备地图4.1在上注册并设置地图。...
│ │ app_improved.py │ │ app_insecure.py │ │ attack.js │ │ bank.py │ │ csrf.html │ │ csrf_auto.html │ │ manage.py │ │ mscrape.py │ │ README.md │ │ rscrape1.py │ │ rscrape2.py │ ...
### Android从HAL、JNI到APP学习心得 #### 一、HAL层详解 HAL(Hardware Abstraction Layer)即硬件抽象层,是Android系统架构中的一个重要组成部分,它为硬件提供了统一的接口,使得上层软件能够独立于硬件进行...
hiqu\\AppData\\Local\\Temp\\pip-install-mw9h8ku4\\Twisted\\setup.py'"'"'; __file__='"'"'C:\\Users\\zhiqu\\AppData\\Local\\Temp\\pip-install-mw9h8ku 4\\Twisted\\setup.py'"'"';f=getattr(tokenize, '"'"'...
2. `Application.mk`:此文件用来设置全局构建选项,如APP_ABI(目标CPU架构)和APP_STL(使用的C++标准库)。 3. `main.c`或`main.cpp`:包含你的C或C++代码,这里是HelloWorld的主体部分。 三、创建与配置 1. ...
在Oracle SQL提示符下,创建一个名为`open_pbds`的触发器,这个触发器会在数据库启动后执行,打开所有可插拔数据库。这是描述中提到的部分内容: ```sql CREATE OR REPLACE TRIGGER open_pbds AFTER STARTUP ON ...
Open Live Write 代码高亮插件,将压缩包中的dll文件,copy到C:\Users\111\AppData\Local\OpenLiveWriter\app-0.6.2\Plugins,重启软件亦可使用。注意:Plugins文件夹需要手动创建。
with open(app_path + '/config.json', 'r') as f: load_dict = json.load(f) ssh_config = load_dict['ssh'] user = ssh_config['user'] password = ssh_config['password'] ssh_host = ssh_config['host'] ...